@@ -82,16 +82,20 @@ Future<void> markNarrowAsUnreadFromMessage(
82
82
onFailedTitle: zulipLocalizations.errorMarkAsUnreadFailedTitle);
83
83
}
84
84
85
- /// Updates message flags by applying given operation `op` using given `flag`
86
- /// the update happens on given `apiNarrow` starting from given `startingAnchor`
85
+ /// Add or remove the given flag from the anchor to the end of the narrow,
86
+ /// showing feedback to the user on progress or failure.
87
87
///
88
- /// This also handles interactions with the user as it shows a `Snackbar` with
89
- /// `progressMessage` while performing the update, shows an error dialog when
90
- /// update fails with the given title using `onFailedTitle` and shows
91
- /// a `Snackbar` with computed message using given `onCompletedMessage` .
88
+ /// This has the semantics of [updateMessageFlagsForNarrow]
89
+ /// (see https://zulip.com/api/ update-message-flags-for-narrow)
90
+ /// with `numBefore: 0` and infinite `numAfter` . It operates by calling that
91
+ /// endpoint with a finite `numAfter` as a batch size, in a loop .
92
92
///
93
- /// Returns true in case the process is completed with no exceptions
94
- /// otherwise shows an error dialog and returns false.
93
+ /// If the operation requires more than one batch, the user is shown progress
94
+ /// feedback through [SnackBar] , using [progressMessage] and [onCompletedMessage] .
95
+ /// If the operation fails, the user is shown an error dialog box with title
96
+ /// [onFailedTitle] .
97
+ ///
98
+ /// Returns true just if the operation finished successfully.
95
99
Future <bool > updateMessageFlagsStartingFromAnchor ({
96
100
required BuildContext context,
97
101
required List <ApiNarrowElement > apiNarrow,
0 commit comments