mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Draft idea for custom notification sounds
This commit is contained in:
parent
5d6fb0c705
commit
fa15ff6ba4
2 changed files with 4 additions and 0 deletions
|
|
@ -116,6 +116,7 @@ export const SMAudio = new class {
|
||||||
if ('running' == audioCtx.state && (this.supportedMp3 || this.supportedOgg)) {
|
if ('running' == audioCtx.state && (this.supportedMp3 || this.supportedOgg)) {
|
||||||
notificator = notificator || createNewObject();
|
notificator = notificator || createNewObject();
|
||||||
if (notificator) {
|
if (notificator) {
|
||||||
|
// SettingsGet('NotificationSound').startsWith('custom@')
|
||||||
notificator.src = Links.staticLink('sounds/'
|
notificator.src = Links.staticLink('sounds/'
|
||||||
+ SettingsGet('NotificationSound')
|
+ SettingsGet('NotificationSound')
|
||||||
+ (this.supportedMp3 ? '.mp3' : '.ogg'));
|
+ (this.supportedMp3 ? '.mp3' : '.ogg'));
|
||||||
|
|
|
||||||
|
|
@ -822,6 +822,9 @@ class Actions
|
||||||
foreach (\glob(APP_VERSION_ROOT_PATH.'static/sounds/*.mp3') as $file) {
|
foreach (\glob(APP_VERSION_ROOT_PATH.'static/sounds/*.mp3') as $file) {
|
||||||
$aResult['newMailSounds'][] = \basename($file, '.mp3');
|
$aResult['newMailSounds'][] = \basename($file, '.mp3');
|
||||||
}
|
}
|
||||||
|
// foreach (\glob(APP_INDEX_ROOT_PATH.'notifications/*.mp3') as $file) {
|
||||||
|
// $aResult['newMailSounds'][] = 'custom@'.\basename($file, '.mp3');
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ($oConfig->Get('login', 'allow_languages_on_login', true) && $oConfig->Get('login', 'determine_user_language', true)) {
|
if ($oConfig->Get('login', 'allow_languages_on_login', true) && $oConfig->Get('login', 'determine_user_language', true)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue