You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-05 23:10:41 +03:00
Initial support for notification settings
Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
@@ -17,9 +17,6 @@ limitations under the License.
|
||||
|
||||
import Promise from 'bluebird';
|
||||
import MatrixClientPeg from './MatrixClientPeg';
|
||||
import Notifier from './Notifier';
|
||||
import { _t, _td } from './languageHandler';
|
||||
import SdkConfig from './SdkConfig';
|
||||
|
||||
/*
|
||||
* TODO: Make things use this. This is all WIP - see UserSettings.js for usage.
|
||||
@@ -48,42 +45,6 @@ export default {
|
||||
// TODO
|
||||
},
|
||||
|
||||
// TODO: {Travis} Granular setting
|
||||
getEnableNotifications: function() {
|
||||
return Notifier.isEnabled();
|
||||
},
|
||||
|
||||
// TODO: {Travis} Granular setting
|
||||
setEnableNotifications: function(enable) {
|
||||
if (!Notifier.supportsDesktopNotifications()) {
|
||||
return;
|
||||
}
|
||||
Notifier.setEnabled(enable);
|
||||
},
|
||||
|
||||
// TODO: {Travis} Granular setting
|
||||
getEnableNotificationBody: function() {
|
||||
return Notifier.isBodyEnabled();
|
||||
},
|
||||
|
||||
// TODO: {Travis} Granular setting
|
||||
setEnableNotificationBody: function(enable) {
|
||||
if (!Notifier.supportsDesktopNotifications()) {
|
||||
return;
|
||||
}
|
||||
Notifier.setBodyEnabled(enable);
|
||||
},
|
||||
|
||||
// TODO: {Travis} Granular setting
|
||||
getEnableAudioNotifications: function() {
|
||||
return Notifier.isAudioEnabled();
|
||||
},
|
||||
|
||||
// TODO: {Travis} Granular setting
|
||||
setEnableAudioNotifications: function(enable) {
|
||||
Notifier.setAudioEnabled(enable);
|
||||
},
|
||||
|
||||
changePassword: function(oldPassword, newPassword) {
|
||||
const cli = MatrixClientPeg.get();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user