Do not show edit timer for supergroup admins

This commit is contained in:
RadRussianRus 2019-10-01 18:47:53 +03:00 committed by John Preston
parent 2cb7d76417
commit 684cfa16b8
1 changed files with 6 additions and 0 deletions

View File

@ -6685,6 +6685,12 @@ void HistoryWidget::paintEditHeader(Painter &p, const QRect &rect, int left, int
if (!_replyEditMsg || _replyEditMsg->history()->peer->isSelf()) return;
if (const auto megagroup = _replyEditMsg->history()->peer->asMegagroup()) {
if (megagroup->amCreator() || megagroup->hasAdminRights()) {
return;
}
}
QString editTimeLeftText;
int updateIn = -1;
auto timeSinceMessage = ItemDateTime(_replyEditMsg).msecsTo(QDateTime::currentDateTime());