Show loading icon until first page of posts is loaded on channel switch (#3918)
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
ae46819b8e
Коммит
effd084023
@@ -609,14 +609,13 @@ export function getPosts(id) {
|
||||
}
|
||||
|
||||
const postList = PostStore.getAllPosts(channelId);
|
||||
const latestPostTime = PostStore.getLatestPostFromPageTime(id);
|
||||
|
||||
if ($.isEmptyObject(postList) || postList.order.length < Constants.POST_CHUNK_SIZE) {
|
||||
if ($.isEmptyObject(postList) || postList.order.length < Constants.POST_CHUNK_SIZE || latestPostTime === 0) {
|
||||
getPostsPage(channelId, Constants.POST_CHUNK_SIZE);
|
||||
return;
|
||||
}
|
||||
|
||||
const latestPostTime = PostStore.getLatestPostFromPageTime(id);
|
||||
|
||||
callTracker['getPosts_' + channelId] = utils.getTimestamp();
|
||||
|
||||
Client.getPosts(
|
||||
|
||||
Ссылка в новой задаче
Block a user