mirror of
https://github.com/element-hq/element-web
synced 2024-11-25 02:35:48 +03:00
Remove labs flag for custom notif sounds
This commit is contained in:
parent
96c20ea536
commit
300095f50f
6 changed files with 9 additions and 25 deletions
|
@ -103,7 +103,7 @@ const Notifier = {
|
|||
getSoundForRoom: async function(roomId) {
|
||||
// We do no caching here because the SDK caches setting
|
||||
// and the browser will cache the sound.
|
||||
let content = SettingsStore.getValue("notificationSound", roomId);
|
||||
const content = SettingsStore.getValue("notificationSound", roomId);
|
||||
if (!content) {
|
||||
return null;
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ const Notifier = {
|
|||
},
|
||||
|
||||
_playAudioNotification: async function(ev, room) {
|
||||
const sound = SettingsStore.isFeatureEnabled("feature_notification_sounds") ? await this.getSoundForRoom(room.roomId) : null;
|
||||
const sound = await this.getSoundForRoom(room.roomId);
|
||||
console.log(`Got sound ${sound && sound.name || "default"} for ${room.roomId}`);
|
||||
|
||||
try {
|
||||
|
|
|
@ -70,13 +70,11 @@ export default class RoomSettingsDialog extends React.Component {
|
|||
<RolesRoomSettingsTab roomId={this.props.roomId} />,
|
||||
));
|
||||
|
||||
if (SettingsStore.isFeatureEnabled("feature_notification_sounds")) {
|
||||
tabs.push(new Tab(
|
||||
_td("Notifications"),
|
||||
"mx_RoomSettingsDialog_rolesIcon",
|
||||
<NotificationSettingsTab roomId={this.props.roomId} />,
|
||||
));
|
||||
}
|
||||
tabs.push(new Tab(
|
||||
_td("Notifications"),
|
||||
"mx_RoomSettingsDialog_rolesIcon",
|
||||
<NotificationSettingsTab roomId={this.props.roomId} />,
|
||||
));
|
||||
|
||||
tabs.push(new Tab(
|
||||
_td("Advanced"),
|
||||
|
|
|
@ -85,7 +85,7 @@ export default class NotificationsSettingsTab extends React.Component {
|
|||
if (!this.state.uploadedFile) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
let type = this.state.uploadedFile.type;
|
||||
if (type === "video/ogg") {
|
||||
// XXX: I've observed browsers allowing users to pick a audio/ogg files,
|
||||
|
@ -149,7 +149,7 @@ export default class NotificationsSettingsTab extends React.Component {
|
|||
<div className='mx_SettingsTab_section mx_SettingsTab_subsectionText'>
|
||||
<span className='mx_SettingsTab_subheading'>{_t("Sounds")}</span>
|
||||
<div>
|
||||
<span>{_t("Notification sound")}: <code>{this.state.currentSound}</code></span><br/>
|
||||
<span>{_t("Notification sound")}: <code>{this.state.currentSound}</code></span><br />
|
||||
<AccessibleButton className="mx_NotificationSound_resetSound" disabled={this.state.currentSound == "default"} onClick={this._clearSound.bind(this)} kind="primary">
|
||||
{_t("Reset")}
|
||||
</AccessibleButton>
|
||||
|
|
|
@ -126,12 +126,6 @@ export const SETTINGS = {
|
|||
supportedLevels: LEVELS_FEATURE,
|
||||
default: false,
|
||||
},
|
||||
"feature_notification_sounds": {
|
||||
isFeature: true,
|
||||
displayName: _td("Custom Notification Sounds"),
|
||||
supportedLevels: LEVELS_FEATURE,
|
||||
default: false,
|
||||
},
|
||||
"feature_reactions": {
|
||||
isFeature: true,
|
||||
displayName: _td("React to messages with emoji (refresh to apply changes)"),
|
||||
|
|
|
@ -73,10 +73,6 @@ export default class AccountSettingsHandler extends MatrixClientBackedSettingsHa
|
|||
return !content['disable'];
|
||||
}
|
||||
|
||||
if (settingName === "notificationSound") {
|
||||
return this._getSettings("uk.half-shot.notification.sound");
|
||||
}
|
||||
|
||||
// Special case for breadcrumbs
|
||||
if (settingName === "breadcrumb_rooms") {
|
||||
const content = this._getSettings(BREADCRUMBS_EVENT_TYPE) || {};
|
||||
|
|
|
@ -68,10 +68,6 @@ export default class RoomSettingsHandler extends MatrixClientBackedSettingsHandl
|
|||
return !content['disable'];
|
||||
}
|
||||
|
||||
if (settingName === "notificationSound") {
|
||||
return this._getSettings(roomId, "uk.half-shot.notification.sound");
|
||||
}
|
||||
|
||||
const settings = this._getSettings(roomId) || {};
|
||||
return settings[settingName];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue