mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-11-09 08:25:44 +00:00
notification: Refactor code for bot mention in reply.
This commit is contained in:
@@ -12,11 +12,16 @@ const { appId, loadBots } = require('./helpers');
|
|||||||
app.setAppUserModelId(appId);
|
app.setAppUserModelId(appId);
|
||||||
|
|
||||||
window.Notification = DefaultNotification;
|
window.Notification = DefaultNotification;
|
||||||
|
|
||||||
if (process.platform === 'darwin') {
|
if (process.platform === 'darwin') {
|
||||||
const DarwinNotification = require('./darwin-notifications');
|
const DarwinNotification = require('./darwin-notifications');
|
||||||
window.Notification = DarwinNotification;
|
window.Notification = DarwinNotification;
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener('load', () => {
|
window.addEventListener('load', () => {
|
||||||
|
// Call this function only when user is logged in
|
||||||
|
// eslint-disable-next-line no-undef, camelcase
|
||||||
|
if (page_params.realm_uri) {
|
||||||
loadBots();
|
loadBots();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user