notification: Refactor code for bot mention in reply.

This commit is contained in:
akashnimare
2018-01-31 01:34:46 +05:30
parent 4a40c75127
commit c716b8f233

View File

@@ -12,11 +12,16 @@ const { appId, loadBots } = require('./helpers');
app.setAppUserModelId(appId);
window.Notification = DefaultNotification;
if (process.platform === 'darwin') {
const DarwinNotification = require('./darwin-notifications');
window.Notification = DarwinNotification;
}
window.addEventListener('load', () => {
loadBots();
// Call this function only when user is logged in
// eslint-disable-next-line no-undef, camelcase
if (page_params.realm_uri) {
loadBots();
}
});