mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Merge v4.14.13
# Conflicts: # Telegram/Resources/winrc/Telegram.rc # Telegram/Resources/winrc/Updater.rc # Telegram/SourceFiles/core/version.h # Telegram/SourceFiles/history/view/controls/history_view_voice_record_bar.cpp # Telegram/SourceFiles/history/view/media/history_view_photo.cpp # Telegram/SourceFiles/history/view/reactions/history_view_reactions_selector.cpp # Telegram/SourceFiles/mainwidget.cpp # Telegram/lib_ui
This commit is contained in:
@@ -331,6 +331,8 @@ Widget::Widget(
|
||||
) | rpl::start_with_next([=] {
|
||||
setSearchInChat((_openedForum && !_searchInChat)
|
||||
? Key(_openedForum->history())
|
||||
: _searchInChat.sublist()
|
||||
? Key(session().data().history(session().user()))
|
||||
: _searchInChat, nullptr);
|
||||
applyFilterUpdate(true);
|
||||
}, lifetime());
|
||||
@@ -996,7 +998,7 @@ void Widget::setupShortcuts() {
|
||||
if (_openedForum && !controller()->activeChatCurrent()) {
|
||||
request->check(Command::Search) && request->handle([=] {
|
||||
const auto history = _openedForum->history();
|
||||
controller()->content()->searchInChat(history);
|
||||
controller()->searchInChat(history);
|
||||
return true;
|
||||
});
|
||||
}
|
||||
@@ -1946,11 +1948,12 @@ void Widget::searchMessages(QString query, Key inChat, UserData *from) {
|
||||
controller()->closeFolder();
|
||||
}
|
||||
|
||||
auto tags = std::vector<Data::ReactionId>();
|
||||
if (const auto tagId = Data::SearchTagFromQuery(query)) {
|
||||
inChat = session().data().history(session().user());
|
||||
auto tags = Data::SearchTagsFromQuery(query);
|
||||
if (!tags.empty()) {
|
||||
if (!inChat.sublist()) {
|
||||
inChat = session().data().history(session().user());
|
||||
}
|
||||
query = QString();
|
||||
tags.push_back(tagId);
|
||||
}
|
||||
const auto inChatChanged = [&] {
|
||||
const auto inPeer = inChat.peer();
|
||||
@@ -2676,7 +2679,7 @@ bool Widget::setSearchInChat(
|
||||
}
|
||||
if (searchInPeerUpdated) {
|
||||
_searchInChat = chat;
|
||||
controller()->searchInChat = _searchInChat;
|
||||
controller()->setSearchInChat(_searchInChat);
|
||||
updateJumpToDateVisibility();
|
||||
updateStoriesVisibility();
|
||||
}
|
||||
@@ -2690,7 +2693,7 @@ bool Widget::setSearchInChat(
|
||||
}
|
||||
_searchTags = std::move(tags);
|
||||
_inner->searchInChat(_searchInChat, _searchFromAuthor, _searchTags);
|
||||
_searchTagsLifetime = _inner->searchTagsValue(
|
||||
_searchTagsLifetime = _inner->searchTagsChanges(
|
||||
) | rpl::start_with_next([=](std::vector<Data::ReactionId> &&list) {
|
||||
if (_searchTags != list) {
|
||||
clearSearchCache();
|
||||
@@ -3027,7 +3030,7 @@ void Widget::updateControlsGeometry() {
|
||||
}
|
||||
const auto scrollTop = forumReportTop
|
||||
+ (_forumReportBar ? _forumReportBar->bar().height() : 0);
|
||||
const auto scrollHeight = height() - scrollTop;
|
||||
const auto scrollHeight = height() - scrollTop - bottomSkip;
|
||||
const auto wasScrollHeight = _scroll->height();
|
||||
_scroll->setGeometry(0, scrollTop, scrollWidth, scrollHeight);
|
||||
if (scrollHeight != wasScrollHeight) {
|
||||
|
||||
Reference in New Issue
Block a user