Add badge for unread messages to the tray icon (#1934)
This commit adds a badge to the tray icon that displays the number of unread messages, if there is any. It is implemented by providing alternative versions of the icon, that replace the default image when a message is received. The badge is rendered graphically as a red circle containing the number of unread messages. Since a different icon file is needed for each possible number of unread messages, but this number is clearly unbounded, only the numbers from 1 to 9 are provided. If there are 10 or more unread messages, a single badge (depicted as "9+") is used. Resolves #1917
This commit is contained in:
		
					parent
					
						
							
								9ef8228ff8
							
						
					
				
			
			
				commit
				
					
						7034d8759d
					
				
			
		
					 24 changed files with 22 additions and 5 deletions
				
			
		|  | @ -64,6 +64,7 @@ | |||
|                 window.setBadgeCount(0); | ||||
|                 window.document.title = window.config.title; | ||||
|             } | ||||
|             window.updateTrayIcon(newUnreadCount); | ||||
|         }, | ||||
|         startPruning: function() { | ||||
|             var halfHour = 30 * 60 * 1000; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Martino Pilia
				Martino Pilia