Skip to content

Commit 143fc9c

Browse files
committed
log [nfc]: Rename default report error helper to reportErrorToConsole
Signed-off-by: Zixuan James Li <[email protected]>
1 parent 4555fa4 commit 143fc9c

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
@@ -837,7 +837,7 @@ void main() {
837837

838838
Future<void> prepare() async {
839839
reportErrorToUserBriefly = logReportedError;
840-
addTearDown(() => reportErrorToUserBriefly = defaultReportErrorToUserBriefly);
840+
addTearDown(() => reportErrorToUserBriefly = reportErrorToConsole);
841841
await preparePoll(lastEventId: 1);
842842
}
843843

0 commit comments

Comments
 (0)