summaryrefslogtreecommitdiffstats
path: root/webapp/utils/async_client.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/utils/async_client.jsx')
-rw-r--r--webapp/utils/async_client.jsx18
1 files changed, 7 insertions, 11 deletions
diff --git a/webapp/utils/async_client.jsx b/webapp/utils/async_client.jsx
index c23270216..1149c565f 100644
--- a/webapp/utils/async_client.jsx
+++ b/webapp/utils/async_client.jsx
@@ -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