mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 14:03:30 +00:00 
			
		
		
		
	electron_bridge: Send unread count to electron app on update.
This commit is contained in:
		@@ -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() {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user