diff --git a/Telegram/SourceFiles/info/info.style b/Telegram/SourceFiles/info/info.style index 57abdd1e12..8bce913e9b 100644 --- a/Telegram/SourceFiles/info/info.style +++ b/Telegram/SourceFiles/info/info.style @@ -699,9 +699,6 @@ infoProfileButton: SettingsButton(defaultSettingsButton) { toggleOver: infoProfileToggleOver; toggleSkip: 20px; } -infoNotificationsButton: SettingsButton(infoProfileButton) { - padding: margins(79px, 13px, 8px, 9px); -} infoMainButton: SettingsButton(infoProfileButton) { textFg: lightButtonFg; textFgOver: lightButtonFgOver; diff --git a/Telegram/SourceFiles/info/profile/info_profile_actions.cpp b/Telegram/SourceFiles/info/profile/info_profile_actions.cpp index e59346826b..aa6f52702f 100644 --- a/Telegram/SourceFiles/info/profile/info_profile_actions.cpp +++ b/Telegram/SourceFiles/info/profile/info_profile_actions.cpp @@ -1162,7 +1162,6 @@ public: private: object_ptr setupPersonalChannel(not_null user); object_ptr setupInfo(); - object_ptr setupMuteToggle(); void setupMainApp(); void setupBotPermissions(); void setupMainButtons(); @@ -1727,29 +1726,6 @@ object_ptr DetailsFiller::setupInfo() { addTranslateToMenu(about.text, AboutWithAdvancedValue(_peer)); } } - if (!_peer->isSelf()) { - // No notifications toggle for Self => no separator. - - const auto user = _peer->asUser(); - const auto app = user && user->botInfo && user->botInfo->hasMainApp; - const auto padding = app - ? QMargins( - st::infoOpenAppMargin.left(), - st::infoProfileSeparatorPadding.top(), - st::infoOpenAppMargin.right(), - 0) - : st::infoProfileSeparatorPadding; - - result->add(object_ptr>( - result, - object_ptr(result), - padding) - )->setDuration( - st::infoSlideDuration - )->toggleOn( - std::move(tracker).atLeastOneShownValue() - ); - } object_ptr( result, st::infoIconInformation, @@ -2038,57 +2014,6 @@ object_ptr DetailsFiller::setupPersonalChannel( return result; } -object_ptr DetailsFiller::setupMuteToggle() { - const auto peer = _peer; - const auto topicRootId = _topic ? _topic->rootId() : MsgId(); - const auto makeThread = [=] { - return topicRootId - ? static_cast(peer->forumTopicFor(topicRootId)) - : peer->owner().history(peer).get(); - }; - auto result = object_ptr( - _wrap, - tr::lng_profile_enable_notifications(), - st::infoNotificationsButton); - result->toggleOn(_topic - ? NotificationsEnabledValue(_topic) - : NotificationsEnabledValue(peer), true); - result->setAcceptBoth(); - const auto notifySettings = &peer->owner().notifySettings(); - MuteMenu::SetupMuteMenu( - result.data(), - result->clicks( - ) | rpl::filter([=](Qt::MouseButton button) { - if (button == Qt::RightButton) { - return true; - } - const auto topic = topicRootId - ? peer->forumTopicFor(topicRootId) - : nullptr; - Assert(!topicRootId || topic != nullptr); - const auto is = topic - ? notifySettings->isMuted(topic) - : notifySettings->isMuted(peer); - if (is) { - if (topic) { - notifySettings->update(topic, { .unmute = true }); - } else { - notifySettings->update(peer, { .unmute = true }); - } - return false; - } else { - return true; - } - }) | rpl::to_empty, - makeThread, - _controller->uiShow()); - object_ptr( - result, - st::infoIconNotifications, - st::infoNotificationsIconPosition); - return result; -} - void DetailsFiller::setupMainApp() { const auto button = _wrap->add( object_ptr( @@ -2410,9 +2335,6 @@ object_ptr DetailsFiller::fill() { } } } - if (!_sublist && !_peer->isSelf()) { - add(setupMuteToggle()); - } setupMainButtons(); add(CreateSkipWidget(_wrap));