Skip to content

Commit d27b46c

Browse files
committed
log [nfc]: Rename ReportErrorCallback to ReportErrorCancellablyCallback
This highlights the API choice that the callback signature allows the caller to clear/cancel the reported errors, drawing distinction from a later added variant that does not allow this. Signed-off-by: Zixuan James Li <[email protected]>
1 parent 06c5543 commit d27b46c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/log.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ bool debugLog(String message) {
3131
return true;
3232
}
3333

34-
typedef ReportErrorCallback = void Function(String? message, {String? details});
34+
typedef ReportErrorCancellablyCallback = void Function(String? message, {String? details});
3535

3636
/// Show the user an error message, without requiring them to interact with it.
3737
///
@@ -48,7 +48,7 @@ typedef ReportErrorCallback = void Function(String? message, {String? details});
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-
ReportErrorCallback reportErrorToUserBriefly = defaultReportErrorToUserBriefly;
51+
ReportErrorCancellablyCallback reportErrorToUserBriefly = defaultReportErrorToUserBriefly;
5252

5353
void defaultReportErrorToUserBriefly(String? message, {String? details}) {
5454
// Error dismissing is a no-op to the default handler.

0 commit comments

Comments
 (0)