mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 07:33:52 +02:00
Fix dialogs list creation in support mode.
This commit is contained in:
parent
39008bf6fe
commit
be64f18e96
1 changed files with 10 additions and 4 deletions
|
@ -57,6 +57,10 @@ void Entry::cachePinnedIndex(int index) {
|
||||||
if (_pinnedIndex != index) {
|
if (_pinnedIndex != index) {
|
||||||
const auto wasPinned = isPinnedDialog();
|
const auto wasPinned = isPinnedDialog();
|
||||||
_pinnedIndex = index;
|
_pinnedIndex = index;
|
||||||
|
if (session().supportMode()) {
|
||||||
|
// Force reorder in support mode.
|
||||||
|
_sortKeyInChatList = 0;
|
||||||
|
}
|
||||||
updateChatListSortPosition();
|
updateChatListSortPosition();
|
||||||
updateChatListEntry();
|
updateChatListEntry();
|
||||||
if (wasPinned != isPinnedDialog()) {
|
if (wasPinned != isPinnedDialog()) {
|
||||||
|
@ -81,9 +85,9 @@ bool Entry::needUpdateInChatList() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Entry::updateChatListSortPosition() {
|
void Entry::updateChatListSortPosition() {
|
||||||
if (Auth().supportMode()
|
if (session().supportMode()
|
||||||
&& _sortKeyInChatList != 0
|
&& _sortKeyInChatList != 0
|
||||||
&& Auth().settings().supportFixChatsOrder()) {
|
&& session().settings().supportFixChatsOrder()) {
|
||||||
updateChatListEntry();
|
updateChatListEntry();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -95,6 +99,8 @@ void Entry::updateChatListSortPosition() {
|
||||||
: DialogPosFromDate(adjustedChatListTimeId());
|
: DialogPosFromDate(adjustedChatListTimeId());
|
||||||
if (needUpdateInChatList()) {
|
if (needUpdateInChatList()) {
|
||||||
setChatListExistence(true);
|
setChatListExistence(true);
|
||||||
|
} else {
|
||||||
|
_sortKeyInChatList = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,8 +215,8 @@ void Entry::updateChatListEntry() const {
|
||||||
mainChatListLink(Mode::Important));
|
mainChatListLink(Mode::Important));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Auth().supportMode()
|
if (session().supportMode()
|
||||||
&& !Auth().settings().supportAllSearchResults()) {
|
&& !session().settings().supportAllSearchResults()) {
|
||||||
main->repaintDialogRow({ _key, FullMsgId() });
|
main->repaintDialogRow({ _key, FullMsgId() });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue