mirror of https://github.com/procxx/kepka.git
Fix alpha version changelog notification.
We should call window->serviceNotification() because it checks for the service chat history being loaded before adding the message. The method in MainWidget was renamed to prevent bugs in the future.
This commit is contained in:
parent
5fe1175602
commit
42febdb240
|
@ -90,7 +90,7 @@ void ApiWrap::addLocalAlphaChangelogs(int oldAppVersion) {
|
|||
auto text = qsl("New in version %1:\n\n").arg(changeVersionString) + QString::fromUtf8(changes).trimmed();
|
||||
auto textWithEntities = TextWithEntities { text };
|
||||
textParseEntities(textWithEntities.text, TextParseLinks, &textWithEntities.entities);
|
||||
App::main()->serviceNotification(textWithEntities, MTP_messageMediaEmpty(), unixtime());
|
||||
App::wnd()->serviceNotification(textWithEntities, MTP_messageMediaEmpty(), unixtime());
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -2088,7 +2088,7 @@ void MainWidget::dialogsCancelled() {
|
|||
_history->activate();
|
||||
}
|
||||
|
||||
void MainWidget::serviceNotification(const TextWithEntities &message, const MTPMessageMedia &media, int32 date) {
|
||||
void MainWidget::insertCheckedServiceNotification(const TextWithEntities &message, const MTPMessageMedia &media, int32 date) {
|
||||
auto flags = MTPDmessage::Flag::f_entities | MTPDmessage::Flag::f_from_id | MTPDmessage_ClientFlag::f_clientside_unread;
|
||||
QString sendingText, leftText = message.text;
|
||||
EntitiesInText sendingEntities, leftEntities = message.entities;
|
||||
|
|
|
@ -325,7 +325,7 @@ public:
|
|||
|
||||
void checkLastUpdate(bool afterSleep);
|
||||
|
||||
void serviceNotification(const TextWithEntities &message, const MTPMessageMedia &media, int32 date);
|
||||
void insertCheckedServiceNotification(const TextWithEntities &message, const MTPMessageMedia &media, int32 date);
|
||||
void serviceHistoryDone(const MTPmessages_Messages &msgs);
|
||||
bool serviceHistoryFail(const RPCError &error);
|
||||
|
||||
|
|
|
@ -276,7 +276,7 @@ void MainWindow::serviceNotification(const TextWithEntities &message, const MTPM
|
|||
return sendServiceHistoryRequest();
|
||||
}
|
||||
|
||||
_main->serviceNotification(message, media, date);
|
||||
_main->insertCheckedServiceNotification(message, media, date);
|
||||
}
|
||||
|
||||
void MainWindow::showDelayedServiceMsgs() {
|
||||
|
|
Loading…
Reference in New Issue