diff --git a/patches/feature/hidden-users-dialog-row.patch b/patches/feature/hidden-users-dialog-row.patch new file mode 100644 index 0000000..a7fa562 --- /dev/null +++ b/patches/feature/hidden-users-dialog-row.patch @@ -0,0 +1,33 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: devilreef +Date: Wed, 29 Apr 2026 14:32:47 +0600 +Subject: [PATCH] hide dm row from dialogs list for hidden users + +--- + Telegram/SourceFiles/history/history.cpp | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/Telegram/SourceFiles/history/history.cpp b/Telegram/SourceFiles/history/history.cpp +index 0000000..0000000 100644 +--- a/Telegram/SourceFiles/history/history.cpp ++++ b/Telegram/SourceFiles/history/history.cpp +@@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL + */ + #include "history/history.h" + ++#include "arcanegram/features/ag_hidden_users.h" + #include "history/view/history_view_element.h" + #include "history/view/history_view_item_preview.h" + #include "history/view/history_view_translate_tracker.h" +@@ -3145,6 +3146,8 @@ bool History::trackUnreadMessages() const { + bool History::shouldBeInChatList() const { + if (peer->migrateTo() || !folderKnown()) { + return false; ++ } else if (peer->isUser() && Arcanegram::HiddenUsers::IsHidden(peer->id)) { ++ return false; + } else if (isPinnedDialog(FilterId())) { + return true; + } else if (const auto channel = peer->asChannel()) { +-- +2.52.0.windows.1 + diff --git a/series b/series index 97c882c..5deed47 100644 --- a/series +++ b/series @@ -15,6 +15,7 @@ feature/hidden-users-profile-menu.patch feature/hidden-users-element-hide.patch feature/hidden-users-reactions.patch feature/hidden-users-who-reacted.patch +feature/hidden-users-dialog-row.patch feature/hidden-users-typing.patch feature/disable-chat-wallpaper.patch misc/copy-id-url-handler.patch diff --git a/src/cpp/arcanegram/ag_refresh.cpp b/src/cpp/arcanegram/ag_refresh.cpp index 906c756..1a598f4 100644 --- a/src/cpp/arcanegram/ag_refresh.cpp +++ b/src/cpp/arcanegram/ag_refresh.cpp @@ -52,6 +52,20 @@ void ForEachLoadedItem(Fn)> action) { }); } +void ForEachLoadedHistoryFor( + PeerId id, + Fn)> action) { + for (const auto &entry : Core::App().domain().accounts()) { + const auto session = entry.account->maybeSession(); + if (!session) { + continue; + } + if (const auto h = session->data().historyLoaded(id)) { + action(h); + } + } +} + void RefreshAllItems() { ForEachLoadedHistory([](not_null h) { auto &owner = h->owner(); diff --git a/src/cpp/arcanegram/ag_refresh.h b/src/cpp/arcanegram/ag_refresh.h index 03004e2..548a6d3 100644 --- a/src/cpp/arcanegram/ag_refresh.h +++ b/src/cpp/arcanegram/ag_refresh.h @@ -2,12 +2,15 @@ #include "base/basic_types.h" +class History; class HistoryItem; namespace Arcanegram { void ForEachLoadedItem(Fn)> action); +void ForEachLoadedHistoryFor(PeerId id, Fn)> action); + void RefreshAllItems(); } // namespace Arcanegram diff --git a/src/cpp/arcanegram/features/ag_hidden_users.cpp b/src/cpp/arcanegram/features/ag_hidden_users.cpp index 62d4a56..dcc957e 100644 --- a/src/cpp/arcanegram/features/ag_hidden_users.cpp +++ b/src/cpp/arcanegram/features/ag_hidden_users.cpp @@ -60,6 +60,9 @@ void Save() { } void RefreshAll(PeerId changed) { + ForEachLoadedHistoryFor(changed, [](not_null history) { + history->updateChatListExistence(); + }); ForEachLoadedItem([changed](not_null item) { auto &owner = item->history()->owner(); const auto from = item->from();