mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-02 15:35:51 +00:00
Support hashtags with mentions.
This commit is contained in:
@@ -43,6 +43,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "window/window_history_hider.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_peer_menu.h"
|
||||
#include "window/window_session_controller_link_info.h"
|
||||
#include "window/themes/window_theme.h"
|
||||
#include "chat_helpers/bot_command.h"
|
||||
#include "chat_helpers/tabbed_selector.h" // TabbedSelector::refreshStickers
|
||||
@@ -744,6 +745,15 @@ void MainWidget::hideSingleUseKeyboard(FullMsgId replyToId) {
|
||||
}
|
||||
|
||||
void MainWidget::searchMessages(const QString &query, Dialogs::Key inChat) {
|
||||
const auto complex = Data::HashtagWithUsernameFromQuery(query);
|
||||
if (!complex.username.isEmpty()) {
|
||||
_controller->showPeerByLink(Window::PeerByLinkInfo{
|
||||
.usernameOrId = complex.username,
|
||||
.text = complex.hashtag,
|
||||
.resolveType = Window::ResolveType::HashtagSearch,
|
||||
});
|
||||
return;
|
||||
}
|
||||
auto tags = Data::SearchTagsFromQuery(query);
|
||||
if (_dialogs) {
|
||||
auto state = Dialogs::SearchState{
|
||||
|
Reference in New Issue
Block a user