mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-02 10:18:30 +00:00
Support sponsored peers in search results.
This commit is contained in:
@@ -835,7 +835,10 @@ void Widget::setupSwipeBack() {
|
||||
void Widget::chosenRow(const ChosenRow &row) {
|
||||
storiesToggleExplicitExpand(false);
|
||||
|
||||
if (!_searchState.query.isEmpty()) {
|
||||
if (!row.sponsoredRandomId.isEmpty()) {
|
||||
auto &messages = session().sponsoredMessages();
|
||||
messages.clicked(row.sponsoredRandomId, false, false);
|
||||
} else if (!_searchState.query.isEmpty()) {
|
||||
if (const auto history = row.key.history()) {
|
||||
session().recentPeers().bump(history->peer);
|
||||
}
|
||||
@@ -846,11 +849,6 @@ void Widget::chosenRow(const ChosenRow &row) {
|
||||
? history->peer->forumTopicFor(row.message.fullId.msg)
|
||||
: nullptr;
|
||||
|
||||
if (!row.sponsoredRandomId.isEmpty()) {
|
||||
auto &messages = session().sponsoredMessages();
|
||||
messages.clicked(row.sponsoredRandomId, false, false);
|
||||
}
|
||||
|
||||
if (topicJump) {
|
||||
if (controller()->shownForum().current() == topicJump->forum()) {
|
||||
controller()->closeForum();
|
||||
|
||||
Reference in New Issue
Block a user