mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-28 08:22:31 +00:00
Possible crash fixed in ClickHandler.
This commit is contained in:
@@ -93,7 +93,7 @@ void paintRow(Painter &p, History *history, HistoryItem *item, int w, bool activ
|
||||
p.drawSprite(QPoint(rectForName.left() + rectForName.width() + st::dlgCheckLeft, rectForName.top() + st::dlgCheckTop), *check);
|
||||
}
|
||||
|
||||
paintItemCallback(nameleft, namewidth);
|
||||
paintItemCallback(nameleft, namewidth, item);
|
||||
}
|
||||
|
||||
if (history->peer->isUser() && history->peer->isVerified()) {
|
||||
@@ -194,7 +194,7 @@ void paintUnreadCount(Painter &p, const QString &text, int top, int w, bool acti
|
||||
void RowPainter::paint(Painter &p, const Row *row, int w, bool active, bool selected, bool onlyBackground) {
|
||||
auto history = row->history();
|
||||
auto item = history->lastMsg;
|
||||
paintRow(p, history, item, w, active, selected, onlyBackground, [&p, w, active, history, item](int nameleft, int namewidth) {
|
||||
paintRow(p, history, item, w, active, selected, onlyBackground, [&p, w, active, history](int nameleft, int namewidth, HistoryItem *item) {
|
||||
int32 unread = history->unreadCount();
|
||||
if (history->peer->migrateFrom()) {
|
||||
if (History *h = App::historyLoaded(history->peer->migrateFrom()->id)) {
|
||||
@@ -219,7 +219,7 @@ void RowPainter::paint(Painter &p, const Row *row, int w, bool active, bool sele
|
||||
void RowPainter::paint(Painter &p, const FakeRow *row, int w, bool active, bool selected, bool onlyBackground) {
|
||||
auto item = row->item();
|
||||
auto history = item->history();
|
||||
paintRow(p, history, item, w, active, selected, onlyBackground, [&p, row, active, item](int nameleft, int namewidth) {
|
||||
paintRow(p, history, item, w, active, selected, onlyBackground, [&p, row, active](int nameleft, int namewidth, HistoryItem *item) {
|
||||
int lastWidth = namewidth, texttop = st::dlgPaddingVer + st::dlgFont->height + st::dlgSep;
|
||||
item->drawInDialog(p, QRect(nameleft, texttop, lastWidth, st::dlgFont->height), active, row->_cacheFor, row->_cache);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user