mirror of https://github.com/procxx/kepka.git
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
|
@ -5356,6 +5356,9 @@ void HistoryContact::initDimensions() {
|
||||||
|
|
||||||
if (_userId) {
|
if (_userId) {
|
||||||
_minh = st::msgFileThumbPadding.top() + st::msgFileThumbSize + st::msgFileThumbPadding.bottom();
|
_minh = st::msgFileThumbPadding.top() + st::msgFileThumbSize + st::msgFileThumbPadding.bottom();
|
||||||
|
if (_parent->Has<HistoryMessageSigned>()) {
|
||||||
|
_minh += st::msgDateFont->height - st::msgDateDelta.y();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
_minh = st::msgFilePadding.top() + st::msgFileSize + st::msgFilePadding.bottom();
|
_minh = st::msgFilePadding.top() + st::msgFileSize + st::msgFilePadding.bottom();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1524,8 +1524,8 @@ protected:
|
||||||
// to add required bits to the Composer mask
|
// to add required bits to the Composer mask
|
||||||
// after that always use Has<HistoryMessageDate>()
|
// after that always use Has<HistoryMessageDate>()
|
||||||
bool displayDate() const {
|
bool displayDate() const {
|
||||||
if (HistoryItem *prev = previous()) {
|
if (auto prev = previous()) {
|
||||||
return prev->date.date().day() != date.date().day();
|
return prev->date.date() != date.date();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3724,11 +3724,6 @@ void HistoryWidget::showHistory(const PeerId &peerId, MsgId showAtMsgId, bool re
|
||||||
|
|
||||||
if (_history) {
|
if (_history) {
|
||||||
if (_peer->id == peerId && !reload) {
|
if (_peer->id == peerId && !reload) {
|
||||||
_history->forgetScrollState();
|
|
||||||
if (_migrated) {
|
|
||||||
_migrated->forgetScrollState();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wasOnlyImportant = _history->isChannel() ? _history->asChannelHistory()->onlyImportant() : true;
|
bool wasOnlyImportant = _history->isChannel() ? _history->asChannelHistory()->onlyImportant() : true;
|
||||||
|
|
||||||
bool canShowNow = _history->isReadyFor(showAtMsgId, _fixedInScrollMsgId, _fixedInScrollMsgTop);
|
bool canShowNow = _history->isReadyFor(showAtMsgId, _fixedInScrollMsgId, _fixedInScrollMsgTop);
|
||||||
|
@ -3738,6 +3733,11 @@ void HistoryWidget::showHistory(const PeerId &peerId, MsgId showAtMsgId, bool re
|
||||||
if (!canShowNow) {
|
if (!canShowNow) {
|
||||||
delayedShowAt(showAtMsgId);
|
delayedShowAt(showAtMsgId);
|
||||||
} else {
|
} else {
|
||||||
|
_history->forgetScrollState();
|
||||||
|
if (_migrated) {
|
||||||
|
_migrated->forgetScrollState();
|
||||||
|
}
|
||||||
|
|
||||||
if (_history->isChannel() && wasOnlyImportant != _history->asChannelHistory()->onlyImportant()) {
|
if (_history->isChannel() && wasOnlyImportant != _history->asChannelHistory()->onlyImportant()) {
|
||||||
clearAllLoadRequests();
|
clearAllLoadRequests();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1030,15 +1030,6 @@ void ProfileInner::paintEvent(QPaintEvent *e) {
|
||||||
if (!data) {
|
if (!data) {
|
||||||
data = _participantsData[cnt] = new ParticipantData();
|
data = _participantsData[cnt] = new ParticipantData();
|
||||||
data->name.setText(st::profileListNameFont, user->name, _textNameOptions);
|
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) {
|
if (_peerChat) {
|
||||||
data->admin = (peerFromUser(_peerChat->creator) == user->id) || (_peerChat->adminsEnabled() && (_peerChat->admins.constFind(user) != _peerChat->admins.cend()));
|
data->admin = (peerFromUser(_peerChat->creator) == user->id) || (_peerChat->adminsEnabled() && (_peerChat->admins.constFind(user) != _peerChat->admins.cend()));
|
||||||
} else if (_peerChannel) {
|
} else if (_peerChannel) {
|
||||||
|
@ -1046,6 +1037,15 @@ void ProfileInner::paintEvent(QPaintEvent *e) {
|
||||||
} else {
|
} else {
|
||||||
data->admin = false;
|
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) {
|
if (_amCreator) {
|
||||||
data->cankick = (user != App::self());
|
data->cankick = (user != App::self());
|
||||||
} else if (_peerChat && _peerChat->amAdmin()) {
|
} else if (_peerChat && _peerChat->amAdmin()) {
|
||||||
|
|
Loading…
Reference in New Issue