mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-05 00:46:08 +00:00
Send sponsored peers view requests.
This commit is contained in:
@@ -33,6 +33,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "ui/painter.h"
|
||||
#include "ui/rect.h"
|
||||
#include "ui/ui_utility.h"
|
||||
#include "data/components/sponsored_messages.h"
|
||||
#include "data/data_drafts.h"
|
||||
#include "data/data_folder.h"
|
||||
#include "data/data_forum.h"
|
||||
@@ -1134,6 +1135,12 @@ void InnerWidget::paintEvent(QPaintEvent *e) {
|
||||
const auto activePeer = activeEntry.key.peer();
|
||||
for (; from < to; ++from) {
|
||||
const auto &result = _peerSearchResults[from];
|
||||
if (result->sponsored
|
||||
&& r.y() <= (skip + from * st::dialogsRowHeight)
|
||||
&& r.y() + r.height() >= (skip + (from + 1) * st::dialogsRowHeight)) {
|
||||
session().sponsoredMessages().view(
|
||||
result->sponsored->randomId);
|
||||
}
|
||||
const auto peer = result->peer;
|
||||
const auto active = !activeEntry.fullId
|
||||
&& activePeer
|
||||
|
Reference in New Issue
Block a user