mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Added chats filters list to each exception row in edit chats filter box.
This commit is contained in:
parent
23e22650f9
commit
3e49b45418
1 changed files with 11 additions and 1 deletions
|
@ -7,7 +7,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
*/
|
*/
|
||||||
#include "boxes/filters/edit_filter_chats_list.h"
|
#include "boxes/filters/edit_filter_chats_list.h"
|
||||||
|
|
||||||
|
#include "data/data_chat_filters.h"
|
||||||
#include "data/data_premium_limits.h"
|
#include "data/data_premium_limits.h"
|
||||||
|
#include "data/data_session.h"
|
||||||
#include "history/history.h"
|
#include "history/history.h"
|
||||||
#include "window/window_session_controller.h"
|
#include "window/window_session_controller.h"
|
||||||
#include "lang/lang_keys.h"
|
#include "lang/lang_keys.h"
|
||||||
|
@ -125,7 +127,15 @@ Flag TypeRow::flag() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
ExceptionRow::ExceptionRow(not_null<History*> history) : Row(history) {
|
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));
|
setCustomStatus(tr::lng_saved_forward_here(tr::now));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue