mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-02 23:45:44 +00:00
Correctly handle shareable->non-shareable conversion.
This commit is contained in:
@@ -556,11 +556,12 @@ void EditFilterBox(
|
|||||||
state->hasLinks = state->links.value() | rpl::map([=](const auto &v) {
|
state->hasLinks = state->links.value() | rpl::map([=](const auto &v) {
|
||||||
return !v.empty();
|
return !v.empty();
|
||||||
});
|
});
|
||||||
if (!state->chatlist.current()) {
|
state->hasLinks.value() | rpl::filter(
|
||||||
state->chatlist = state->hasLinks.value() | rpl::filter(
|
_1
|
||||||
_1
|
) | rpl::start_with_next([=] {
|
||||||
) | rpl::take(1);
|
state->chatlist = true;
|
||||||
}
|
}, box->lifetime());
|
||||||
|
|
||||||
const auto data = &state->rules;
|
const auto data = &state->rules;
|
||||||
|
|
||||||
owner->chatsFilters().isChatlistChanged(
|
owner->chatsFilters().isChatlistChanged(
|
||||||
@@ -574,6 +575,9 @@ void EditFilterBox(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
*data = data->current().withChatlist(i->chatlist(), i->hasMyLinks());
|
*data = data->current().withChatlist(i->chatlist(), i->hasMyLinks());
|
||||||
|
if (!i->chatlist() && !state->hasLinks.current()) {
|
||||||
|
state->chatlist = false;
|
||||||
|
}
|
||||||
}, box->lifetime());
|
}, box->lifetime());
|
||||||
|
|
||||||
box->setWidth(st::boxWideWidth);
|
box->setWidth(st::boxWideWidth);
|
||||||
|
Reference in New Issue
Block a user