electron_bridge: Send unread count to electron app on update.

This commit is contained in:
Priyank
2018-02-25 18:51:52 +00:00
committed by Tim Abbott
parent 5aa8629a10
commit cd48236756

View File

@@ -162,11 +162,18 @@ exports.redraw_title = function () {
favicon.set(current_favicon);
}
// window.bridge is for the legacy QT desktop app; we'll likely
// remove this code soon.
if (window.bridge !== undefined) {
// We don't use 'n' because we want the exact count. The bridge handles
// which icon to show.
window.bridge.updateCount(new_message_count);
}
// Notify the current desktop app's UI about the new unread count.
if (window.electron_bridge !== undefined) {
window.electron_bridge.send_event('total_unread_count', new_message_count);
}
};
function flash_pms() {