resize: Resize sidebars when toggling user search.

It's possible we want to do the same for the stream
search, but this PR is highly focused on the buddy
list and GROUP PMs widget.
This commit is contained in:
Steve Howell 2020-05-27 19:43:47 +00:00 committed by Tim Abbott
parent 7ed47e83fe
commit 87c36cdb26
2 changed files with 3 additions and 0 deletions

View File

@ -52,6 +52,7 @@ const _stream_popover = {
}; };
const _resize = { const _resize = {
resize_sidebars: () => {},
resize_page_components: () => {}, resize_page_components: () => {},
}; };

View File

@ -47,6 +47,7 @@ const user_search = function (opts) {
self.hide_widget = function () { self.hide_widget = function () {
$widget.addClass('notdisplayed'); $widget.addClass('notdisplayed');
resize.resize_sidebars();
}; };
self.show_widget = function () { self.show_widget = function () {
@ -54,6 +55,7 @@ const user_search = function (opts) {
// when the user wants to search. // when the user wants to search.
popovers.hide_all_except_sidebars(); popovers.hide_all_except_sidebars();
$widget.removeClass('notdisplayed'); $widget.removeClass('notdisplayed');
resize.resize_sidebars();
}; };
self.widget_shown = function () { self.widget_shown = function () {