mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 23:53:58 +02:00
parent
cd506dfff5
commit
6ccd53689d
1 changed files with 34 additions and 29 deletions
|
@ -649,9 +649,12 @@ void ListWidget::restart() {
|
|||
}
|
||||
|
||||
void ListWidget::itemRemoved(not_null<const HistoryItem*> item) {
|
||||
if (isMyItem(item)) {
|
||||
if (!isMyItem(item)) {
|
||||
return;
|
||||
}
|
||||
auto id = GetUniversalId(item);
|
||||
|
||||
auto needHeightRefresh = false;
|
||||
auto sectionIt = findSectionByItem(id);
|
||||
if (sectionIt != _sections.end()) {
|
||||
if (sectionIt->removeItem(id)) {
|
||||
|
@ -659,7 +662,7 @@ void ListWidget::itemRemoved(not_null<const HistoryItem*> item) {
|
|||
if (sectionIt->empty()) {
|
||||
_sections.erase(sectionIt);
|
||||
}
|
||||
refreshHeight();
|
||||
needHeightRefresh = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -677,8 +680,10 @@ void ListWidget::itemRemoved(not_null<const HistoryItem*> item) {
|
|||
removeItemSelection(i);
|
||||
}
|
||||
|
||||
mouseActionUpdate(_mousePosition);
|
||||
if (needHeightRefresh) {
|
||||
refreshHeight();
|
||||
}
|
||||
mouseActionUpdate(_mousePosition);
|
||||
}
|
||||
|
||||
FullMsgId ListWidget::computeFullId(
|
||||
|
|
Loading…
Add table
Reference in a new issue