PLT-4233 When internet reconnects, reconnect websocket and grab latest posts, etc. (#4500)
* When internet reconnects, reconnect websocket and grab latest posts, etc. * Rename internet connection variable
Этот коммит содержится в:
коммит произвёл
enahum
родитель
58215e573f
Коммит
557aa68636
@@ -67,12 +67,13 @@ export function close() {
|
||||
WebSocketClient.close();
|
||||
}
|
||||
|
||||
export function getStatuses() {
|
||||
StatusActions.loadStatusesForChannelAndSidebar();
|
||||
export function reconnect() {
|
||||
close();
|
||||
initialize();
|
||||
handleReconnect();
|
||||
}
|
||||
|
||||
function handleFirstConnect() {
|
||||
getStatuses();
|
||||
ErrorStore.clearLastError();
|
||||
ErrorStore.emitChange();
|
||||
}
|
||||
@@ -83,7 +84,7 @@ function handleReconnect() {
|
||||
loadPosts(ChannelStore.getCurrentId());
|
||||
}
|
||||
|
||||
getStatuses();
|
||||
StatusActions.loadStatusesForChannelAndSidebar();
|
||||
ErrorStore.clearLastError();
|
||||
ErrorStore.emitChange();
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user