Added experimental option to hide reply button from native notification.
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -90,6 +90,8 @@ namespace Window::Notifications {
|
||||
extern const char kOptionGNotification[];
|
||||
extern base::options::toggle OptionGNotification;
|
||||
|
||||
extern const char kOptionHideReplyButton[];
|
||||
|
||||
class Manager;
|
||||
|
||||
struct ActivateOptions {
|
||||
|
||||
Reference in New Issue
Block a user