Some fixes
This commit is contained in:
parent
bc5fd46f7e
commit
85f7ade670
|
@ -117,16 +117,14 @@ public class RetrieveMissingFeedsAsyncTask extends AsyncTask<Void, Void, Void> {
|
||||||
if (conversations != null && conversations.size() > 0) {
|
if (conversations != null && conversations.size() > 0) {
|
||||||
for (Conversation conversation : conversations) {
|
for (Conversation conversation : conversations) {
|
||||||
app.fedilab.android.client.Entities.Status status = conversation.getLast_status();
|
app.fedilab.android.client.Entities.Status status = conversation.getLast_status();
|
||||||
List<String> ppConversationStatic = new ArrayList<>();
|
if( status != null) {
|
||||||
List<String> ppConversation = new ArrayList<>();
|
List<String> ppConversation = new ArrayList<>();
|
||||||
for (Account account : conversation.getAccounts()) {
|
for (Account account : conversation.getAccounts())
|
||||||
ppConversationStatic.add(account.getAvatar_static());
|
ppConversation.add(account.getAvatar());
|
||||||
ppConversation.add(account.getAvatar());
|
status.setConversationProfilePicture(ppConversation);
|
||||||
|
status.setConversationId(conversation.getId());
|
||||||
|
tempStatus.add(status);
|
||||||
}
|
}
|
||||||
status.setConversationProfilePicture(ppConversation);
|
|
||||||
status.setConversationProfilePictureStatic(ppConversationStatic);
|
|
||||||
status.setConversationId(conversation.getId());
|
|
||||||
tempStatus.add(status);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -170,16 +168,14 @@ public class RetrieveMissingFeedsAsyncTask extends AsyncTask<Void, Void, Void> {
|
||||||
if (conversations != null && conversations.size() > 0) {
|
if (conversations != null && conversations.size() > 0) {
|
||||||
for (Conversation conversation : conversations) {
|
for (Conversation conversation : conversations) {
|
||||||
app.fedilab.android.client.Entities.Status status = conversation.getLast_status();
|
app.fedilab.android.client.Entities.Status status = conversation.getLast_status();
|
||||||
List<String> ppConversationStatic = new ArrayList<>();
|
if (status != null) {
|
||||||
List<String> ppConversation = new ArrayList<>();
|
List<String> ppConversation = new ArrayList<>();
|
||||||
for (Account account : conversation.getAccounts()) {
|
for (Account account : conversation.getAccounts())
|
||||||
ppConversationStatic.add(account.getAvatar_static());
|
ppConversation.add(account.getAvatar());
|
||||||
ppConversation.add(account.getAvatar());
|
status.setConversationProfilePicture(ppConversation);
|
||||||
|
status.setConversationId(conversation.getId());
|
||||||
|
tempStatus.add(status);
|
||||||
}
|
}
|
||||||
status.setConversationProfilePicture(ppConversation);
|
|
||||||
status.setConversationProfilePictureStatic(ppConversationStatic);
|
|
||||||
status.setConversationId(conversation.getId());
|
|
||||||
tempStatus.add(status);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,7 +141,6 @@ public class Status implements Parcelable{
|
||||||
|
|
||||||
public Status(){}
|
public Status(){}
|
||||||
private List<String> conversationProfilePicture;
|
private List<String> conversationProfilePicture;
|
||||||
private List<String> conversationProfilePictureStatic;
|
|
||||||
private String webviewURL = null;
|
private String webviewURL = null;
|
||||||
|
|
||||||
private boolean isBoostAnimated = false, isFavAnimated = false;
|
private boolean isBoostAnimated = false, isFavAnimated = false;
|
||||||
|
@ -208,7 +207,6 @@ public class Status implements Parcelable{
|
||||||
dest.writeByte(this.isExpanded ? (byte) 1 : (byte) 0);
|
dest.writeByte(this.isExpanded ? (byte) 1 : (byte) 0);
|
||||||
dest.writeInt(this.numberLines);
|
dest.writeInt(this.numberLines);
|
||||||
dest.writeStringList(this.conversationProfilePicture);
|
dest.writeStringList(this.conversationProfilePicture);
|
||||||
dest.writeStringList(this.conversationProfilePictureStatic);
|
|
||||||
dest.writeString(this.webviewURL);
|
dest.writeString(this.webviewURL);
|
||||||
dest.writeByte(this.isBoostAnimated ? (byte) 1 : (byte) 0);
|
dest.writeByte(this.isBoostAnimated ? (byte) 1 : (byte) 0);
|
||||||
dest.writeByte(this.isFavAnimated ? (byte) 1 : (byte) 0);
|
dest.writeByte(this.isFavAnimated ? (byte) 1 : (byte) 0);
|
||||||
|
@ -275,7 +273,6 @@ public class Status implements Parcelable{
|
||||||
this.isExpanded = in.readByte() != 0;
|
this.isExpanded = in.readByte() != 0;
|
||||||
this.numberLines = in.readInt();
|
this.numberLines = in.readInt();
|
||||||
this.conversationProfilePicture = in.createStringArrayList();
|
this.conversationProfilePicture = in.createStringArrayList();
|
||||||
this.conversationProfilePictureStatic = in.createStringArrayList();
|
|
||||||
this.webviewURL = in.readString();
|
this.webviewURL = in.readString();
|
||||||
this.isBoostAnimated = in.readByte() != 0;
|
this.isBoostAnimated = in.readByte() != 0;
|
||||||
this.isFavAnimated = in.readByte() != 0;
|
this.isFavAnimated = in.readByte() != 0;
|
||||||
|
@ -1614,11 +1611,4 @@ public class Status implements Parcelable{
|
||||||
this.imageURL = imageURL;
|
this.imageURL = imageURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<String> getConversationProfilePictureStatic() {
|
|
||||||
return conversationProfilePictureStatic;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setConversationProfilePictureStatic(List<String> conversationProfilePictureStatic) {
|
|
||||||
this.conversationProfilePictureStatic = conversationProfilePictureStatic;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -503,17 +503,15 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn
|
||||||
List<Status> statusesConversations = new ArrayList<>();
|
List<Status> statusesConversations = new ArrayList<>();
|
||||||
if( conversations != null) {
|
if( conversations != null) {
|
||||||
for (Conversation conversation : conversations) {
|
for (Conversation conversation : conversations) {
|
||||||
app.fedilab.android.client.Entities.Status status = conversation.getLast_status();
|
Status status = conversation.getLast_status();
|
||||||
List<String> ppConversationStatic = new ArrayList<>();
|
if (status != null) {
|
||||||
List<String> ppConversation = new ArrayList<>();
|
status.setConversationId(conversation.getId());
|
||||||
for (Account account : conversation.getAccounts()) {
|
List<String> ppConversation = new ArrayList<>();
|
||||||
ppConversationStatic.add(account.getAvatar_static());
|
for (Account account : conversation.getAccounts())
|
||||||
ppConversation.add(account.getAvatar());
|
ppConversation.add(account.getAvatar());
|
||||||
|
status.setConversationProfilePicture(ppConversation);
|
||||||
|
statusesConversations.add(status);
|
||||||
}
|
}
|
||||||
status.setConversationProfilePicture(ppConversation);
|
|
||||||
status.setConversationProfilePictureStatic(ppConversationStatic);
|
|
||||||
status.setConversationId(conversation.getId());
|
|
||||||
statusesConversations.add(status);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
apiResponse.setStatuses(statusesConversations);
|
apiResponse.setStatuses(statusesConversations);
|
||||||
|
|
Loading…
Reference in New Issue