mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Correctly handle shareable->non-shareable conversion.
This commit is contained in:
parent
f0acc9526e
commit
5ad4719c08
1 changed files with 9 additions and 5 deletions
|
@ -556,11 +556,12 @@ void EditFilterBox(
|
|||
state->hasLinks = state->links.value() | rpl::map([=](const auto &v) {
|
||||
return !v.empty();
|
||||
});
|
||||
if (!state->chatlist.current()) {
|
||||
state->chatlist = state->hasLinks.value() | rpl::filter(
|
||||
_1
|
||||
) | rpl::take(1);
|
||||
}
|
||||
state->hasLinks.value() | rpl::filter(
|
||||
_1
|
||||
) | rpl::start_with_next([=] {
|
||||
state->chatlist = true;
|
||||
}, box->lifetime());
|
||||
|
||||
const auto data = &state->rules;
|
||||
|
||||
owner->chatsFilters().isChatlistChanged(
|
||||
|
@ -574,6 +575,9 @@ void EditFilterBox(
|
|||
return;
|
||||
}
|
||||
*data = data->current().withChatlist(i->chatlist(), i->hasMyLinks());
|
||||
if (!i->chatlist() && !state->hasLinks.current()) {
|
||||
state->chatlist = false;
|
||||
}
|
||||
}, box->lifetime());
|
||||
|
||||
box->setWidth(st::boxWideWidth);
|
||||
|
|
Loading…
Add table
Reference in a new issue