mirror of
https://github.com/zulip/zulip.git
synced 2025-11-08 07:52:19 +00:00
message_fetch: Use first unread anchor for home view.
This fixes one of our oldest important user experience issues, namely that if you never visit the home view, the Zulip webapp would often load "deep in the past" because the pointer had not advanced. Fixes #1529.
This commit is contained in:
@@ -138,7 +138,7 @@ function message_range(start, end) {
|
|||||||
const initialize_data = {
|
const initialize_data = {
|
||||||
initial_fetch: {
|
initial_fetch: {
|
||||||
req: {
|
req: {
|
||||||
anchor: 444,
|
anchor: 'first_unread',
|
||||||
num_before: 200,
|
num_before: 200,
|
||||||
num_after: 200,
|
num_after: 200,
|
||||||
client_gravatar: true,
|
client_gravatar: true,
|
||||||
|
|||||||
@@ -402,7 +402,9 @@ exports.initialize = function () {
|
|||||||
// near: narrow query, we want to select a specific message.
|
// near: narrow query, we want to select a specific message.
|
||||||
anchor = page_params.initial_pointer;
|
anchor = page_params.initial_pointer;
|
||||||
} else {
|
} else {
|
||||||
anchor = page_params.pointer;
|
// Otherwise, we should just use the first unread message in
|
||||||
|
// the user's unmuted history as our anchor.
|
||||||
|
anchor = "first_unread";
|
||||||
}
|
}
|
||||||
exports.load_messages({
|
exports.load_messages({
|
||||||
anchor: anchor,
|
anchor: anchor,
|
||||||
|
|||||||
Reference in New Issue
Block a user