Added experimental option to hide reply button from native notification.

This commit is contained in:
23rd
2025-09-12 15:57:47 +03:00
parent 2b93362a57
commit 20cadfad29
3 changed files with 12 additions and 1 deletions

View File

@@ -130,6 +130,7 @@ constexpr auto kSystemAlertDuration = crl::time(0);
} // namespace
const char kOptionGNotification[] = "gnotification";
const char kOptionHideReplyButton[] = "hide-reply-button";
base::options::toggle OptionGNotification({
.id = kOptionGNotification,
@@ -147,6 +148,12 @@ base::options::toggle OptionGNotification({
.restartRequired = true,
});
base::options::toggle HideReplyButtonOption({
.id = kOptionHideReplyButton,
.name = "Hide reply button",
.description = "Hide reply button in notifications.",
});
struct System::Waiter {
NotificationInHistoryKey key;
UserData *reactionSender = nullptr;
@@ -1038,7 +1045,8 @@ Manager::DisplayOptions Manager::getNotificationOptions(
&& (!topic || !Data::CanSendTexts(topic)))
|| peer->isBroadcast()
|| (peer->slowmodeSecondsLeft() > 0)
|| (peer->starsPerMessageChecked() > 0);
|| (peer->starsPerMessageChecked() > 0)
|| HideReplyButtonOption.value();
result.spoilerLoginCode = item
&& !item->out()
&& peer->isNotificationsUser()

View File

@@ -90,6 +90,8 @@ namespace Window::Notifications {
extern const char kOptionGNotification[];
extern base::options::toggle OptionGNotification;
extern const char kOptionHideReplyButton[];
class Manager;
struct ActivateOptions {