Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15466441
D18479.id44392.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D18479.id44392.diff
View Options
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -3215,6 +3215,7 @@
'PhabricatorNotificationTestFeedStory' => 'applications/notification/feed/PhabricatorNotificationTestFeedStory.php',
'PhabricatorNotificationUIExample' => 'applications/uiexample/examples/PhabricatorNotificationUIExample.php',
'PhabricatorNotificationsApplication' => 'applications/notification/application/PhabricatorNotificationsApplication.php',
+ 'PhabricatorNotificationsMarkReadSetting' => 'applications/settings/setting/PhabricatorNotificationsMarkReadSetting.php',
'PhabricatorNotificationsSetting' => 'applications/settings/setting/PhabricatorNotificationsSetting.php',
'PhabricatorNotificationsSettingsPanel' => 'applications/settings/panel/PhabricatorNotificationsSettingsPanel.php',
'PhabricatorNuanceApplication' => 'applications/nuance/application/PhabricatorNuanceApplication.php',
@@ -8585,6 +8586,7 @@
'PhabricatorNotificationTestFeedStory' => 'PhabricatorFeedStory',
'PhabricatorNotificationUIExample' => 'PhabricatorUIExample',
'PhabricatorNotificationsApplication' => 'PhabricatorApplication',
+ 'PhabricatorNotificationsMarkReadSetting' => 'PhabricatorInternalSetting',
'PhabricatorNotificationsSetting' => 'PhabricatorInternalSetting',
'PhabricatorNotificationsSettingsPanel' => 'PhabricatorSettingsPanel',
'PhabricatorNuanceApplication' => 'PhabricatorApplication',
diff --git a/src/applications/settings/panel/PhabricatorNotificationsSettingsPanel.php b/src/applications/settings/panel/PhabricatorNotificationsSettingsPanel.php
--- a/src/applications/settings/panel/PhabricatorNotificationsSettingsPanel.php
+++ b/src/applications/settings/panel/PhabricatorNotificationsSettingsPanel.php
@@ -32,6 +32,9 @@
$notifications_key = PhabricatorNotificationsSetting::SETTINGKEY;
$notifications_value = $preferences->getSettingValue($notifications_key);
+ $mark_all_key = PhabricatorNotificationsMarkReadSetting::SETTINGKEY;
+ $mark_all_value = $preferences->getSettingValue($mark_all_key);
+
if ($request->isFormPost()) {
$this->writeSetting(
@@ -39,6 +42,11 @@
$notifications_key,
$request->getInt($notifications_key));
+ $this->writeSetting(
+ $preferences,
+ $mark_all_key,
+ $request->getBool($mark_all_key));
+
return id(new AphrontRedirectResponse())
->setURI($this->getPanelURI('?saved=true'));
}
@@ -149,6 +157,15 @@
'desktop-notifications-control',
$control_config))
->appendChild(
+ id(new AphrontFormCheckboxControl())
+ ->setLabel('Mark All Read')
+ ->setName($mark_all_key)
+ ->addCheckbox(
+ $mark_all_key,
+ $mark_all_value,
+ pht('Do not prompt before marking all notifications read'),
+ $mark_all_value))
+ ->appendChild(
id(new AphrontFormSubmitControl())
->setValue(pht('Save Preference')));
diff --git a/src/applications/settings/setting/PhabricatorNotificationsMarkReadSetting.php b/src/applications/settings/setting/PhabricatorNotificationsMarkReadSetting.php
new file mode 100644
--- /dev/null
+++ b/src/applications/settings/setting/PhabricatorNotificationsMarkReadSetting.php
@@ -0,0 +1,12 @@
+<?php
+
+final class PhabricatorNotificationsMarkReadSetting
+ extends PhabricatorInternalSetting {
+
+ const SETTINGKEY = 'notifications-mark-read';
+
+ public function getSettingName() {
+ return pht('Notifications Mark all Read');
+ }
+
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 4, 5:33 AM (2 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7731429
Default Alt Text
D18479.id44392.diff (3 KB)
Attached To
Mode
D18479: Add a setting for 'mark all read' notifications
Attached
Detach File
Event Timeline
Log In to Comment