summaryrefslogtreecommitdiffstats
path: root/app/src/main/java/app/fedilab/android/client/entities/api/Account.java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/app/fedilab/android/client/entities/api/Account.java')
-rw-r--r--app/src/main/java/app/fedilab/android/client/entities/api/Account.java66
1 files changed, 31 insertions, 35 deletions
diff --git a/app/src/main/java/app/fedilab/android/client/entities/api/Account.java b/app/src/main/java/app/fedilab/android/client/entities/api/Account.java
index 9c423554c..36667aa8c 100644
--- a/app/src/main/java/app/fedilab/android/client/entities/api/Account.java
+++ b/app/src/main/java/app/fedilab/android/client/entities/api/Account.java
@@ -87,35 +87,13 @@ public class Account implements Serializable {
public Account moved;
@SerializedName("role")
public Role role;
-
-
- public static class Role implements Serializable {
- @SerializedName("id")
- public String id;
- @SerializedName("name")
- public String name;
- @SerializedName("color")
- public String color;
- @SerializedName("position")
- public int position;
- @SerializedName("permissions")
- public int permissions;
- @SerializedName("highlighted")
- public boolean highlighted;
- @SerializedName("created_at")
- public Date created_at;
- @SerializedName("updated_at")
- public Date updated_at;
- }
-
-
public transient RelationShip relationShip;
public synchronized Spannable getSpanDisplayName(Context context, WeakReference<View> viewWeakReference) {
if (display_name == null || display_name.isEmpty()) {
display_name = username;
}
- return SpannableHelper.convert(context, display_name, null, this, null, false, false, viewWeakReference);
+ return SpannableHelper.convert(context, display_name, null, this, null, viewWeakReference);
}
public synchronized Spannable getSpanDisplayName(Activity activity, WeakReference<View> viewWeakReference) {
@@ -126,11 +104,39 @@ public class Account implements Serializable {
}
public synchronized Spannable getSpanDisplayNameTitle(Context context, WeakReference<View> viewWeakReference, String title) {
- return SpannableHelper.convert(context, title, null, this, null, false, false, viewWeakReference);
+ return SpannableHelper.convert(context, title, null, this, null, viewWeakReference);
}
public synchronized Spannable getSpanNote(Context context, WeakReference<View> viewWeakReference) {
- return SpannableHelper.convert(context, note, null, this, null, true, true, viewWeakReference);
+ return SpannableHelper.convert(context, note, null, this, null, viewWeakReference);
+ }
+
+ @Override
+ public boolean equals(@Nullable Object obj) {
+ boolean same = false;
+ if (obj instanceof Account) {
+ same = this.id.equals(((Account) obj).id);
+ }
+ return same;
+ }
+
+ public static class Role implements Serializable {
+ @SerializedName("id")
+ public String id;
+ @SerializedName("name")
+ public String name;
+ @SerializedName("color")
+ public String color;
+ @SerializedName("position")
+ public int position;
+ @SerializedName("permissions")
+ public int permissions;
+ @SerializedName("highlighted")
+ public boolean highlighted;
+ @SerializedName("created_at")
+ public Date created_at;
+ @SerializedName("updated_at")
+ public Date updated_at;
}
public static class AccountParams implements Serializable {
@@ -150,14 +156,4 @@ public class Account implements Serializable {
public LinkedHashMap<Integer, Field.FieldParams> fields;
}
-
-
- @Override
- public boolean equals(@Nullable Object obj) {
- boolean same = false;
- if (obj instanceof Account) {
- same = this.id.equals(((Account) obj).id);
- }
- return same;
- }
}