mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-17 06:37:24 +02:00
Clear saved messages tags on cancel search.
This commit is contained in:
parent
b21bcb86cc
commit
fce520c9c0
1 changed files with 4 additions and 1 deletions
|
@ -3623,7 +3623,9 @@ bool Widget::cancelSearch() {
|
|||
auto updatedState = _searchState;
|
||||
const auto clearingQuery = !updatedState.query.isEmpty();
|
||||
auto clearingInChat = !clearingQuery
|
||||
&& (updatedState.inChat || updatedState.fromPeer);
|
||||
&& (updatedState.inChat
|
||||
|| updatedState.fromPeer
|
||||
|| !updatedState.tags.empty());
|
||||
if (clearingQuery) {
|
||||
updatedState.query = QString();
|
||||
} else if (clearingInChat) {
|
||||
|
@ -3636,6 +3638,7 @@ bool Widget::cancelSearch() {
|
|||
}
|
||||
updatedState.inChat = {};
|
||||
updatedState.fromPeer = nullptr;
|
||||
updatedState.tags = {};
|
||||
}
|
||||
if (!clearingQuery
|
||||
&& _subsectionTopBar
|
||||
|
|
Loading…
Add table
Reference in a new issue