mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
parent
0737034ea6
commit
1316d14f7a
2 changed files with 8 additions and 4 deletions
|
@ -935,15 +935,15 @@ void RepliesList::readTill(not_null<HistoryItem*> item) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void RepliesList::readTill(MsgId tillId) {
|
void RepliesList::readTill(MsgId tillId) {
|
||||||
if (!IsServerMsgId(tillId)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
readTill(tillId, _history->owner().message(_history->peer->id, tillId));
|
readTill(tillId, _history->owner().message(_history->peer->id, tillId));
|
||||||
}
|
}
|
||||||
|
|
||||||
void RepliesList::readTill(
|
void RepliesList::readTill(
|
||||||
MsgId tillId,
|
MsgId tillId,
|
||||||
HistoryItem *tillIdItem) {
|
HistoryItem *tillIdItem) {
|
||||||
|
if (!IsServerMsgId(tillId)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const auto was = computeInboxReadTillFull();
|
const auto was = computeInboxReadTillFull();
|
||||||
const auto now = tillId;
|
const auto now = tillId;
|
||||||
if (now < was) {
|
if (now < was) {
|
||||||
|
|
|
@ -1962,7 +1962,11 @@ void ListWidget::checkActivation() {
|
||||||
for (const auto &view : ranges::views::reverse(_items)) {
|
for (const auto &view : ranges::views::reverse(_items)) {
|
||||||
const auto bottom = itemTop(view) + view->height();
|
const auto bottom = itemTop(view) + view->height();
|
||||||
if (_visibleBottom + _itemsRevealHeight >= bottom) {
|
if (_visibleBottom + _itemsRevealHeight >= bottom) {
|
||||||
delegate()->listMarkReadTill(view->data());
|
const auto item = view->data();
|
||||||
|
if (item->isRegular()) {
|
||||||
|
delegate()->listMarkReadTill(item);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue