Pre-reply sheets
This commit is contained in:
@@ -5,4 +5,8 @@ package org.joinmastodon.android.model;
|
||||
*/
|
||||
public interface DisplayItemsParent{
|
||||
String getID();
|
||||
|
||||
default String getAccountID(){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,11 @@ public class Notification extends BaseModel implements DisplayItemsParent{
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAccountID(){
|
||||
return status!=null ? account.id : null;
|
||||
}
|
||||
|
||||
public enum Type{
|
||||
@SerializedName("follow")
|
||||
FOLLOW,
|
||||
|
||||
@@ -34,10 +34,18 @@ public class SearchResult extends BaseModel implements DisplayItemsParent{
|
||||
generateID();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getID(){
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAccountID(){
|
||||
if(type==Type.STATUS)
|
||||
return status.getAccountID();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postprocess() throws ObjectValidationException{
|
||||
super.postprocess();
|
||||
|
||||
@@ -143,6 +143,11 @@ public class Status extends BaseModel implements DisplayItemsParent{
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAccountID(){
|
||||
return getContentStatus().account.id;
|
||||
}
|
||||
|
||||
public void update(StatusCountersUpdatedEvent ev){
|
||||
favouritesCount=ev.favorites;
|
||||
reblogsCount=ev.reblogs;
|
||||
|
||||
Reference in New Issue
Block a user