mirror of
				https://github.com/nerzhul/ocsms.git
				synced 2025-10-28 00:49:11 +00:00 
			
		
		
		
	Use inArray helper instead of the jQuery direct function. Coding style
This commit is contained in:
		
							parent
							
								
									8680ce6d38
								
							
						
					
					
						commit
						68114429c0
					
				| @ -133,7 +133,8 @@ var checkNewMessages = function() { | ||||
| 					if (typeof jsondata['photos'][peerLabel] != 'undefined') { | ||||
| 						peerListBuf += 'style="background-image: url(' + jsondata['photos'][peerLabel] + ');"'; | ||||
| 					} | ||||
| 					peerListBuf += '></div><a href="#" ng-click="loadConversation(' + idxVal2 + ');" mailbox-navigation="' + idxVal2 + '" style="font-weight: bold;" mailbox-label="' + peerLabel + '">' + peerLabel + ' (' + val + ')</a></li>'; | ||||
| 					peerListBuf += '></div><a href="#" ng-click="loadConversation(' + idxVal2 + ');" mailbox-navigation="' + | ||||
| 						idxVal2 + '" style="font-weight: bold;" mailbox-label="' + peerLabel + '">' + peerLabel + ' (' + val + ')</a></li>'; | ||||
| 					$('#app-mailbox-peers ul').prepend(peerListBuf); | ||||
| 					bufferedContacts.push(peerLabel); | ||||
| 
 | ||||
| @ -329,7 +330,7 @@ function fetchInitialPeerList(jsondata) { | ||||
| 			fn = jsondata['contacts'][id]; | ||||
| 			peerLabel = fn; | ||||
| 		} | ||||
| 		if ($.inArray(peerLabel, bufferedContacts) == -1) { | ||||
| 		if (inArray(peerLabel, bufferedContacts)) { | ||||
| 			aScope.addContact({'label': peerLabel, 'nav': idxVal2, 'avatar': jsondata['photos'][peerLabel]}); | ||||
| 			bufferedContacts.push(peerLabel); | ||||
| 		} | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user