2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Show replies dialog correctly.

This commit is contained in:
John Preston
2020-09-11 18:33:26 +03:00
parent 608d8307d9
commit 4a94a0c438
42 changed files with 345 additions and 58 deletions

View File

@@ -541,6 +541,13 @@ void PeerData::fillNames() {
if (localized != english) {
appendToIndex(localized);
}
} else if (isRepliesChat()) {
const auto english = qsl("Replies");
const auto localized = tr::lng_replies_messages(tr::now);
appendToIndex(english);
if (localized != english) {
appendToIndex(localized);
}
}
} else if (const auto channel = asChannel()) {
appendToIndex(channel->username);
@@ -743,6 +750,10 @@ bool PeerData::isBroadcast() const {
return isChannel() ? asChannel()->isBroadcast() : false;
}
bool PeerData::isRepliesChat() const {
return (id == peerFromUser(708513));
}
bool PeerData::canWrite() const {
if (const auto user = asUser()) {
return user->canWrite();