The default channels checkbox only exists in DOM if there are default
channels in the realm, so we should make sure that we check whether
there are default channels in the realm before accessing the
checkbox element in set_streams_to_join_visibility.
Reproducer:
* Have some unreads in the Combined feed view.
* Scroll up and select a message that was not part of initial fetch.
* Reload.
* Go a another narrow.
* Come back to combined feed to find your at a random message. This
message is actually last message of the current fetch of
combined feed view which was returned via `first_unread_message_id`.
Some we didn't have a check for if topic is muted here which
resulted in combined feed trying to navigate user to muted
unread message if it was the first unread in the narrow.
We now check if the row exists in the current view, and only then do we
process the submessages in it, instead of letting `Error: Failed to
do_process_submessages` happen.
This commit extracts the method to create and update message
lists in the narrow. This is particularly useful in cases when we
need to update the narrow and view with our own message lists.
This is a preparatory commit to #30114, since it involves
creating a new message list from the messages fetched,
which may be of a different narrow from that of the
initial filter, and updating the view and narrow with it.
This commit fixes the bug when updating
"Restrict email domains of new users?" setting by
adding data-setting-widget-type attribute to the select
element as get_input_element_value now expects every
element to have that attribute after 64c8262eaf.
Due to this change, we also need to update the code in
populate_data_for_request function to not send invalid
parameter in the request. This change resulted in some
refactoring which now helps in not passing in the
"disallow_disposable_email_addresses" and
"email_restricted_to_domains" when these fields are
not changed.
This commit fixes the bug when updating realm default
language setting by adding data-setting-widget-type
attribute to the relevant element with "prop-element"
class as get_input_element_value now expects every
element passed to it to have that attr after 64c8262eaf.
As a result we can now remove the code from
get_complete_data_for_subsection to handle realm
default language and just let get_input_element_value
handle it and it also helps in passing the parameter
unnecessary to request when the setting is not changed.
This commit solves the bug for user notification batching
setting which was introduced during the typescript migration
of settings_components.js due to assertion error in
get_input_element_value.
Add user name in feedback message so that it is more clear
which user is unsubscribed.
With tweaks by tabbott to handle the yourself case.
Fixes#19165.
If the initial fetch pre #29740 fetches all muted messages we don't
have any messages in all message list and hence query for
oldest message is undefined.
This results in us trying to render oldest_message_timestamp
with its value as infinity.
To fix it, we include muted messages in our search for oldest
message in the list and if we still cannot find one, we wait
for the next fetch.
The removePill function of input_pill module uses a for loop
for iterating and finding the required pill.
Replace the for loop with inbuilt findIndex function for efficiency.
Authored-by: Dhruv Chouhan <dc.dhruvchouhan@gmail.com>.
Add 'click' event listener to the pills in stream settings
to toggle the user_group_info_popover.
Fixes#28687.
Co-authored-by: Pieter CK <pieterceka123@gmail.com>.
Refactored hashchanged() so that popover.hide_all()
is executed before checking is_overlay_hash() to close
popovers when the user changes hash but still on overlay.