mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-06 11:52:58 +00:00
Fixed once again unwanted reset filter on creation of tabs strip.
Regression was introduced in c0bbb669e0.
This commit is contained in:
@@ -1677,6 +1677,7 @@ void Widget::toggleFiltersMenu(bool enabled) {
|
||||
|
||||
_chatFilters = base::make_unique_q<NoScrollPropagationWidget>(this);
|
||||
const auto raw = _chatFilters.get();
|
||||
const auto idBeforeTabs = controller()->activeChatsFilterCurrent();
|
||||
const auto inner = Ui::AddChatFiltersTabsStrip(
|
||||
_chatFilters.get(),
|
||||
&session(),
|
||||
@@ -1689,6 +1690,9 @@ void Widget::toggleFiltersMenu(bool enabled) {
|
||||
Window::GifPauseReason::Any,
|
||||
controller(),
|
||||
true);
|
||||
if (controller()->activeChatsFilterCurrent() != idBeforeTabs) {
|
||||
controller()->setActiveChatsFilter(idBeforeTabs);
|
||||
}
|
||||
raw->show();
|
||||
raw->stackUnder(_scroll);
|
||||
raw->resizeToWidth(width());
|
||||
|
||||
@@ -227,7 +227,6 @@ not_null<Ui::RpWidget*> AddChatFiltersTabsStrip(
|
||||
? st::dialogsSearchTabs
|
||||
: st::chatsFiltersTabs));
|
||||
const auto state = wrap->lifetime().make_state<State>();
|
||||
state->lastFilterId = controller->activeChatsFilterCurrent();
|
||||
const auto reassignUnreadValue = [=] {
|
||||
state->reorderLifetime.destroy();
|
||||
const auto &list = session->data().chatsFilters().list();
|
||||
|
||||
Reference in New Issue
Block a user