mirror of
https://github.com/zulip/zulip.git
synced 2025-11-12 18:06:44 +00:00
message_view: Notify user when the local first unread was incorrect.
Fixes #33570 When navigating to a narrow based on locally available unread data with `old_unreads_missing`, we verify the calculated first unread message id with server and if there is an unread message prior to the one we calculated locally, we convert the current narrow into a `near` narrow and show a banner with a button to allow user to navigate to the correct first unread message.
This commit is contained in:
@@ -29,7 +29,7 @@ import * as stream_data from "./stream_data.ts";
|
||||
import * as stream_list from "./stream_list.ts";
|
||||
import * as util from "./util.ts";
|
||||
|
||||
const response_schema = z.object({
|
||||
export const response_schema = z.object({
|
||||
anchor: z.number(),
|
||||
found_newest: z.boolean(),
|
||||
found_oldest: z.boolean(),
|
||||
@@ -341,7 +341,9 @@ export function get_narrow_for_message_fetch(filter: Filter): string {
|
||||
return narrow_param_string;
|
||||
}
|
||||
|
||||
function get_parameters_for_message_fetch_api(opts: MessageFetchOptions): MessageFetchAPIParams {
|
||||
export function get_parameters_for_message_fetch_api(
|
||||
opts: MessageFetchOptions,
|
||||
): MessageFetchAPIParams {
|
||||
if (typeof opts.anchor === "number") {
|
||||
// Messages that have been locally echoed messages have
|
||||
// floating point temporary IDs, which is intended to be a.
|
||||
|
||||
Reference in New Issue
Block a user