Fix crash with "Hide all chats" enabled

This commit is contained in:
Eric Kotato 2020-05-02 17:11:21 +03:00
parent 065e29af79
commit b8a512a132

View file

@ -194,7 +194,11 @@ void FiltersMenu::refresh() {
// so we have to restore it.
_scroll.scrollToY(oldTop);
const auto i = _filters.find(_activeFilterId);
scrollToButton((i != end(_filters)) ? i->second : _all);
if (i != end(_filters)) {
scrollToButton(i->second);
} else if (!cHideFilterAllChats()) {
scrollToButton(_all);
}
if (FiltersFirstLoad) {
_session->setActiveChatsFilter(cDefaultFilterId());