diff --git a/Telegram/SourceFiles/api/api_chat_participants.cpp b/Telegram/SourceFiles/api/api_chat_participants.cpp index 6761d2fff..745e0b883 100644 --- a/Telegram/SourceFiles/api/api_chat_participants.cpp +++ b/Telegram/SourceFiles/api/api_chat_participants.cpp @@ -112,8 +112,8 @@ void ApplyLastList( channel->mgInfo->lastAdmins.clear(); channel->mgInfo->lastRestricted.clear(); channel->mgInfo->lastParticipants.clear(); - channel->mgInfo->lastParticipantsStatus = - MegagroupInfo::LastParticipantsUpToDate + channel->mgInfo->lastParticipantsStatus + = MegagroupInfo::LastParticipantsUpToDate | MegagroupInfo::LastParticipantsOnceReceived; auto botStatus = channel->mgInfo->botStatus; diff --git a/Telegram/SourceFiles/api/api_earn.cpp b/Telegram/SourceFiles/api/api_earn.cpp index e8f38e06b..61cfaf10f 100644 --- a/Telegram/SourceFiles/api/api_earn.cpp +++ b/Telegram/SourceFiles/api/api_earn.cpp @@ -58,10 +58,10 @@ void HandleWithdrawalButton( state->loading = false; auto fields = PasscodeBox::CloudFields::From(pass); - fields.customTitle = - tr::lng_channel_earn_balance_password_title(); - fields.customDescription = - tr::lng_channel_earn_balance_password_description(tr::now); + fields.customTitle + = tr::lng_channel_earn_balance_password_title(); + fields.customDescription + = tr::lng_channel_earn_balance_password_description(tr::now); fields.customSubmitButton = tr::lng_passcode_submit(); fields.customCheckCallback = crl::guard(button, [=]( const Core::CloudPasswordResult &result) { diff --git a/Telegram/SourceFiles/api/api_editing.cpp b/Telegram/SourceFiles/api/api_editing.cpp index 84f0cbfff..1dba418dd 100644 --- a/Telegram/SourceFiles/api/api_editing.cpp +++ b/Telegram/SourceFiles/api/api_editing.cpp @@ -29,20 +29,20 @@ namespace { using namespace rpl::details; template -constexpr auto WithId = - is_callable_plain_v, mtpRequestId>; +constexpr auto WithId + = is_callable_plain_v, mtpRequestId>; template -constexpr auto WithoutId = - is_callable_plain_v>; +constexpr auto WithoutId + = is_callable_plain_v>; template -constexpr auto WithoutCallback = - is_callable_plain_v; +constexpr auto WithoutCallback + = is_callable_plain_v; template -constexpr auto ErrorWithId = - is_callable_plain_v; +constexpr auto ErrorWithId + = is_callable_plain_v; template -constexpr auto ErrorWithoutId = - is_callable_plain_v; +constexpr auto ErrorWithoutId + = is_callable_plain_v; template mtpRequestId EditMessage( diff --git a/Telegram/SourceFiles/api/api_user_privacy.cpp b/Telegram/SourceFiles/api/api_user_privacy.cpp index b27580aaa..d0c17fa6b 100644 --- a/Telegram/SourceFiles/api/api_user_privacy.cpp +++ b/Telegram/SourceFiles/api/api_user_privacy.cpp @@ -307,8 +307,8 @@ void UserPrivacy::reload(Key key) { } void UserPrivacy::pushPrivacy(Key key, const TLRules &rules) { - const auto &saved = (_privacyValues[key] = - TLToRules(rules, _session->data())); + const auto &saved + = (_privacyValues[key] = TLToRules(rules, _session->data())); const auto i = _privacyChanges.find(key); if (i != end(_privacyChanges)) { i->second.fire_copy(saved); diff --git a/Telegram/SourceFiles/apiwrap.cpp b/Telegram/SourceFiles/apiwrap.cpp index b8919617d..20c52fbdd 100644 --- a/Telegram/SourceFiles/apiwrap.cpp +++ b/Telegram/SourceFiles/apiwrap.cpp @@ -1544,8 +1544,8 @@ void ApiWrap::saveStickerSets( writeRecent = true; } - const auto isAttached = - (removedSetId == Data::Stickers::CloudRecentAttachedSetId); + const auto isAttached + = (removedSetId == Data::Stickers::CloudRecentAttachedSetId); const auto flags = isAttached ? MTPmessages_ClearRecentStickers::Flag::f_attached : MTPmessages_ClearRecentStickers::Flags(0); @@ -2494,8 +2494,8 @@ void ApiWrap::refreshFileReference( }, [&](Data::FileOriginPeerPhoto data) { fail(); }, [&](Data::FileOriginStickerSet data) { - const auto isRecentAttached = - (data.setId == Data::Stickers::CloudRecentAttachedSetId); + const auto isRecentAttached + = (data.setId == Data::Stickers::CloudRecentAttachedSetId); if (data.setId == Data::Stickers::CloudRecentSetId || data.setId == Data::Stickers::RecentSetId || isRecentAttached) { diff --git a/Telegram/SourceFiles/boxes/add_contact_box.cpp b/Telegram/SourceFiles/boxes/add_contact_box.cpp index ba35e8d98..45d4b1e99 100644 --- a/Telegram/SourceFiles/boxes/add_contact_box.cpp +++ b/Telegram/SourceFiles/boxes/add_contact_box.cpp @@ -605,8 +605,8 @@ void GroupInfoBox::prepare() { _navigation->session().api().selfDestruct().reload(); const auto top = addTopButton(st::infoTopBarMenu); - const auto menu = - top->lifetime().make_state>(); + const auto menu + = top->lifetime().make_state>(); top->setClickedCallback([=] { *menu = base::make_unique_q( top, @@ -1306,8 +1306,8 @@ void SetupChannelBox::handleChange() { && (ch < 'a' || ch > 'z') && (ch < '0' || ch > '9') && ch != '_') { - const auto badSymbols = - tr::lng_create_channel_link_bad_symbols(tr::now); + const auto badSymbols + = tr::lng_create_channel_link_bad_symbols(tr::now); if (_errorText != badSymbols) { _errorText = badSymbols; update(); @@ -1317,8 +1317,8 @@ void SetupChannelBox::handleChange() { } } if (name.size() < Ui::EditPeer::kMinUsernameLength) { - const auto tooShort = - tr::lng_create_channel_link_too_short(tr::now); + const auto tooShort + = tr::lng_create_channel_link_too_short(tr::now); if (_errorText != tooShort) { _errorText = tooShort; update(); diff --git a/Telegram/SourceFiles/boxes/delete_messages_box.cpp b/Telegram/SourceFiles/boxes/delete_messages_box.cpp index 0a939ace6..1def53870 100644 --- a/Telegram/SourceFiles/boxes/delete_messages_box.cpp +++ b/Telegram/SourceFiles/boxes/delete_messages_box.cpp @@ -232,8 +232,8 @@ void DeleteMessagesBox::prepare() { if (hasScheduledMessages()) { } else if (auto revoke = revokeText(peer)) { const auto &settings = Core::App().settings(); - const auto revokeByDefault = - !settings.rememberedDeleteMessageOnlyForYou(); + const auto revokeByDefault + = !settings.rememberedDeleteMessageOnlyForYou(); _revoke.create( this, revoke->checkbox, diff --git a/Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp b/Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp index 31faabec1..a1ee68248 100644 --- a/Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp +++ b/Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp @@ -983,8 +983,8 @@ void Controller::fillHistoryVisibilityButton() { : HistoryVisibility::Visible; _channelHasLocationOriginalValue = channel && channel->hasLocation(); - const auto updateHistoryVisibility = - std::make_shared>(); + const auto updateHistoryVisibility + = std::make_shared>(); const auto boxCallback = crl::guard(this, [=](HistoryVisibility checked) { updateHistoryVisibility->fire(std::move(checked)); @@ -1698,8 +1698,8 @@ void Controller::saveUsernamesOrder() { channel->setUsernames(ranges::views::all( newUsernames ) | ranges::views::transform([&](QString username) { - const auto editable = - (channel->editableUsername() == username); + const auto editable + = (channel->editableUsername() == username); return Data::Username{ .username = std::move(username), .active = true, diff --git a/Telegram/SourceFiles/boxes/premium_preview_box.cpp b/Telegram/SourceFiles/boxes/premium_preview_box.cpp index 67e402da5..da1ab9064 100644 --- a/Telegram/SourceFiles/boxes/premium_preview_box.cpp +++ b/Telegram/SourceFiles/boxes/premium_preview_box.cpp @@ -1240,8 +1240,8 @@ void DecorateListPromoBox( box->setStyle(st::premiumPreviewDoubledLimitsBox); box->widthValue( ) | rpl::start_with_next([=](int width) { - const auto &padding = - st::premiumPreviewDoubledLimitsBox.buttonPadding; + const auto &padding + = st::premiumPreviewDoubledLimitsBox.buttonPadding; button->resizeToWidth(width - padding.left() - padding.right()); diff --git a/Telegram/SourceFiles/boxes/sticker_set_box.cpp b/Telegram/SourceFiles/boxes/sticker_set_box.cpp index 414f098e2..88163356c 100644 --- a/Telegram/SourceFiles/boxes/sticker_set_box.cpp +++ b/Telegram/SourceFiles/boxes/sticker_set_box.cpp @@ -569,8 +569,8 @@ void StickerSetBox::updateButtons() { if (!_inner->shortName().isEmpty()) { const auto top = addTopButton(st::infoTopBarMenu); - const auto menu = - std::make_shared>(); + const auto menu + = std::make_shared>(); top->setClickedCallback([=] { *menu = base::make_unique_q( top, @@ -613,8 +613,8 @@ void StickerSetBox::updateButtons() { _show->showBox(std::move(box)); } }; - const auto menu = - std::make_shared>(); + const auto menu + = std::make_shared>(); top->setClickedCallback([=] { *menu = base::make_unique_q( top, diff --git a/Telegram/SourceFiles/calls/calls_call.cpp b/Telegram/SourceFiles/calls/calls_call.cpp index 3f6c2a7a8..3a3e68b47 100644 --- a/Telegram/SourceFiles/calls/calls_call.cpp +++ b/Telegram/SourceFiles/calls/calls_call.cpp @@ -945,8 +945,8 @@ void Call::createAndStartController(const MTPDphoneCall &call) { tgcalls::Descriptor descriptor = { .version = versionString, .config = tgcalls::Config{ - .initializationTimeout = - serverConfig.callConnectTimeoutMs / 1000., + .initializationTimeout + = serverConfig.callConnectTimeoutMs / 1000., .receiveTimeout = serverConfig.callPacketTimeoutMs / 1000., .dataSaving = tgcalls::DataSaving::Never, .enableP2P = call.is_p2p_allowed(), diff --git a/Telegram/SourceFiles/calls/calls_call.h b/Telegram/SourceFiles/calls/calls_call.h index 55f48237a..0a99c8067 100644 --- a/Telegram/SourceFiles/calls/calls_call.h +++ b/Telegram/SourceFiles/calls/calls_call.h @@ -277,11 +277,11 @@ private: MTP::Sender _api; Type _type = Type::Outgoing; rpl::variable _state = State::Starting; - rpl::variable _remoteAudioState = - RemoteAudioState::Active; + rpl::variable _remoteAudioState + = RemoteAudioState::Active; rpl::variable _remoteVideoState; - rpl::variable _remoteBatteryState = - RemoteBatteryState::Normal; + rpl::variable _remoteBatteryState + = RemoteBatteryState::Normal; rpl::event_stream _errors; FinishType _finishAfterRequestingCall = FinishType::None; bool _answerAfterDhConfigReceived = false; diff --git a/Telegram/SourceFiles/calls/calls_panel.h b/Telegram/SourceFiles/calls/calls_panel.h index f6c8666d8..11c6dceae 100644 --- a/Telegram/SourceFiles/calls/calls_panel.h +++ b/Telegram/SourceFiles/calls/calls_panel.h @@ -162,8 +162,8 @@ private: object_ptr _status; object_ptr _fingerprint = { nullptr }; object_ptr> _remoteAudioMute = { nullptr }; - object_ptr> _remoteLowBattery = - { nullptr }; + object_ptr> _remoteLowBattery + = { nullptr }; std::unique_ptr _userpic; std::unique_ptr _outgoingVideoBubble; QPixmap _bottomShadow; diff --git a/Telegram/SourceFiles/calls/group/calls_volume_item.cpp b/Telegram/SourceFiles/calls/group/calls_volume_item.cpp index 5942a97e7..d34a51060 100644 --- a/Telegram/SourceFiles/calls/group/calls_volume_item.cpp +++ b/Telegram/SourceFiles/calls/group/calls_volume_item.cpp @@ -25,8 +25,8 @@ const auto kSpeakerThreshold = std::vector{ 50.0f / kMaxVolumePercent, 150.0f / kMaxVolumePercent }; -constexpr auto kVolumeStickedValues = - std::array, 7>{{ +constexpr auto kVolumeStickedValues + = std::array, 7>{{ { 25. / kMaxVolumePercent, 2. / kMaxVolumePercent }, { 50. / kMaxVolumePercent, 2. / kMaxVolumePercent }, { 75. / kMaxVolumePercent, 2. / kMaxVolumePercent }, @@ -93,8 +93,8 @@ MenuVolumeItem::MenuVolumeItem( const auto volume = _localMuted ? 0 : base::SafeRound(_slider->value() * kMaxVolumePercent); - const auto muteProgress = - _crossLineAnimation.value((!volume) ? 1. : 0.); + const auto muteProgress + = _crossLineAnimation.value((!volume) ? 1. : 0.); const auto selected = isSelected(); p.fillRect(clip, selected ? st.itemBgOver : st.itemBg); @@ -174,8 +174,8 @@ MenuVolumeItem::MenuVolumeItem( return; } if (_waitingForUpdateVolume) { - const auto localVolume = - base::SafeRound(_slider->value() * _maxVolume); + const auto localVolume + = base::SafeRound(_slider->value() * _maxVolume); if ((localVolume != newVolume) && (_cloudVolume == newVolume)) { _changeVolumeRequests.fire(int(localVolume)); diff --git a/Telegram/SourceFiles/chat_helpers/field_autocomplete.cpp b/Telegram/SourceFiles/chat_helpers/field_autocomplete.cpp index e82ab9b9f..9bc6e88f2 100644 --- a/Telegram/SourceFiles/chat_helpers/field_autocomplete.cpp +++ b/Telegram/SourceFiles/chat_helpers/field_autocomplete.cpp @@ -437,8 +437,8 @@ void FieldAutocomplete::updateFiltered(bool resetScroll) { auto filterNotPassedByUsername = [this](UserData *user) -> bool { if (PrimaryUsername(user).startsWith(_filter, Qt::CaseInsensitive)) { - const auto exactUsername = - (PrimaryUsername(user).size() == _filter.size()); + const auto exactUsername + = (PrimaryUsername(user).size() == _filter.size()); return exactUsername; } return true; @@ -446,8 +446,9 @@ void FieldAutocomplete::updateFiltered(bool resetScroll) { auto filterNotPassedByName = [&](UserData *user) -> bool { for (const auto &nameWord : user->nameWords()) { if (nameWord.startsWith(_filter, Qt::CaseInsensitive)) { - const auto exactUsername = - (PrimaryUsername(user).compare(_filter, Qt::CaseInsensitive) == 0); + const auto exactUsername = PrimaryUsername(user).compare( + _filter, + Qt::CaseInsensitive) == 0; return exactUsername; } } diff --git a/Telegram/SourceFiles/core/application.cpp b/Telegram/SourceFiles/core/application.cpp index 3f643b6dd..917baf16e 100644 --- a/Telegram/SourceFiles/core/application.cpp +++ b/Telegram/SourceFiles/core/application.cpp @@ -933,8 +933,8 @@ void Application::handleAppDeactivated() { } rpl::producer Application::appDeactivatedValue() const { - const auto &app = - static_cast(QCoreApplication::instance()); + const auto &app + = static_cast(QCoreApplication::instance()); return rpl::single( app->applicationState() ) | rpl::then( diff --git a/Telegram/SourceFiles/core/core_cloud_password.cpp b/Telegram/SourceFiles/core/core_cloud_password.cpp index 3a65f24d5..a835112dc 100644 --- a/Telegram/SourceFiles/core/core_cloud_password.cpp +++ b/Telegram/SourceFiles/core/core_cloud_password.cpp @@ -313,8 +313,8 @@ CloudPasswordState ParseCloudPasswordState( ParseCloudPasswordAlgo(data.vnew_algo())); result.mtp.newSecureSecret = ValidateNewSecureSecretAlgo( ParseSecureSecretAlgo(data.vnew_secure_algo())); - result.unconfirmedPattern = - qs(data.vemail_unconfirmed_pattern().value_or_empty()); + result.unconfirmedPattern = qs( + data.vemail_unconfirmed_pattern().value_or_empty()); result.pendingResetDate = data.vpending_reset_date().value_or_empty(); result.outdatedClient = [&] { diff --git a/Telegram/SourceFiles/core/core_settings.h b/Telegram/SourceFiles/core/core_settings.h index 93e0727d7..12b7fa431 100644 --- a/Telegram/SourceFiles/core/core_settings.h +++ b/Telegram/SourceFiles/core/core_settings.h @@ -984,8 +984,8 @@ private: #else // Q_OS_MAC bool _hardwareAcceleratedVideo = false; #endif // Q_OS_MAC - HistoryView::DoubleClickQuickAction _chatQuickAction = - HistoryView::DoubleClickQuickAction(); + HistoryView::DoubleClickQuickAction _chatQuickAction + = HistoryView::DoubleClickQuickAction(); bool _translateButtonEnabled = false; rpl::variable _translateChatEnabled = true; rpl::variable _translateToRaw = 0; diff --git a/Telegram/SourceFiles/data/data_poll.cpp b/Telegram/SourceFiles/data/data_poll.cpp index f781f95bc..800f3ee32 100644 --- a/Telegram/SourceFiles/data/data_poll.cpp +++ b/Telegram/SourceFiles/data/data_poll.cpp @@ -121,8 +121,8 @@ bool PollData::applyResults(const MTPPollResults &results) { return results.match([&](const MTPDpollResults &results) { _lastResultsUpdate = crl::now(); - const auto newTotalVoters = - results.vtotal_voters().value_or(totalVoters); + const auto newTotalVoters + = results.vtotal_voters().value_or(totalVoters); auto changed = (newTotalVoters != totalVoters); if (const auto list = results.vresults()) { for (const auto &result : list->v) { diff --git a/Telegram/SourceFiles/data/data_statistics_chart.h b/Telegram/SourceFiles/data/data_statistics_chart.h index 2354e9e4d..fba664d34 100644 --- a/Telegram/SourceFiles/data/data_statistics_chart.h +++ b/Telegram/SourceFiles/data/data_statistics_chart.h @@ -37,8 +37,8 @@ struct StatisticalChart { QString idString; QString name; Statistic::ChartValue maxValue = 0; - Statistic::ChartValue minValue = - std::numeric_limits::max(); + Statistic::ChartValue minValue + = std::numeric_limits::max(); QString colorKey; QColor color; QColor colorDark; @@ -57,8 +57,8 @@ struct StatisticalChart { } defaultZoomXIndex; Statistic::ChartValue maxValue = 0; - Statistic::ChartValue minValue = - std::numeric_limits::max(); + Statistic::ChartValue minValue + = std::numeric_limits::max(); float64 oneDayPercentage = 0.; diff --git a/Telegram/SourceFiles/dialogs/dialogs_widget.cpp b/Telegram/SourceFiles/dialogs/dialogs_widget.cpp index 8ac5c91b3..873b15324 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_widget.cpp +++ b/Telegram/SourceFiles/dialogs/dialogs_widget.cpp @@ -770,8 +770,8 @@ void Widget::updateScrollUpPosition() { _scrollToTop->moveToRight( st::historyToDownPosition.x(), _scroll->height() - top); - const auto shouldBeHidden = - !_scrollToTopIsShown && !_scrollToTopShown.animating(); + const auto shouldBeHidden + = !_scrollToTopIsShown && !_scrollToTopShown.animating(); if (shouldBeHidden != _scrollToTop->isHidden()) { _scrollToTop->setVisible(!shouldBeHidden); } diff --git a/Telegram/SourceFiles/editor/photo_editor_content.cpp b/Telegram/SourceFiles/editor/photo_editor_content.cpp index 065b2a1a6..1a379b9b3 100644 --- a/Telegram/SourceFiles/editor/photo_editor_content.cpp +++ b/Telegram/SourceFiles/editor/photo_editor_content.cpp @@ -48,8 +48,8 @@ PhotoEditorContent::PhotoEditorContent( return; } const auto imageSizeF = [&] { - const auto rotatedSize = - FlipSizeByRotation(size, mods.angle); + const auto rotatedSize + = FlipSizeByRotation(size, mods.angle); const auto m = _crop->cropMargins(); const auto sizeForCrop = rotatedSize - QSize(m.left() + m.right(), m.top() + m.bottom()); diff --git a/Telegram/SourceFiles/export/export_api_wrap.cpp b/Telegram/SourceFiles/export/export_api_wrap.cpp index b50c105f3..69861015c 100644 --- a/Telegram/SourceFiles/export/export_api_wrap.cpp +++ b/Telegram/SourceFiles/export/export_api_wrap.cpp @@ -541,8 +541,8 @@ void ApiWrap::requestDialogsCount() { Expects(_startProcess != nullptr); if (_settings->onlySinglePeer()) { - _startProcess->info.dialogsCount = - (_settings->singlePeer.type() == mtpc_inputPeerChannel + _startProcess->info.dialogsCount + = (_settings->singlePeer.type() == mtpc_inputPeerChannel ? 1 : _splits.size()); sendNextStartRequest(); diff --git a/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp b/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp index 5899117be..53e0926e0 100644 --- a/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp +++ b/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp @@ -738,8 +738,8 @@ void GenerateItems( using LogPromote = MTPDchannelAdminLogEventActionParticipantToggleAdmin; using LogSticker = MTPDchannelAdminLogEventActionChangeStickerSet; using LogEmoji = MTPDchannelAdminLogEventActionChangeEmojiStickerSet; - using LogPreHistory = - MTPDchannelAdminLogEventActionTogglePreHistoryHidden; + using LogPreHistory + = MTPDchannelAdminLogEventActionTogglePreHistoryHidden; using LogPermissions = MTPDchannelAdminLogEventActionDefaultBannedRights; using LogPoll = MTPDchannelAdminLogEventActionStopPoll; using LogDiscussion = MTPDchannelAdminLogEventActionChangeLinkedChat; @@ -749,19 +749,19 @@ void GenerateItems( using LogDiscardCall = MTPDchannelAdminLogEventActionDiscardGroupCall; using LogMute = MTPDchannelAdminLogEventActionParticipantMute; using LogUnmute = MTPDchannelAdminLogEventActionParticipantUnmute; - using LogCallSetting = - MTPDchannelAdminLogEventActionToggleGroupCallSetting; - using LogJoinByInvite = - MTPDchannelAdminLogEventActionParticipantJoinByInvite; - using LogInviteDelete = - MTPDchannelAdminLogEventActionExportedInviteDelete; - using LogInviteRevoke = - MTPDchannelAdminLogEventActionExportedInviteRevoke; + using LogCallSetting + = MTPDchannelAdminLogEventActionToggleGroupCallSetting; + using LogJoinByInvite + = MTPDchannelAdminLogEventActionParticipantJoinByInvite; + using LogInviteDelete + = MTPDchannelAdminLogEventActionExportedInviteDelete; + using LogInviteRevoke + = MTPDchannelAdminLogEventActionExportedInviteRevoke; using LogInviteEdit = MTPDchannelAdminLogEventActionExportedInviteEdit; using LogVolume = MTPDchannelAdminLogEventActionParticipantVolume; using LogTTL = MTPDchannelAdminLogEventActionChangeHistoryTTL; - using LogJoinByRequest = - MTPDchannelAdminLogEventActionParticipantJoinByRequest; + using LogJoinByRequest + = MTPDchannelAdminLogEventActionParticipantJoinByRequest; using LogNoForwards = MTPDchannelAdminLogEventActionToggleNoForwards; using LogSendMessage = MTPDchannelAdminLogEventActionSendMessage; using LogChangeAvailableReactions = MTPDchannelAdminLogEventActionChangeAvailableReactions; diff --git a/Telegram/SourceFiles/history/history_drag_area.cpp b/Telegram/SourceFiles/history/history_drag_area.cpp index 39ba5fe3c..4f99ec778 100644 --- a/Telegram/SourceFiles/history/history_drag_area.cpp +++ b/Telegram/SourceFiles/history/history_drag_area.cpp @@ -52,8 +52,8 @@ DragArea::Areas DragArea::SetupDragAreaToContainer( auto &lifetime = container->lifetime(); container->setAcceptDrops(true); - const auto attachDragDocument = - Ui::CreateChild(container.get()); + const auto attachDragDocument + = Ui::CreateChild(container.get()); const auto attachDragPhoto = Ui::CreateChild(container.get()); attachDragDocument->hide(); @@ -62,8 +62,8 @@ DragArea::Areas DragArea::SetupDragAreaToContainer( attachDragDocument->raise(); attachDragPhoto->raise(); - const auto attachDragState = - lifetime.make_state(DragState::None); + const auto attachDragState + = lifetime.make_state(DragState::None); const auto width = [=] { return container->width(); diff --git a/Telegram/SourceFiles/history/history_drag_area.h b/Telegram/SourceFiles/history/history_drag_area.h index 64e581d58..c9c075c5a 100644 --- a/Telegram/SourceFiles/history/history_drag_area.h +++ b/Telegram/SourceFiles/history/history_drag_area.h @@ -23,8 +23,8 @@ public: DragArea *photo; }; - using CallbackComputeState = - Fn; + using CallbackComputeState + = Fn; static Areas SetupDragAreaToContainer( not_null container, diff --git a/Telegram/SourceFiles/history/view/controls/history_view_voice_record_bar.cpp b/Telegram/SourceFiles/history/view/controls/history_view_voice_record_bar.cpp index aa0c740da..ade1c9eec 100644 --- a/Telegram/SourceFiles/history/view/controls/history_view_voice_record_bar.cpp +++ b/Telegram/SourceFiles/history/view/controls/history_view_voice_record_bar.cpp @@ -372,8 +372,8 @@ TTLButton::TTLButton( return (r.left() + r.width() > parentWidget()->width()); }) | rpl::distinct_until_changed( ) | rpl::start_with_next([=](bool toHide) { - const auto isFirstTooltip = - !Core::App().settings().ttlVoiceClickTooltipHidden(); + const auto isFirstTooltip + = !Core::App().settings().ttlVoiceClickTooltipHidden(); if (isFirstTooltip || (!isFirstTooltip && toHide)) { _tooltip->toggleAnimated(!toHide); } diff --git a/Telegram/SourceFiles/history/view/history_view_list_widget.cpp b/Telegram/SourceFiles/history/view/history_view_list_widget.cpp index 23b7c0be3..dc1255e2c 100644 --- a/Telegram/SourceFiles/history/view/history_view_list_widget.cpp +++ b/Telegram/SourceFiles/history/view/history_view_list_widget.cpp @@ -3898,8 +3898,8 @@ bool ListWidget::lastMessageEditRequestNotify() const { if (it == end(list)) { return false; } else { - const auto item = - session().data().groups().findItemToEdit((*it)->data()).get(); + const auto item + = session().data().groups().findItemToEdit((*it)->data()).get(); editMessageRequestNotify(item->fullId()); return true; } diff --git a/Telegram/SourceFiles/history/view/history_view_message.cpp b/Telegram/SourceFiles/history/view/history_view_message.cpp index 100fff459..3a94363e2 100644 --- a/Telegram/SourceFiles/history/view/history_view_message.cpp +++ b/Telegram/SourceFiles/history/view/history_view_message.cpp @@ -1849,8 +1849,8 @@ void Message::clickHandlerPressedChanged( if (pressed) { if (!_rightAction->second->ripple) { // Create a ripple. - _rightAction->second->ripple = - std::make_unique( + _rightAction->second->ripple + = std::make_unique( st::defaultRippleAnimation, Ui::RippleAnimation::RoundRectMask( Size(rightSize->width()), diff --git a/Telegram/SourceFiles/history/view/history_view_send_action.cpp b/Telegram/SourceFiles/history/view/history_view_send_action.cpp index 5380ccfb5..460941e6d 100644 --- a/Telegram/SourceFiles/history/view/history_view_send_action.cpp +++ b/Telegram/SourceFiles/history/view/history_view_send_action.cpp @@ -150,8 +150,8 @@ bool SendActionPainter::paint( const auto extraAnimationWidth = _animationLeft ? animationWidth * 2 : 0; - const auto left = - (availableWidth < _animationLeft + extraAnimationWidth) + const auto left + = (availableWidth < _animationLeft + extraAnimationWidth) ? 0 : _animationLeft; _sendActionAnimation.paint( diff --git a/Telegram/SourceFiles/history/view/media/history_view_web_page.cpp b/Telegram/SourceFiles/history/view/media/history_view_web_page.cpp index fbd61a00e..c275e3b35 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_web_page.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_web_page.cpp @@ -496,8 +496,8 @@ QSize WebPage::countOptimalSize() { minHeight = resizeGetHeight(maxWidth); } if (_sponsoredData && _sponsoredData->canReport) { - _sponsoredData->widthBeforeHint = - st::webPageTitleStyle.font->width(siteName); + _sponsoredData->widthBeforeHint + = st::webPageTitleStyle.font->width(siteName); const auto &font = st::webPageSponsoredHintFont; _sponsoredData->hintSize = QSize( font->width(tr::lng_sponsored_message_revenue_button(tr::now)) diff --git a/Telegram/SourceFiles/info/info_top_bar.cpp b/Telegram/SourceFiles/info/info_top_bar.cpp index 1e5f34c2f..2caa1ffa8 100644 --- a/Telegram/SourceFiles/info/info_top_bar.cpp +++ b/Telegram/SourceFiles/info/info_top_bar.cpp @@ -683,13 +683,13 @@ void TopBar::createSelectionControls() { _selectionActionRequests, _cancelSelection->lifetime()); _delete->entity()->setVisible(_canDelete); - const auto archive = - _toggleStoryPin = wrap(Ui::CreateChild>( - this, - object_ptr( + const auto archive = _toggleStoryPin = wrap( + Ui::CreateChild>( this, - _storiesArchive ? _st.storiesSave : _st.storiesArchive), - st::infoTopBarScale)); + object_ptr( + this, + _storiesArchive ? _st.storiesSave : _st.storiesArchive), + st::infoTopBarScale)); registerToggleControlCallback( _toggleStoryPin.data(), [this] { return selectionMode() && _canToggleStoryPin; }); diff --git a/Telegram/SourceFiles/info/media/info_media_list_widget.cpp b/Telegram/SourceFiles/info/media/info_media_list_widget.cpp index 1a42e6379..4e30f0b09 100644 --- a/Telegram/SourceFiles/info/media/info_media_list_widget.cpp +++ b/Telegram/SourceFiles/info/media/info_media_list_widget.cpp @@ -814,8 +814,8 @@ void ListWidget::paintEvent(QPaintEvent *e) { } if (_dateBadge->goodType && clip.intersects(_dateBadge->rect)) { - const auto scrollDateOpacity = - _dateBadge->opacity.value(_dateBadge->shown ? 1. : 0.); + const auto scrollDateOpacity + = _dateBadge->opacity.value(_dateBadge->shown ? 1. : 0.); if (scrollDateOpacity > 0.) { p.setOpacity(scrollDateOpacity); if (_dateBadge->corners.p[0].isNull()) { diff --git a/Telegram/SourceFiles/mainwindow.cpp b/Telegram/SourceFiles/mainwindow.cpp index 5e8724b37..93d6d3060 100644 --- a/Telegram/SourceFiles/mainwindow.cpp +++ b/Telegram/SourceFiles/mainwindow.cpp @@ -77,8 +77,8 @@ base::options::toggle AutoScrollInactiveChat({ } // namespace -const char kOptionAutoScrollInactiveChat[] = - "auto-scroll-inactive-chat"; +const char kOptionAutoScrollInactiveChat[] + = "auto-scroll-inactive-chat"; MainWindow::MainWindow(not_null controller) : Platform::MainWindow(controller) { diff --git a/Telegram/SourceFiles/media/player/media_player_dropdown.cpp b/Telegram/SourceFiles/media/player/media_player_dropdown.cpp index c00765cf8..073ae2531 100644 --- a/Telegram/SourceFiles/media/player/media_player_dropdown.cpp +++ b/Telegram/SourceFiles/media/player/media_player_dropdown.cpp @@ -35,8 +35,8 @@ constexpr auto kSpeedDebounceTimeout = crl::time(1000); return base::SafeRound(speed * 10) / 10.; } -constexpr auto kSpeedStickedValues = - std::array, 7>{{ +constexpr auto kSpeedStickedValues + = std::array, 7>{{ { 0.8, 0.05 }, { 1.0, 0.05 }, { 1.2, 0.05 }, diff --git a/Telegram/SourceFiles/media/system_media_controls_manager.cpp b/Telegram/SourceFiles/media/system_media_controls_manager.cpp index d16685860..91f016aa5 100644 --- a/Telegram/SourceFiles/media/system_media_controls_manager.cpp +++ b/Telegram/SourceFiles/media/system_media_controls_manager.cpp @@ -44,8 +44,8 @@ bool SystemMediaControlsManager::Supported() { SystemMediaControlsManager::SystemMediaControlsManager() : _controls(std::make_unique()) { - using PlaybackStatus = - base::Platform::SystemMediaControls::PlaybackStatus; + using PlaybackStatus + = base::Platform::SystemMediaControls::PlaybackStatus; using Command = base::Platform::SystemMediaControls::Command; _controls->setApplicationName(AppName.utf16()); diff --git a/Telegram/SourceFiles/passport/passport_form_controller.cpp b/Telegram/SourceFiles/passport/passport_form_controller.cpp index 980888ffb..b0ad0fcdf 100644 --- a/Telegram/SourceFiles/passport/passport_form_controller.cpp +++ b/Telegram/SourceFiles/passport/passport_form_controller.cpp @@ -2686,8 +2686,8 @@ bool FormController::applyPassword(const MTPDaccount_password &result) { settings.notEmptyPassport = result.is_has_secure_values(); settings.request = Core::ParseCloudPasswordCheckRequest(result); settings.unknownAlgo = result.vcurrent_algo() && !settings.request; - settings.unconfirmedPattern = - qs(result.vemail_unconfirmed_pattern().value_or_empty()); + settings.unconfirmedPattern = qs( + result.vemail_unconfirmed_pattern().value_or_empty()); settings.newAlgo = Core::ValidateNewCloudPasswordAlgo( Core::ParseCloudPasswordAlgo(result.vnew_algo())); settings.newSecureAlgo = Core::ValidateNewSecureSecretAlgo( diff --git a/Telegram/SourceFiles/passport/passport_panel_controller.h b/Telegram/SourceFiles/passport/passport_panel_controller.h index 94cd418c8..5c3d296b4 100644 --- a/Telegram/SourceFiles/passport/passport_panel_controller.h +++ b/Telegram/SourceFiles/passport/passport_panel_controller.h @@ -26,8 +26,8 @@ struct EditContactScheme; enum class ReadScanError; -using preferredLangCallback = - Fn(const QString &)>; +using preferredLangCallback + = Fn(const QString &)>; EditDocumentScheme GetDocumentScheme( Scope::Type type, std::optional scansType, diff --git a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp index 0ea48a7de..747e4c2fa 100644 --- a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp @@ -315,19 +315,19 @@ bool NotificationData::init( _actions.push_back("inline-reply"); _actions.push_back(tr::lng_notification_reply(tr::now).toStdString()); - _notificationRepliedSignalId = - _interface.signal_notification_replied().connect([=]( - XdgNotifications::Notifications, - uint id, - std::string text) { - Core::Sandbox::Instance().customEnterFromEventLoop([&] { - if (id == _notificationId) { - _manager->notificationReplied( - _id, - { QString::fromStdString(text), {} }); - } + _notificationRepliedSignalId + = _interface.signal_notification_replied().connect([=]( + XdgNotifications::Notifications, + uint id, + std::string text) { + Core::Sandbox::Instance().customEnterFromEventLoop([&] { + if (id == _notificationId) { + _manager->notificationReplied( + _id, + { QString::fromStdString(text), {} }); + } + }); }); - }); } _actionInvokedSignalId = _interface.signal_action_invoked().connect([=]( diff --git a/Telegram/SourceFiles/platform/mac/touchbar/items/mac_pinned_chats_item.mm b/Telegram/SourceFiles/platform/mac/touchbar/items/mac_pinned_chats_item.mm index 477075719..ca4f88dad 100644 --- a/Telegram/SourceFiles/platform/mac/touchbar/items/mac_pinned_chats_item.mm +++ b/Telegram/SourceFiles/platform/mac/touchbar/items/mac_pinned_chats_item.mm @@ -551,13 +551,11 @@ NSRect PeerRectByIndex(int index) { const auto processOnline = [=](const auto &pin) { // TODO: this should be replaced // with the global application timer for online statuses. - const auto onlineChanges = - peerChangedLifetime->make_state>(); + const auto onlineChanges + = peerChangedLifetime->make_state>(); const auto peer = pin->peer; - const auto onlineTimer = - peerChangedLifetime->make_state([=] { - onlineChanges->fire_copy({ peer }); - }); + const auto onlineTimer = peerChangedLifetime->make_state( + [=] { onlineChanges->fire_copy({ peer }); }); const auto callTimer = [=](const auto &pin) { onlineTimer->cancel(); diff --git a/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_manager.mm b/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_manager.mm index f9c24a5a5..5f314e4b5 100644 --- a/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_manager.mm +++ b/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_manager.mm @@ -135,8 +135,8 @@ const auto kAudioItemIdentifier = @"touchbarAudio"; if (isEqual(kMainItemIdentifier)) { auto *item = [[GroupTouchBarItem alloc] initWithIdentifier:itemId]; - item.groupTouchBar = - [[[TouchBarMain alloc] + item.groupTouchBar + = [[[TouchBarMain alloc] init:_controller touchBarSwitches:_touchBarSwitches.events()] autorelease]; rpl::combine( diff --git a/Telegram/SourceFiles/settings/settings_business.cpp b/Telegram/SourceFiles/settings/settings_business.cpp index feee8e87c..163716819 100644 --- a/Telegram/SourceFiles/settings/settings_business.cpp +++ b/Telegram/SourceFiles/settings/settings_business.cpp @@ -605,8 +605,8 @@ QPointer Business::createPinnedToBottom( }); { const auto callback = [=](int value) { - const auto options = - _controller->session().api().premium().subscriptionOptions(); + auto &api = _controller->session().api(); + const auto options = api.premium().subscriptionOptions(); if (options.empty()) { return; } diff --git a/Telegram/SourceFiles/settings/settings_premium.cpp b/Telegram/SourceFiles/settings/settings_premium.cpp index d1962e407..601f1f978 100644 --- a/Telegram/SourceFiles/settings/settings_premium.cpp +++ b/Telegram/SourceFiles/settings/settings_premium.cpp @@ -1211,8 +1211,8 @@ QPointer Premium::createPinnedToBottom( #endif { const auto callback = [=](int value) { - const auto options = - _controller->session().api().premium().subscriptionOptions(); + auto &api = _controller->session().api(); + const auto options = api.premium().subscriptionOptions(); if (options.empty()) { return; } diff --git a/Telegram/SourceFiles/storage/storage_account.cpp b/Telegram/SourceFiles/storage/storage_account.cpp index ca04135e8..e3c2e69c4 100644 --- a/Telegram/SourceFiles/storage/storage_account.cpp +++ b/Telegram/SourceFiles/storage/storage_account.cpp @@ -1991,8 +1991,8 @@ void Account::readStickerSets( if (datesCount != scnt) { return failed(); } - const auto fillDates = - ((set->id == Data::Stickers::CloudRecentSetId) + const auto fillDates + = ((set->id == Data::Stickers::CloudRecentSetId) || (set->id == Data::Stickers::CloudRecentAttachedSetId)) && (set->stickers.size() == datesCount); if (fillDates) { diff --git a/Telegram/SourceFiles/ui/boxes/choose_date_time.cpp b/Telegram/SourceFiles/ui/boxes/choose_date_time.cpp index e4d8092a5..8651b5b01 100644 --- a/Telegram/SourceFiles/ui/boxes/choose_date_time.cpp +++ b/Telegram/SourceFiles/ui/boxes/choose_date_time.cpp @@ -146,8 +146,8 @@ ChooseDateTimeBoxDescriptor ChooseDateTimeBox( width); }, content->lifetime()); - const auto calendar = - content->lifetime().make_state>(); + const auto calendar + = content->lifetime().make_state>(); const auto calendarStyle = args.style.calendarStyle; state->day->focusedChanges( ) | rpl::start_with_next([=](bool focused) { diff --git a/Telegram/SourceFiles/ui/controls/call_mute_button.cpp b/Telegram/SourceFiles/ui/controls/call_mute_button.cpp index dfb31807e..731df0c81 100644 --- a/Telegram/SourceFiles/ui/controls/call_mute_button.cpp +++ b/Telegram/SourceFiles/ui/controls/call_mute_button.cpp @@ -414,8 +414,8 @@ void BlobsWidget::init(int diameter) { } // Main circle. - const auto circleProgress = - Clamp(_switchConnectingProgress - kBlobPartAnimation) + const auto circleProgress + = Clamp(_switchConnectingProgress - kBlobPartAnimation) / kFillCirclePartAnimation; const auto skipColoredCircle = (circleProgress == 1.); @@ -744,8 +744,8 @@ void CallMuteButton::init() { }, lifetime()); // State type. - const auto previousType = - lifetime().make_state(_state.current().type); + const auto previousType + = lifetime().make_state(_state.current().type); setHandleMouseState(HandleMouseState::Disabled); refreshGradients(); diff --git a/Telegram/SourceFiles/window/window_peer_menu.cpp b/Telegram/SourceFiles/window/window_peer_menu.cpp index c3c0950c2..e03e69c52 100644 --- a/Telegram/SourceFiles/window/window_peer_menu.cpp +++ b/Telegram/SourceFiles/window/window_peer_menu.cpp @@ -143,8 +143,8 @@ void ShareBotGame( } // namespace -const char kOptionViewProfileInChatsListContextMenu[] = - "view-profile-in-chats-list-context-menu"; +const char kOptionViewProfileInChatsListContextMenu[] + = "view-profile-in-chats-list-context-menu"; namespace { diff --git a/Telegram/SourceFiles/window/window_session_controller.cpp b/Telegram/SourceFiles/window/window_session_controller.cpp index 47cf5326c..833ff1a96 100644 --- a/Telegram/SourceFiles/window/window_session_controller.cpp +++ b/Telegram/SourceFiles/window/window_session_controller.cpp @@ -2015,10 +2015,10 @@ void SessionController::resizeForThirdSection() { auto &settings = Core::App().settings(); auto layout = computeColumnLayout(); - auto tabbedSelectorSectionEnabled = - settings.tabbedSelectorSectionEnabled(); - auto thirdSectionInfoEnabled = - settings.thirdSectionInfoEnabled(); + auto tabbedSelectorSectionEnabled + = settings.tabbedSelectorSectionEnabled(); + auto thirdSectionInfoEnabled + = settings.thirdSectionInfoEnabled(); settings.setTabbedSelectorSectionEnabled(false); settings.setThirdSectionInfoEnabled(false);