This commit is contained in:
stom79 2018-11-22 07:47:43 +01:00
parent af6798dd01
commit d974ebf7ba
1 changed files with 12 additions and 9 deletions

View File

@ -395,15 +395,18 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn
if( type == RetrieveFeedsAsyncTask.Type.CONVERSATION ){ if( type == RetrieveFeedsAsyncTask.Type.CONVERSATION ){
List<Conversation> conversations = apiResponse.getConversations(); List<Conversation> conversations = apiResponse.getConversations();
List<Status> statusesConversations = new ArrayList<>(); List<Status> statusesConversations = new ArrayList<>();
if( conversations != null) if( conversations != null) {
for( Conversation conversation: conversations) { for (Conversation conversation : conversations) {
Status status = conversation.getLast_status(); Status status = conversation.getLast_status();
status.setConversationId(conversation.getId()); if (status != null) {
List<String> ppConversation = new ArrayList<>(); status.setConversationId(conversation.getId());
for (Account account : conversation.getAccounts()) List<String> ppConversation = new ArrayList<>();
ppConversation.add(account.getAvatar()); for (Account account : conversation.getAccounts())
status.setConversationProfilePicture(ppConversation); ppConversation.add(account.getAvatar());
statusesConversations.add(status); status.setConversationProfilePicture(ppConversation);
}
statusesConversations.add(status);
}
} }
apiResponse.setStatuses(statusesConversations); apiResponse.setStatuses(statusesConversations);
} }