mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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;
|
auto updatedState = _searchState;
|
||||||
const auto clearingQuery = !updatedState.query.isEmpty();
|
const auto clearingQuery = !updatedState.query.isEmpty();
|
||||||
auto clearingInChat = !clearingQuery
|
auto clearingInChat = !clearingQuery
|
||||||
&& (updatedState.inChat || updatedState.fromPeer);
|
&& (updatedState.inChat
|
||||||
|
|| updatedState.fromPeer
|
||||||
|
|| !updatedState.tags.empty());
|
||||||
if (clearingQuery) {
|
if (clearingQuery) {
|
||||||
updatedState.query = QString();
|
updatedState.query = QString();
|
||||||
} else if (clearingInChat) {
|
} else if (clearingInChat) {
|
||||||
|
@ -3636,6 +3638,7 @@ bool Widget::cancelSearch() {
|
||||||
}
|
}
|
||||||
updatedState.inChat = {};
|
updatedState.inChat = {};
|
||||||
updatedState.fromPeer = nullptr;
|
updatedState.fromPeer = nullptr;
|
||||||
|
updatedState.tags = {};
|
||||||
}
|
}
|
||||||
if (!clearingQuery
|
if (!clearingQuery
|
||||||
&& _subsectionTopBar
|
&& _subsectionTopBar
|
||||||
|
|
Loading…
Add table
Reference in a new issue