File tree 3 files changed +7
-0
lines changed
3 files changed +7
-0
lines changed Original file line number Diff line number Diff line change 174
174
"error": {"type": "String", "example": "Network request failed: HTTP status 500"}
175
175
}
176
176
},
177
+ "errorReconnectingToServer": "Reconnecting to server...",
178
+ "@errorReconnectingToServer": {
179
+ "description": "Message when reconnecting to the server."
180
+ },
177
181
"errorSharingFailed": "Sharing failed",
178
182
"@errorSharingFailed": {
179
183
"description": "Error message when sharing a message failed."
Original file line number Diff line number Diff line change @@ -789,6 +789,7 @@ class UpdateMachine {
789
789
switch (e) {
790
790
case ZulipApiException (code: 'BAD_EVENT_QUEUE_ID' ):
791
791
assert (debugLog ('Lost event queue for $store . Replacing…' ));
792
+ reportErrorToUserInSnackBar (localizations.errorReconnectingToServer);
792
793
await store._globalStore._reloadPerAccount (store.accountId);
793
794
dispose ();
794
795
debugLog ('… Event queue replaced.' );
Original file line number Diff line number Diff line change @@ -406,7 +406,9 @@ void main() {
406
406
});
407
407
updateMachine.debugAdvanceLoop ();
408
408
async .flushMicrotasks ();
409
+ check (debugLastReportedError).isNull ();
409
410
await Future <void >.delayed (Duration .zero);
411
+ check (debugTakeLastReportedError ()).isNotNull ().contains ('Reconnecting to server.' );
410
412
check (store).isLoading.isTrue ();
411
413
412
414
// The global store has a new store.
You can’t perform that action at this time.
0 commit comments