mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-06 20:03:12 +00:00
Generalize the "joined community" service message.
This commit is contained in:
@@ -117,6 +117,10 @@ HistoryUnreadThings::ConstProxy Thread::unreadPollVotes() const {
|
||||
bool Thread::canToggleUnread(bool nowUnread) const {
|
||||
if ((asTopic() || asForum()) && !nowUnread) {
|
||||
return false;
|
||||
} else if (const auto channel = asHistory() ? peer()->asChannel() : nullptr
|
||||
; channel && channel->isCommunity() && !nowUnread) {
|
||||
// Communities support "mark as read" but not "mark as unread".
|
||||
return false;
|
||||
} else if (asSublist() && owningHistory()->peer->isSelf()) {
|
||||
return false;
|
||||
} else if (asHistory() && peer()->amMonoforumAdmin()) {
|
||||
|
||||
Reference in New Issue
Block a user