File tree 3 files changed +10
-0
lines changed
3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 180
180
"error": {"type": "String", "example": "Network request failed: HTTP status 500"}
181
181
}
182
182
},
183
+ "errorReconnectingToServer": "Reconnecting to server at {url}...",
184
+ "@errorReconnectingToServer": {
185
+ "url": {"type": "String", "example": "http://example.com/"},
186
+ "description": "Message when reconnecting to the server."
187
+ },
183
188
"errorSharingFailed": "Sharing failed",
184
189
"@errorSharingFailed": {
185
190
"description": "Error message when sharing a message failed."
Original file line number Diff line number Diff line change @@ -789,6 +789,8 @@ 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 (
793
+ store.connection.realmUrl.origin));
792
794
await store._globalStore._reloadPerAccount (store.accountId);
793
795
dispose ();
794
796
debugLog ('… Event queue replaced.' );
Original file line number Diff line number Diff line change @@ -406,7 +406,10 @@ 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 ()
412
+ .contains ('Reconnecting to server at ${eg .realmUrl .origin }...' );
410
413
check (store).isLoading.isTrue ();
411
414
412
415
// The global store has a new store.
You can’t perform that action at this time.
0 commit comments