Load channel members with channels to make sure we have latest unread counts (#4389)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
9bae1f7e93
Коммит
92642bab68
@@ -63,7 +63,7 @@ export function checkVersion() {
|
||||
}
|
||||
}
|
||||
|
||||
export function getChannels(doVersionCheck) {
|
||||
export function getChannels() {
|
||||
if (isCallInProgress('getChannels')) {
|
||||
return null;
|
||||
}
|
||||
@@ -74,10 +74,6 @@ export function getChannels(doVersionCheck) {
|
||||
(data) => {
|
||||
callTracker.getChannels = 0;
|
||||
|
||||
if (doVersionCheck) {
|
||||
checkVersion();
|
||||
}
|
||||
|
||||
AppDispatcher.handleServerAction({
|
||||
type: ActionTypes.RECEIVED_CHANNELS,
|
||||
channels: data
|
||||
@@ -114,7 +110,7 @@ export function getChannel(id) {
|
||||
);
|
||||
}
|
||||
|
||||
export function getMyChannelMembers(doVersionCheck) {
|
||||
export function getMyChannelMembers() {
|
||||
if (isCallInProgress('getMyChannelMembers')) {
|
||||
return;
|
||||
}
|
||||
@@ -125,10 +121,6 @@ export function getMyChannelMembers(doVersionCheck) {
|
||||
(data) => {
|
||||
callTracker.getMyChannelMembers = 0;
|
||||
|
||||
if (doVersionCheck) {
|
||||
checkVersion();
|
||||
}
|
||||
|
||||
AppDispatcher.handleServerAction({
|
||||
type: ActionTypes.RECEIVED_MY_CHANNEL_MEMBERS,
|
||||
members: data
|
||||
@@ -242,7 +234,7 @@ export function getMoreChannels(force) {
|
||||
}
|
||||
}
|
||||
|
||||
export function getChannelStats(channelId = ChannelStore.getCurrentId()) {
|
||||
export function getChannelStats(channelId = ChannelStore.getCurrentId(), doVersionCheck = false) {
|
||||
if (isCallInProgress('getChannelStats' + channelId) || channelId == null) {
|
||||
return;
|
||||
}
|
||||
@@ -254,6 +246,10 @@ export function getChannelStats(channelId = ChannelStore.getCurrentId()) {
|
||||
(data) => {
|
||||
callTracker['getChannelStats' + channelId] = 0;
|
||||
|
||||
if (doVersionCheck) {
|
||||
checkVersion();
|
||||
}
|
||||
|
||||
AppDispatcher.handleServerAction({
|
||||
type: ActionTypes.RECEIVED_CHANNEL_STATS,
|
||||
stats: data
|
||||
|
||||
Ссылка в новой задаче
Block a user