From ce5739048a8b6f7a63a3d490ca2236466e0c37c4 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 16 Feb 2021 20:34:55 +0400 Subject: [PATCH] Fix build on Xcode. --- Telegram/SourceFiles/calls/calls_group_call.cpp | 6 +++--- Telegram/SourceFiles/data/data_peer.cpp | 4 ++-- Telegram/SourceFiles/history/history_widget.cpp | 8 ++++---- .../ui/controls/delete_message_context_action.cpp | 1 - Telegram/SourceFiles/window/window_session_controller.cpp | 2 +- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Telegram/SourceFiles/calls/calls_group_call.cpp b/Telegram/SourceFiles/calls/calls_group_call.cpp index 14bbe001d..37a7c1967 100644 --- a/Telegram/SourceFiles/calls/calls_group_call.cpp +++ b/Telegram/SourceFiles/calls/calls_group_call.cpp @@ -252,7 +252,7 @@ void GroupCall::start() { hangup(); if (error.type() == u"GROUPCALL_ANONYMOUS_FORBIDDEN"_q) { Ui::ShowMultilineToast({ - .text = tr::lng_group_call_no_anonymous(tr::now), + .text = { tr::lng_group_call_no_anonymous(tr::now) }, }); } }).send(); @@ -368,13 +368,13 @@ void GroupCall::rejoin() { hangup(); Ui::ShowMultilineToast({ - .text = (type == u"GROUPCALL_ANONYMOUS_FORBIDDEN"_q + .text = { type == u"GROUPCALL_ANONYMOUS_FORBIDDEN"_q ? tr::lng_group_call_no_anonymous(tr::now) : type == u"GROUPCALL_PARTICIPANTS_TOO_MUCH"_q ? tr::lng_group_call_too_many(tr::now) : type == u"GROUPCALL_FORBIDDEN"_q ? tr::lng_group_not_accessible(tr::now) - : Lang::Hard::ServerError()), + : Lang::Hard::ServerError() }, }); }).send(); }); diff --git a/Telegram/SourceFiles/data/data_peer.cpp b/Telegram/SourceFiles/data/data_peer.cpp index e3cd50b2c..7b5aef4fe 100644 --- a/Telegram/SourceFiles/data/data_peer.cpp +++ b/Telegram/SourceFiles/data/data_peer.cpp @@ -110,9 +110,9 @@ void PeerClickHandler::onClick(ClickContext context) const { && (!currentPeer->isChannel() || currentPeer->asChannel()->linkedChat() != clickedChannel)) { Ui::ShowMultilineToast({ - .text = (_peer->isMegagroup() + .text = { _peer->isMegagroup() ? tr::lng_group_not_accessible(tr::now) - : tr::lng_channel_not_accessible(tr::now)), + : tr::lng_channel_not_accessible(tr::now) }, }); } else { window->showPeerHistory( diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index b35e0880d..e504f0d82 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -2487,9 +2487,9 @@ void HistoryWidget::messagesFailed(const RPCError &error, int requestId) { auto was = _peer; controller()->showBackFromStack(); Ui::ShowMultilineToast({ - .text = ((was && was->isMegagroup()) + .text = { (was && was->isMegagroup()) ? tr::lng_group_not_accessible(tr::now) - : tr::lng_channel_not_accessible(tr::now)), + : tr::lng_channel_not_accessible(tr::now) }, }); return; } @@ -5594,8 +5594,8 @@ void HistoryWidget::setupGroupCallTracker() { const auto channel = peer->asChannel(); if (channel && channel->amAnonymous()) { Ui::ShowMultilineToast({ - .text = tr::lng_group_call_no_anonymous(tr::now), - }); + .text = { tr::lng_group_call_no_anonymous(tr::now) }, + }); return; } else if (peer->groupCall()) { controller()->startOrJoinGroupCall(peer); diff --git a/Telegram/SourceFiles/ui/controls/delete_message_context_action.cpp b/Telegram/SourceFiles/ui/controls/delete_message_context_action.cpp index bda1c0436..63e5e3ac4 100644 --- a/Telegram/SourceFiles/ui/controls/delete_message_context_action.cpp +++ b/Telegram/SourceFiles/ui/controls/delete_message_context_action.cpp @@ -48,7 +48,6 @@ private: const TimeId _destroyAt = 0; const Fn _destroyByTimerCallback; const crl::time _startedAt = 0; - crl::time _lastCheckAt = 0; base::Timer _refreshTimer; Text::String _text; diff --git a/Telegram/SourceFiles/window/window_session_controller.cpp b/Telegram/SourceFiles/window/window_session_controller.cpp index fbcb5be6d..ae360797e 100644 --- a/Telegram/SourceFiles/window/window_session_controller.cpp +++ b/Telegram/SourceFiles/window/window_session_controller.cpp @@ -940,7 +940,7 @@ void SessionController::startOrJoinGroupCall( const auto channel = peer->asChannel(); if (channel && channel->amAnonymous()) { Ui::ShowMultilineToast({ - .text = tr::lng_group_call_no_anonymous(tr::now), + .text = { tr::lng_group_call_no_anonymous(tr::now) }, }); return; }