mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2024-12-26 05:28:58 +00:00
Optimized getDisplayName
This commit is contained in:
parent
95844e8ba2
commit
eee570993a
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@ -55,7 +55,7 @@
|
||||
<ConfirmationsSetting value="0" id="Add" />
|
||||
<ConfirmationsSetting value="0" id="Remove" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
@ -117,9 +117,15 @@ public class ConversationsListHelper {
|
||||
//Get the list of members of the conversation
|
||||
ArrayList<Integer> members = infos.getMembers();
|
||||
|
||||
//Get the ID of the three first members
|
||||
ArrayList<Integer> membersToGet = new ArrayList<>();
|
||||
for(int ID : members){
|
||||
membersToGet.add(ID);
|
||||
}
|
||||
|
||||
//Get information about the users
|
||||
ArrayMap<Integer, UserInfo> users =
|
||||
new GetUsersHelper(mContext, dbHelper).getMultiple(members);
|
||||
new GetUsersHelper(mContext, dbHelper).getMultiple(membersToGet);
|
||||
|
||||
if(users == null)
|
||||
return ""; //No name by default
|
||||
|
Loading…
Reference in New Issue
Block a user