Skip to content

Commit 4647c18

Browse files
committed
log [nfc]: Rename default report error helper to reportErrorToConsole
Signed-off-by: Zixuan James Li <[email protected]>
1 parent 7a75018 commit 4647c18

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/log.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ typedef ReportErrorCancellablyCallback = void Function(String? message, {String?
4848
// This gets set in [ZulipApp]. We need this indirection to keep `lib/log.dart`
4949
// from importing widget code, because the file is a dependency for the rest of
5050
// the app.
51-
ReportErrorCancellablyCallback reportErrorToUserBriefly = defaultReportErrorToUserBriefly;
51+
ReportErrorCancellablyCallback reportErrorToUserBriefly = reportErrorToConsole;
5252

53-
void defaultReportErrorToUserBriefly(String? message, {String? details}) {
53+
void reportErrorToConsole(String? message, {String? details}) {
5454
// Error dismissing is a no-op to the default handler.
5555
if (message == null) return;
5656
// If this callback is still in place, then the app's widget tree

lib/widgets/app.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class ZulipApp extends StatefulWidget {
8484
@visibleForTesting
8585
static void debugReset() {
8686
_snackBarCount = 0;
87-
reportErrorToUserBriefly = defaultReportErrorToUserBriefly;
87+
reportErrorToUserBriefly = reportErrorToConsole;
8888
_ready.dispose();
8989
_ready = ValueNotifier(false);
9090
}

test/model/store_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ void main() {
858858

859859
Future<void> prepare() async {
860860
reportErrorToUserBriefly = logReportedError;
861-
addTearDown(() => reportErrorToUserBriefly = defaultReportErrorToUserBriefly);
861+
addTearDown(() => reportErrorToUserBriefly = reportErrorToConsole);
862862
await preparePoll(lastEventId: 1);
863863
}
864864

0 commit comments

Comments
 (0)