Correctly reset tracker for updateLastViewedAt and other asynchronous calls (#3801)
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
8203fd16ce
Коммит
ad6363079d
@@ -133,11 +133,11 @@ export function updateLastViewedAt(id) {
|
|||||||
Client.updateLastViewedAt(
|
Client.updateLastViewedAt(
|
||||||
channelId,
|
channelId,
|
||||||
() => {
|
() => {
|
||||||
callTracker.updateLastViewed = 0;
|
callTracker[`updateLastViewed${channelId}`] = 0;
|
||||||
ErrorStore.clearLastError();
|
ErrorStore.clearLastError();
|
||||||
},
|
},
|
||||||
(err) => {
|
(err) => {
|
||||||
callTracker.updateLastViewed = 0;
|
callTracker[`updateLastViewed${channelId}`] = 0;
|
||||||
var count = ErrorStore.getConnectionErrorCount();
|
var count = ErrorStore.getConnectionErrorCount();
|
||||||
ErrorStore.setConnectionErrorCount(count + 1);
|
ErrorStore.setConnectionErrorCount(count + 1);
|
||||||
dispatchError(err, 'updateLastViewedAt');
|
dispatchError(err, 'updateLastViewedAt');
|
||||||
@@ -170,11 +170,11 @@ export function setLastViewedAt(lastViewedAt, id) {
|
|||||||
channelId,
|
channelId,
|
||||||
lastViewedAt,
|
lastViewedAt,
|
||||||
() => {
|
() => {
|
||||||
callTracker.setLastViewedAt = 0;
|
callTracker[`setLastViewedAt${channelId}${lastViewedAt}`] = 0;
|
||||||
ErrorStore.clearLastError();
|
ErrorStore.clearLastError();
|
||||||
},
|
},
|
||||||
(err) => {
|
(err) => {
|
||||||
callTracker.setLastViewedAt = 0;
|
callTracker[`setLastViewedAt${channelId}${lastViewedAt}`] = 0;
|
||||||
var count = ErrorStore.getConnectionErrorCount();
|
var count = ErrorStore.getConnectionErrorCount();
|
||||||
ErrorStore.setConnectionErrorCount(count + 1);
|
ErrorStore.setConnectionErrorCount(count + 1);
|
||||||
dispatchError(err, 'setLastViewedAt');
|
dispatchError(err, 'setLastViewedAt');
|
||||||
@@ -1190,6 +1190,7 @@ export function getRecentAndNewUsersAnalytics(teamId) {
|
|||||||
teamId,
|
teamId,
|
||||||
stats
|
stats
|
||||||
});
|
});
|
||||||
|
callTracker[callName] = 0;
|
||||||
},
|
},
|
||||||
(err) => {
|
(err) => {
|
||||||
callTracker[callName] = 0;
|
callTracker[callName] = 0;
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user