Changed notification sounds

This commit is contained in:
supertiger1234 2020-02-13 20:05:15 +00:00
parent 69001851ad
commit 1febb15e6b
6 changed files with 6 additions and 4 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -25,7 +25,7 @@ const actions = {
(currentTab !== 1 && currentTab !== 2) ||
!document.hasFocus()
) {
NotificationSounds.notification();
NotificationSounds.notification(mentioned);
}
let find = context.state.notifications.find(item => {
return item.channelID === channelID;

View file

@ -1,11 +1,13 @@
import notificationSound from "@/assets/sounds/Notification.mp3";
import messageSound from "@/assets/sounds/Message.mp3";
import mentionSound from "@/assets/sounds/Mention.mp3";
import newFriendSound from "@/assets/sounds/FriendRequest.mp3";
import { store } from "@/store/index";
export default {
notification: () => {
notification: mentioned => {
if (isBusy() || isNotificationDisabled()) return;
const audio = new Audio(notificationSound);
const audio = new Audio(mentioned ? mentionSound : messageSound);
audio.play();
},
newFriend: () => {