diff --git a/Telegram/SourceFiles/api/api_unread_things.cpp b/Telegram/SourceFiles/api/api_unread_things.cpp index 1945e52738..80cf5ab55f 100644 --- a/Telegram/SourceFiles/api/api_unread_things.cpp +++ b/Telegram/SourceFiles/api/api_unread_things.cpp @@ -47,10 +47,10 @@ bool UnreadThings::trackReactions(Data::Thread *thread) const { return false; } const auto &settings = AyuSettings::getInstance(); - if (peer->isChannel() && !peer->isMegagroup() && !settings.hideChannelReactions) { + if (peer->isChannel() && !peer->isMegagroup() && !settings.showChannelReactions) { return false; } - if (peer->isMegagroup() && !settings.hideGroupReactions) { + if (peer->isMegagroup() && !settings.showGroupReactions) { return false; } return peer->isUser() || peer->isChat() || peer->isMegagroup(); diff --git a/Telegram/SourceFiles/ayu/ayu_settings.cpp b/Telegram/SourceFiles/ayu/ayu_settings.cpp index f6bb469bd2..3d55d637a8 100644 --- a/Telegram/SourceFiles/ayu/ayu_settings.cpp +++ b/Telegram/SourceFiles/ayu/ayu_settings.cpp @@ -231,8 +231,8 @@ AyuGramSettings::AyuGramSettings() { disableNotificationsDelay = false; localPremium = false; - hideChannelReactions = true; - hideGroupReactions = true; + showChannelReactions = true; + showGroupReactions = true; // ~ Customization appIcon = @@ -420,11 +420,11 @@ void set_localPremium(bool val) { } void set_hideChannelReactions(bool val) { - settings->hideChannelReactions = val; + settings->showChannelReactions = val; } void set_hideGroupReactions(bool val) { - settings->hideGroupReactions = val; + settings->showGroupReactions = val; } void set_appIcon(const QString &val) { diff --git a/Telegram/SourceFiles/ayu/ayu_settings.h b/Telegram/SourceFiles/ayu/ayu_settings.h index 192e59f2ee..86f2d8c205 100644 --- a/Telegram/SourceFiles/ayu/ayu_settings.h +++ b/Telegram/SourceFiles/ayu/ayu_settings.h @@ -76,8 +76,8 @@ public: bool disableNotificationsDelay; bool localPremium; - bool hideChannelReactions; - bool hideGroupReactions; + bool showChannelReactions; + bool showGroupReactions; QString appIcon; bool simpleQuotesAndReplies; @@ -259,8 +259,8 @@ inline void to_json(nlohmann::json &nlohmann_json_j, const AyuGramSettings &nloh NLOHMANN_JSON_TO(showGhostToggleInTray) NLOHMANN_JSON_TO(showStreamerToggleInTray) NLOHMANN_JSON_TO(monoFont) - NLOHMANN_JSON_TO(hideChannelReactions) - NLOHMANN_JSON_TO(hideGroupReactions) + NLOHMANN_JSON_TO(showChannelReactions) + NLOHMANN_JSON_TO(showGroupReactions) NLOHMANN_JSON_TO(hideNotificationCounters) NLOHMANN_JSON_TO(hideNotificationBadge) NLOHMANN_JSON_TO(hideAllChatsFolder) @@ -324,8 +324,8 @@ inline void from_json(const nlohmann::json &nlohmann_json_j, AyuGramSettings &nl NLOHMANN_JSON_FROM_WITH_DEFAULT(showGhostToggleInTray) NLOHMANN_JSON_FROM_WITH_DEFAULT(showStreamerToggleInTray) NLOHMANN_JSON_FROM_WITH_DEFAULT(monoFont) - NLOHMANN_JSON_FROM_WITH_DEFAULT(hideChannelReactions) - NLOHMANN_JSON_FROM_WITH_DEFAULT(hideGroupReactions) + NLOHMANN_JSON_FROM_WITH_DEFAULT(showChannelReactions) + NLOHMANN_JSON_FROM_WITH_DEFAULT(showGroupReactions) NLOHMANN_JSON_FROM_WITH_DEFAULT(hideNotificationCounters) NLOHMANN_JSON_FROM_WITH_DEFAULT(hideNotificationBadge) NLOHMANN_JSON_FROM_WITH_DEFAULT(hideAllChatsFolder) diff --git a/Telegram/SourceFiles/ayu/ui/settings/settings_ayu.cpp b/Telegram/SourceFiles/ayu/ui/settings/settings_ayu.cpp index 298bbb667d..e6c05e1ffb 100644 --- a/Telegram/SourceFiles/ayu/ui/settings/settings_ayu.cpp +++ b/Telegram/SourceFiles/ayu/ui/settings/settings_ayu.cpp @@ -855,12 +855,12 @@ void SetupQoLToggles(not_null container) { tr::ayu_HideChannelReactions(), st::settingsButtonNoIcon )->toggleOn( - rpl::single(!settings->hideChannelReactions) + rpl::single(!settings->showChannelReactions) )->toggledValue( ) | rpl::filter( [=](bool enabled) { - return (!enabled != settings->hideChannelReactions); + return (!enabled != settings->showChannelReactions); }) | start_with_next( [=](bool enabled) { @@ -874,12 +874,12 @@ void SetupQoLToggles(not_null container) { tr::ayu_HideGroupReactions(), st::settingsButtonNoIcon )->toggleOn( - rpl::single(!settings->hideGroupReactions) + rpl::single(!settings->showGroupReactions) )->toggledValue( ) | rpl::filter( [=](bool enabled) { - return (!enabled != settings->hideGroupReactions); + return (!enabled != settings->showGroupReactions); }) | start_with_next( [=](bool enabled) { diff --git a/Telegram/SourceFiles/history/history.cpp b/Telegram/SourceFiles/history/history.cpp index bcb39ac3c8..c974e44b0d 100644 --- a/Telegram/SourceFiles/history/history.cpp +++ b/Telegram/SourceFiles/history/history.cpp @@ -2429,8 +2429,8 @@ Dialogs::UnreadState History::computeUnreadState() const { result.mentions = unreadMentions().has() ? 1 : 0; const auto peer = this->peer.get(); const auto &settings = AyuSettings::getInstance(); - const auto hideReactions = (peer->isChannel() && !peer->isMegagroup() && !settings.hideChannelReactions) - || (peer->isMegagroup() && !settings.hideGroupReactions); + const auto hideReactions = (peer->isChannel() && !peer->isMegagroup() && !settings.showChannelReactions) + || (peer->isMegagroup() && !settings.showGroupReactions); result.reactions = hideReactions ? 0 : (unreadReactions().has() ? 1 : 0); result.messagesMuted = muted ? result.messages : 0; result.chatsMuted = muted ? result.chats : 0; diff --git a/Telegram/SourceFiles/history/history_inner_widget.cpp b/Telegram/SourceFiles/history/history_inner_widget.cpp index 13391112e6..18d9c373fe 100644 --- a/Telegram/SourceFiles/history/history_inner_widget.cpp +++ b/Telegram/SourceFiles/history/history_inner_widget.cpp @@ -1221,8 +1221,8 @@ void HistoryInner::paintEvent(QPaintEvent *e) { if (markingAsViewed && item->hasUnwatchedEffect()) { const auto peer = item->history()->peer; const auto &settings = AyuSettings::getInstance(); - const auto hide = (!settings.hideChannelReactions && peer->isChannel() && !peer->isMegagroup()) || - (!settings.hideGroupReactions && peer->isMegagroup()); + const auto hide = (!settings.showChannelReactions && peer->isChannel() && !peer->isMegagroup()) || + (!settings.showGroupReactions && peer->isMegagroup()); if (!hide) { startEffects.emplace(view); } else { diff --git a/Telegram/SourceFiles/history/history_item_helpers.cpp b/Telegram/SourceFiles/history/history_item_helpers.cpp index bc0f4824b9..2bc5decb92 100644 --- a/Telegram/SourceFiles/history/history_item_helpers.cpp +++ b/Telegram/SourceFiles/history/history_item_helpers.cpp @@ -1171,8 +1171,8 @@ void CheckReactionNotificationSchedule( } const auto peer = item->history()->peer; const auto &settings = AyuSettings::getInstance(); - if ((peer->isChannel() && !peer->isMegagroup() && !settings.hideChannelReactions) - || (peer->isMegagroup() && !settings.hideGroupReactions)) { + if ((peer->isChannel() && !peer->isMegagroup() && !settings.showChannelReactions) + || (peer->isMegagroup() && !settings.showGroupReactions)) { item->markEffectWatched(); return; } diff --git a/Telegram/SourceFiles/history/view/reactions/history_view_reactions.cpp b/Telegram/SourceFiles/history/view/reactions/history_view_reactions.cpp index 5daa9f48f8..d62944cc6b 100644 --- a/Telegram/SourceFiles/history/view/reactions/history_view_reactions.cpp +++ b/Telegram/SourceFiles/history/view/reactions/history_view_reactions.cpp @@ -835,12 +835,12 @@ InlineListData InlineListDataFromMessage(not_null view) { using Flag = InlineListData::Flag; const auto item = view->data(); const auto &settings = AyuSettings::getInstance(); - if (!settings.hideChannelReactions + if (!settings.showChannelReactions && item->history()->peer->isChannel() && !item->history()->peer->isMegagroup()) { return InlineListData(); } - if (!settings.hideGroupReactions + if (!settings.showGroupReactions && item->history()->peer->isMegagroup()) { return InlineListData(); } diff --git a/Telegram/SourceFiles/history/view/reactions/history_view_reactions_selector.cpp b/Telegram/SourceFiles/history/view/reactions/history_view_reactions_selector.cpp index b279b4324d..61f332f6a5 100644 --- a/Telegram/SourceFiles/history/view/reactions/history_view_reactions_selector.cpp +++ b/Telegram/SourceFiles/history/view/reactions/history_view_reactions_selector.cpp @@ -1358,8 +1358,8 @@ AttachSelectorResult AttachSelectorToMenu( } const auto peer = item->history()->peer; - if ((peer->isChannel() && !peer->isMegagroup() && !settings.hideChannelReactions) - || (peer->isMegagroup() && !settings.hideGroupReactions)) { + if ((peer->isChannel() && !peer->isMegagroup() && !settings.showChannelReactions) + || (peer->isMegagroup() && !settings.showGroupReactions)) { return AttachSelectorResult::Skipped; }