Port core features from index.js (Open link, Unread count, Font)
This commit is contained in:
@@ -4,10 +4,16 @@ const electron = require('electron');
|
||||
const ipc = electron.ipcRenderer;
|
||||
const NativeNotification = Notification;
|
||||
|
||||
ipc.on('retrieveUnreadCount', function() {
|
||||
var unreadCountTimer = setInterval(function() {
|
||||
if (!this.count) {
|
||||
this.count = 0;
|
||||
}
|
||||
var unreadCount = document.getElementsByClassName('unread-title').length;
|
||||
ipc.sendToHost('retrieveUnreadCount', unreadCount);
|
||||
});
|
||||
if (this.count != unreadCount) {
|
||||
ipc.sendToHost('onUnreadCountChange', unreadCount);
|
||||
}
|
||||
this.count = unreadCount;
|
||||
}, 1000);
|
||||
|
||||
// On Windows 8.1 and Windows 8, a shortcut with a Application User Model ID must be installed to the Start screen.
|
||||
// In current version, use tray balloon for notification
|
||||
|
Reference in New Issue
Block a user