mirror of https://github.com/procxx/kepka.git
Fix crash in archive / pinned in folder management.
This commit is contained in:
parent
f4822cf558
commit
2f7563767d
|
@ -1948,12 +1948,6 @@ void History::setFolderPointer(Data::Folder *folder) {
|
||||||
const auto wasInList = inChatList();
|
const auto wasInList = inChatList();
|
||||||
if (wasInList) {
|
if (wasInList) {
|
||||||
removeFromChatList(0, owner().chatsList(this->folder()));
|
removeFromChatList(0, owner().chatsList(this->folder()));
|
||||||
for (const auto &filter : filters.list()) {
|
|
||||||
const auto id = filter.id();
|
|
||||||
if (inChatList(id)) {
|
|
||||||
removeFromChatList(id, filters.chatsList(id));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
const auto was = _folder.value_or(nullptr);
|
const auto was = _folder.value_or(nullptr);
|
||||||
_folder = folder;
|
_folder = folder;
|
||||||
|
@ -1962,12 +1956,10 @@ void History::setFolderPointer(Data::Folder *folder) {
|
||||||
}
|
}
|
||||||
if (wasInList) {
|
if (wasInList) {
|
||||||
addToChatList(0, owner().chatsList(folder));
|
addToChatList(0, owner().chatsList(folder));
|
||||||
for (const auto &filter : filters.list()) {
|
|
||||||
if (filter.contains(this)) {
|
owner().chatsFilters().refreshHistory(this);
|
||||||
const auto id = filter.id();
|
updateChatListEntry();
|
||||||
addToChatList(id, filters.chatsList(id));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
owner().chatsListChanged(was);
|
owner().chatsListChanged(was);
|
||||||
owner().chatsListChanged(folder);
|
owner().chatsListChanged(folder);
|
||||||
} else if (!wasKnown) {
|
} else if (!wasKnown) {
|
||||||
|
|
Loading…
Reference in New Issue