upd: view.websocket (not array contat, now object merging)
This commit is contained in:
parent
dc167766fa
commit
ca3e25b0e7
|
@ -24,7 +24,9 @@ window.wsc_emergency = wsc.channel('emergency/31').listen(function(msg, err){
|
||||||
( new Audio('https://notificationsounds.com/message-tones/communication-channel-519/download/mp3') ).play();
|
( new Audio('https://notificationsounds.com/message-tones/communication-channel-519/download/mp3') ).play();
|
||||||
|
|
||||||
// {2} Add messages to stack //
|
// {2} Add messages to stack //
|
||||||
gstore.data.notif.emergency.data = gstore.data.notif.emergency.data.concat( msg.add );
|
for( var id in msg.add )
|
||||||
|
if( gstore.data.notif.emergency.data[id] == null )
|
||||||
|
gstore.data.notif.emergency.data[id] = msg.add[id];
|
||||||
|
|
||||||
// {3} Add notification count if not already on page //
|
// {3} Add notification count if not already on page //
|
||||||
if( router.app.$route.path != '/emergency' )
|
if( router.app.$route.path != '/emergency' )
|
||||||
|
@ -80,7 +82,9 @@ window.wsc_event = wsc.channel('event/31').listen(function(msg, err){
|
||||||
( new Audio('https://notificationsounds.com/message-tones/communication-channel-519/download/mp3') ).play();
|
( new Audio('https://notificationsounds.com/message-tones/communication-channel-519/download/mp3') ).play();
|
||||||
|
|
||||||
// {2} Add messages to stack //
|
// {2} Add messages to stack //
|
||||||
gstore.data.notif.event.data = gstore.data.notif.event.data.concat( msg.add );
|
for( var id in msg.add )
|
||||||
|
if( gstore.data.notif.event.data[id] == null )
|
||||||
|
gstore.data.notif.event.data[id] = msg.add[id];
|
||||||
|
|
||||||
// {3} Add notification count if not already on page //
|
// {3} Add notification count if not already on page //
|
||||||
if( router.app.$route.path != '/event' )
|
if( router.app.$route.path != '/event' )
|
||||||
|
|
Loading…
Reference in New Issue