mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-31 17:41:16 +00:00
Merge tag 'v5.14.3' into dev
This commit is contained in:
@@ -109,8 +109,8 @@ constexpr auto kSearchRequestDelay = crl::time(900);
|
||||
|
||||
base::options::toggle OptionForumHideChatsList({
|
||||
.id = kOptionForumHideChatsList,
|
||||
.name = "Hide chats list in forums",
|
||||
.description = "Don't keep a narrow column of chats list.",
|
||||
.name = "Hide chat list in forums",
|
||||
.description = "Don't keep a narrow column of chat list.",
|
||||
});
|
||||
|
||||
[[nodiscard]] bool RedirectTextToSearch(const QString &text) {
|
||||
@@ -2528,7 +2528,19 @@ bool Widget::search(bool inCache, SearchRequestDelay delay) {
|
||||
};
|
||||
if (trimmed.isEmpty() && !fromPeer && inTags.empty()) {
|
||||
cancelSearchRequest();
|
||||
|
||||
// Otherwise inside first searchApplyEmpty we call searchMode(),
|
||||
// which tries to load migrated search results for empty query.
|
||||
_migratedProcess.full = true;
|
||||
|
||||
searchApplyEmpty(fromStartType, currentSearchProcess());
|
||||
if (_searchInMigrated) {
|
||||
const auto type = SearchRequestType{
|
||||
.migrated = true,
|
||||
.start = true,
|
||||
};
|
||||
searchApplyEmpty(type, &_migratedProcess);
|
||||
}
|
||||
if (_searchWithPostsPreview) {
|
||||
searchApplyEmpty(
|
||||
{ .posts = true, .start = true },
|
||||
@@ -2950,7 +2962,8 @@ auto Widget::currentSearchProcess() -> not_null<SearchProcessState*> {
|
||||
|
||||
bool Widget::computeSearchWithPostsPreview() const {
|
||||
return (_searchHashOrCashtag != HashOrCashtag::None)
|
||||
&& (_searchState.tab == ChatSearchTab::MyMessages);
|
||||
&& (_searchState.tab == ChatSearchTab::MyMessages)
|
||||
&& !_searchState.inChat;
|
||||
}
|
||||
|
||||
void Widget::searchReceived(
|
||||
@@ -3488,7 +3501,9 @@ bool Widget::applySearchState(SearchState state) {
|
||||
: ChatSearchTab::MyMessages;
|
||||
}
|
||||
|
||||
const auto migrateFrom = (peer && !topic)
|
||||
const auto migrateFrom = (peer
|
||||
&& !topic
|
||||
&& state.tab == ChatSearchTab::ThisPeer)
|
||||
? peer->migrateFrom()
|
||||
: nullptr;
|
||||
_searchInMigrated = migrateFrom
|
||||
|
||||
Reference in New Issue
Block a user