| 
						
						
							
								
							
						
						
					 | 
				
			
			 | 
			 | 
			
				@ -86,12 +86,15 @@
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      let message;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      let iconUrl;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      // The number of notifications excluding friend request
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      const messagesNotificationCount = this.models.filter(n => !n.get('isFriendRequest')).length;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      // NOTE: i18n has more complex rules for pluralization than just
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      // distinguishing between zero (0) and other (non-zero),
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      // e.g. Russian:
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      // http://docs.translatehouse.org/projects/localization-guide/en/latest/l10n/pluralforms.html
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      const newMessageCountLabel = `${numNotifications} ${
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        numNotifications === 1 ? i18n('newMessage') : i18n('newMessages')
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      const newMessageCountLabel = `${messagesNotificationCount} ${
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        messagesNotificationCount === 1 ? i18n('newMessage') : i18n('newMessages')
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      }`;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      const last = this.last().toJSON();
 | 
			
		
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
			
			 | 
			 | 
			
				@ -105,7 +108,7 @@
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				          title = newMessageCountLabel;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				          // eslint-disable-next-line prefer-destructuring
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				          iconUrl = last.iconUrl;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				          if (numNotifications === 1) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				          if (last.isFriendRequest || messagesNotificationCount === 1) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            message = `${i18n('notificationFrom')} ${lastMessageTitle}`;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				          } else {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            message = `${i18n(
 | 
			
		
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
			
			 | 
			 | 
			
				@ -115,7 +118,7 @@
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				          break;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        case SettingNames.MESSAGE:
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				          if (numNotifications === 1) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				          if (last.isFriendRequest || messagesNotificationCount === 1) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            // eslint-disable-next-line prefer-destructuring
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            title = last.title;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            // eslint-disable-next-line prefer-destructuring
 | 
			
		
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
			
			 | 
			 | 
			
				
 
 |