mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-11 11:47:09 +02:00
Fixed open of locked chats filter with shortcuts to open near filters.
This commit is contained in:
parent
7da0124286
commit
2b43f2682a
1 changed files with 6 additions and 1 deletions
|
@ -49,6 +49,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "data/data_chat_filters.h"
|
||||
#include "data/data_replies_list.h"
|
||||
#include "data/data_peer_values.h"
|
||||
#include "data/data_premium_limits.h"
|
||||
#include "data/data_web_page.h"
|
||||
#include "passport/passport_form_controller.h"
|
||||
#include "chat_helpers/tabbed_selector.h"
|
||||
|
@ -3249,7 +3250,8 @@ bool CheckAndJumpToNearChatsFilter(
|
|||
bool isNext,
|
||||
bool jump) {
|
||||
const auto id = controller->activeChatsFilterCurrent();
|
||||
const auto list = &controller->session().data().chatsFilters().list();
|
||||
const auto session = &controller->session();
|
||||
const auto list = &session->data().chatsFilters().list();
|
||||
const auto index = int(ranges::find(
|
||||
*list,
|
||||
id,
|
||||
|
@ -3262,6 +3264,9 @@ bool CheckAndJumpToNearChatsFilter(
|
|||
if (changed >= int(list->size()) || changed < 0) {
|
||||
return false;
|
||||
}
|
||||
if (changed > Data::PremiumLimits(session).dialogFiltersCurrent()) {
|
||||
return false;
|
||||
}
|
||||
if (jump) {
|
||||
controller->setActiveChatsFilter((changed >= 0)
|
||||
? (*list)[changed].id()
|
||||
|
|
Loading…
Add table
Reference in a new issue