2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Move tg:// handlers to a separate module.

Also move joinGroupByHash and stickerSetBox from MainWidget.
This commit is contained in:
John Preston
2018-11-26 15:55:02 +04:00
parent 338129faea
commit 59ecf375b0
30 changed files with 546 additions and 397 deletions

View File

@@ -3030,9 +3030,7 @@ void HistoryWidget::saveEditMsg() {
}
void HistoryWidget::saveEditMsgDone(History *history, const MTPUpdates &updates, mtpRequestId req) {
if (App::main()) {
App::main()->sentUpdatesReceived(updates);
}
Auth().api().applyUpdates(updates);
if (req == _saveEditMsgRequestId) {
_saveEditMsgRequestId = 0;
cancelEdit();
@@ -4778,6 +4776,7 @@ void HistoryWidget::onReportSpamHide() {
void HistoryWidget::onReportSpamClear() {
Expects(_peer != nullptr);
InvokeQueued(App::main(), [peer = _peer] {
if (peer->isUser()) {
App::main()->deleteConversation(peer);
@@ -5967,9 +5966,7 @@ void HistoryWidget::unpinMessage(FullMsgId itemId) {
}
void HistoryWidget::unpinDone(const MTPUpdates &updates) {
if (App::main()) {
App::main()->sentUpdatesReceived(updates);
}
Auth().api().applyUpdates(updates);
}
void HistoryWidget::onPinnedHide() {