mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 01:47:22 +08:00
FIX: Don't subscribe to Desktop Notifications on mobile.
This commit is contained in:
parent
f3af3934fd
commit
a253bf8698
|
@ -29,10 +29,6 @@ export default {
|
|||
});
|
||||
}
|
||||
|
||||
bus.subscribe("/notification-alert/" + user.get('id'), function(data){
|
||||
onNotification(data, user);
|
||||
});
|
||||
|
||||
bus.subscribe("/notification/" + user.get('id'), function(data) {
|
||||
const oldUnread = user.get('unread_notifications');
|
||||
const oldPM = user.get('unread_private_messages');
|
||||
|
@ -85,7 +81,13 @@ export default {
|
|||
});
|
||||
|
||||
if (!Ember.testing) {
|
||||
initDesktopNotifications(bus);
|
||||
if (!Discourse.Mobile.mobileView) {
|
||||
bus.subscribe("/notification-alert/" + user.get('id'), function(data){
|
||||
onNotification(data, user);
|
||||
});
|
||||
|
||||
initDesktopNotifications(bus);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user