This is basically just the logical extension of the previous commit
for the case where the last thing we did was subscribe or unsubscribe.
This even magically updates when you subscribe or unsubscribe from
another window :).
(imported from commit 2399329d11bf66aa0b614a21d2b3cf4035452279)
This is required to get historical messages that might be within the
message ID range of your home view.
I think we could avoid calling load_old_messages on every narrow by
tracking when the user last subscribed to each stream, and if the user
subscribed before the first message in the current home view message
window (aka the messages used for the fast-path narrowing), don't call
load_old_messages. This would happen almost every time. But it would
require a schema change to do this.
We also remove the load_more_messages call from hashchange.initialize.
It is no longer required now that we're calling load_old_messages on
each narrow anyway.
(imported from commit 1c78c183e61392429592ae89d566315be7be8999)
This is a V1 of this feature. For now, the only way to expand is by narrowing
to the stream---future revisions may add a manual toggle if it is found to be
useful.
Additionally, showing per-subject unread counts will be coming in a future revision
as well.
(imported from commit fb5df0d27e928fa3b0f32b9ff2c1c508202cf7e5)
Previously, narrowing to a stream name that only contained digits
would throw an exception.
(imported from commit dc76877427078d70e3d5625622c665be3302c976)
In Firefox, prevents e.g. a slash in a stream name, which we wanted to store as
%2F, from converting back to a literal slash.
There is some appeal to normalizing the URL fragment after parsing, but in
general this way seems better. It may decrease page load time on narrowed
views.
Doesn't yet fix#826; the URL is correct but the narrow is still wrong.
(imported from commit 32e3fa9e968139863f34b9698f1c8b39d06f0c14)
Previously, if you renarrowed, all message fading would be cleared
until you close and then reopen the compose box.
Fixes#1024.
(imported from commit 57981ba29ab597c4c84ca6e4e9d04a8284f49117)
Previously if you narrowed to
"pm-with:wdaher@humbughq.com,jbarnold@humbughq.com", you'd always get
no results because our filter was comparing your query against
message.reply_to, which is sorted in alphabetical order.
(imported from commit 40dc78640f3b010f11312176cfcf3c331fdf3337)
Previously we defaulted to current_msg_list.selected_id, which was
fine if you were narrowing from the home view, but if you navigated to
a narrow with no messages in it and then clicked something in the left
panel or used the search bar, it wouldn't work.
Fixes trac: #870.
(imported from commit 5ee480d8d2b1fb300fccbe75e04135d977a1fc07)
This is the fix for https://trac.humbughq.com/ticket/958 (Narrowing
moves the pointer) proposed by jhurwitz. Currently on master,
narrowing can cause you to end up wildly out of place.
This branch is not a perfect fix -- you do end up with the pointer on
the expected message after the narrow, but that message is centered on
the screen; better would be for that message to not move at all.
(imported from commit b89e4e2c896add20eceb609db46c46dc025fdce2)
In Safari only, if you narrow to something and scroll all the way back
up to the top and then unnarrow, your position actually remains all
the way at the top!
We explicitly call a "scroll_to_selected" as the final step of
deactivating a narrow, which brings this message into view.
This doesn't seem to be an issue on Chrome and Firefox, but I'm not
quite sure why; something about the sequence of events.
(imported from commit fc73640351be03c02eb2f3c8a23de3327723f002)
By splitting up all_msg_list and home_msg_list, we can properly add/remove
streams from the home view without having to jump through hoops.
(imported from commit 92767197759f7519197dfc58be951b60fa823fbb)
If we have removed a stream from the home view, and our pointer
that we load from the server refers to a message that is no longer
visible, we don't want to error out but rather select the nearest
message to our previously selected one.
(imported from commit d212f1fba7b06836d1d916b43042991625b6f41e)