mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-11-04 12:14:12 +00:00 
			
		
		
		
	Optimized user infos cache transmission
This commit is contained in:
		@@ -97,9 +97,9 @@ ComunicWeb.components.searchForm = {
 | 
			
		||||
					var userID = response[i];
 | 
			
		||||
					
 | 
			
		||||
					//We show user only if we have informations about him
 | 
			
		||||
					if(usersInfos[userID])
 | 
			
		||||
					if(usersInfos["user-"+userID])
 | 
			
		||||
						//Display user informations
 | 
			
		||||
						ComunicWeb.components.searchForm.displayUser(usersInfos[userID], menuList);
 | 
			
		||||
						ComunicWeb.components.searchForm.displayUser(usersInfos["user-"+userID], menuList);
 | 
			
		||||
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -35,7 +35,7 @@ ComunicWeb.user.userInfos = {
 | 
			
		||||
 | 
			
		||||
			//Return a simple array
 | 
			
		||||
			else
 | 
			
		||||
				afterGetUserInfos(result[userID]);
 | 
			
		||||
				afterGetUserInfos(result["user-"+userID]);
 | 
			
		||||
		}, forceRequest);
 | 
			
		||||
 | 
			
		||||
	},
 | 
			
		||||
@@ -61,7 +61,7 @@ ComunicWeb.user.userInfos = {
 | 
			
		||||
			//Check the local cache
 | 
			
		||||
			if(this.usersInfos["user-"+processUserID] && !forceRequest){
 | 
			
		||||
				//Add user information to cached informations
 | 
			
		||||
				cachedInformations[processUserID] = this.usersInfos["user-"+processUserID];
 | 
			
		||||
				cachedInformations["user-"+processUserID] = this.usersInfos["user-"+processUserID];
 | 
			
		||||
			}
 | 
			
		||||
			else {
 | 
			
		||||
				//Else we'll have to get data
 | 
			
		||||
@@ -107,7 +107,7 @@ ComunicWeb.user.userInfos = {
 | 
			
		||||
					//Store
 | 
			
		||||
					ComunicWeb.user.userInfos.usersInfos["user-"+userID] = result[i];
 | 
			
		||||
 | 
			
		||||
					returnInformations[userID] = result[i];
 | 
			
		||||
					returnInformations["user-"+userID] = result[i];
 | 
			
		||||
				}
 | 
			
		||||
				
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user