mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Allow who viewed lists in topic groups.
This commit is contained in:
parent
ad3ec244e9
commit
d0e8802b9d
1 changed files with 4 additions and 2 deletions
|
@ -619,8 +619,11 @@ bool WhoReadExists(not_null<HistoryItem*> item) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const auto type = DetectSeenType(item);
|
const auto type = DetectSeenType(item);
|
||||||
|
const auto thread = item->topic()
|
||||||
|
? (Data::Thread*)item->topic()
|
||||||
|
: item->history();
|
||||||
const auto unseen = (type == Ui::WhoReadType::Seen)
|
const auto unseen = (type == Ui::WhoReadType::Seen)
|
||||||
? item->unread(item->history())
|
? item->unread(thread)
|
||||||
: item->isUnreadMedia();
|
: item->isUnreadMedia();
|
||||||
if (unseen) {
|
if (unseen) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -630,7 +633,6 @@ bool WhoReadExists(not_null<HistoryItem*> item) {
|
||||||
const auto chat = peer->asChat();
|
const auto chat = peer->asChat();
|
||||||
const auto megagroup = peer->asMegagroup();
|
const auto megagroup = peer->asMegagroup();
|
||||||
if ((!chat && !megagroup)
|
if ((!chat && !megagroup)
|
||||||
|| peer->isForum()
|
|
||||||
|| (megagroup
|
|| (megagroup
|
||||||
&& (megagroup->flags() & ChannelDataFlag::ParticipantsHidden))) {
|
&& (megagroup->flags() & ChannelDataFlag::ParticipantsHidden))) {
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue