mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-26 19:14:02 +02:00
Fixed scroll down to reply. Show that bot admins see all messages.
Fixed date display when messages were at the same day of different months. Shared contact with author signature height increased.
This commit is contained in:
parent
cb025b3aa8
commit
7444a9ad67
4 changed files with 19 additions and 16 deletions
|
@ -5356,6 +5356,9 @@ void HistoryContact::initDimensions() {
|
|||
|
||||
if (_userId) {
|
||||
_minh = st::msgFileThumbPadding.top() + st::msgFileThumbSize + st::msgFileThumbPadding.bottom();
|
||||
if (_parent->Has<HistoryMessageSigned>()) {
|
||||
_minh += st::msgDateFont->height - st::msgDateDelta.y();
|
||||
}
|
||||
} else {
|
||||
_minh = st::msgFilePadding.top() + st::msgFileSize + st::msgFilePadding.bottom();
|
||||
}
|
||||
|
|
|
@ -1524,8 +1524,8 @@ protected:
|
|||
// to add required bits to the Composer mask
|
||||
// after that always use Has<HistoryMessageDate>()
|
||||
bool displayDate() const {
|
||||
if (HistoryItem *prev = previous()) {
|
||||
return prev->date.date().day() != date.date().day();
|
||||
if (auto prev = previous()) {
|
||||
return prev->date.date() != date.date();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -3724,11 +3724,6 @@ void HistoryWidget::showHistory(const PeerId &peerId, MsgId showAtMsgId, bool re
|
|||
|
||||
if (_history) {
|
||||
if (_peer->id == peerId && !reload) {
|
||||
_history->forgetScrollState();
|
||||
if (_migrated) {
|
||||
_migrated->forgetScrollState();
|
||||
}
|
||||
|
||||
bool wasOnlyImportant = _history->isChannel() ? _history->asChannelHistory()->onlyImportant() : true;
|
||||
|
||||
bool canShowNow = _history->isReadyFor(showAtMsgId, _fixedInScrollMsgId, _fixedInScrollMsgTop);
|
||||
|
@ -3738,6 +3733,11 @@ void HistoryWidget::showHistory(const PeerId &peerId, MsgId showAtMsgId, bool re
|
|||
if (!canShowNow) {
|
||||
delayedShowAt(showAtMsgId);
|
||||
} else {
|
||||
_history->forgetScrollState();
|
||||
if (_migrated) {
|
||||
_migrated->forgetScrollState();
|
||||
}
|
||||
|
||||
if (_history->isChannel() && wasOnlyImportant != _history->asChannelHistory()->onlyImportant()) {
|
||||
clearAllLoadRequests();
|
||||
}
|
||||
|
|
|
@ -1030,15 +1030,6 @@ void ProfileInner::paintEvent(QPaintEvent *e) {
|
|||
if (!data) {
|
||||
data = _participantsData[cnt] = new ParticipantData();
|
||||
data->name.setText(st::profileListNameFont, user->name, _textNameOptions);
|
||||
if (user->botInfo) {
|
||||
if (user->botInfo->readsAllHistory) {
|
||||
data->online = lang(lng_status_bot_reads_all);
|
||||
} else {
|
||||
data->online = lang(lng_status_bot_not_reads_all);
|
||||
}
|
||||
} else {
|
||||
data->online = App::onlineText(user, l_time);
|
||||
}
|
||||
if (_peerChat) {
|
||||
data->admin = (peerFromUser(_peerChat->creator) == user->id) || (_peerChat->adminsEnabled() && (_peerChat->admins.constFind(user) != _peerChat->admins.cend()));
|
||||
} else if (_peerChannel) {
|
||||
|
@ -1046,6 +1037,15 @@ void ProfileInner::paintEvent(QPaintEvent *e) {
|
|||
} else {
|
||||
data->admin = false;
|
||||
}
|
||||
if (user->botInfo) {
|
||||
if (user->botInfo->readsAllHistory || data->admin) {
|
||||
data->online = lang(lng_status_bot_reads_all);
|
||||
} else {
|
||||
data->online = lang(lng_status_bot_not_reads_all);
|
||||
}
|
||||
} else {
|
||||
data->online = App::onlineText(user, l_time);
|
||||
}
|
||||
if (_amCreator) {
|
||||
data->cankick = (user != App::self());
|
||||
} else if (_peerChat && _peerChat->amAdmin()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue