Skip to content

Commit

Permalink
Added chats filters list to each exception row in edit chats filter box.
Browse files Browse the repository at this point in the history
  • Loading branch information
23rd committed Nov 23, 2024
1 parent 23e2265 commit 3e49b45
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Telegram/SourceFiles/boxes/filters/edit_filter_chats_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ For license and copyright information please follow this link:
*/
#include "boxes/filters/edit_filter_chats_list.h"

#include "data/data_chat_filters.h"
#include "data/data_premium_limits.h"
#include "data/data_session.h"
#include "history/history.h"
#include "window/window_session_controller.h"
#include "lang/lang_keys.h"
Expand Down Expand Up @@ -125,7 +127,15 @@ Flag TypeRow::flag() const {
}

ExceptionRow::ExceptionRow(not_null<History*> history) : Row(history) {
if (peer()->isSelf()) {
auto filters = QStringList();
for (const auto &filter : history->owner().chatsFilters().list()) {
if (filter.contains(history) && filter.id()) {
filters << filter.title();
}
}
if (!filters.isEmpty()) {
setCustomStatus(filters.join(", "));
} else if (peer()->isSelf()) {
setCustomStatus(tr::lng_saved_forward_here(tr::now));
}
}
Expand Down

0 comments on commit 3e49b45

Please sign in to comment.