mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2024-11-23 22:09:30 +00:00
Optimized getDisplayName
This commit is contained in:
parent
95844e8ba2
commit
eee570993a
@ -55,7 +55,7 @@
|
|||||||
<ConfirmationsSetting value="0" id="Add" />
|
<ConfirmationsSetting value="0" id="Add" />
|
||||||
<ConfirmationsSetting value="0" id="Remove" />
|
<ConfirmationsSetting value="0" id="Remove" />
|
||||||
</component>
|
</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" />
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectType">
|
<component name="ProjectType">
|
||||||
|
@ -117,9 +117,15 @@ public class ConversationsListHelper {
|
|||||||
//Get the list of members of the conversation
|
//Get the list of members of the conversation
|
||||||
ArrayList<Integer> members = infos.getMembers();
|
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
|
//Get information about the users
|
||||||
ArrayMap<Integer, UserInfo> users =
|
ArrayMap<Integer, UserInfo> users =
|
||||||
new GetUsersHelper(mContext, dbHelper).getMultiple(members);
|
new GetUsersHelper(mContext, dbHelper).getMultiple(membersToGet);
|
||||||
|
|
||||||
if(users == null)
|
if(users == null)
|
||||||
return ""; //No name by default
|
return ""; //No name by default
|
||||||
|
Loading…
Reference in New Issue
Block a user