forked from mirrors/Fedilab
Improve interactions
This commit is contained in:
parent
12fae6059a
commit
112701dd86
6 changed files with 297 additions and 742 deletions
|
@ -115,7 +115,7 @@ public class Account implements Serializable {
|
|||
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 +126,11 @@ 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);
|
||||
}
|
||||
|
||||
public static class AccountParams implements Serializable {
|
||||
|
|
|
@ -56,7 +56,7 @@ public class Announcement {
|
|||
|
||||
|
||||
public synchronized Spannable getSpanContent(Context context, WeakReference<View> viewWeakReference) {
|
||||
return SpannableHelper.convert(context, content, null, null, this, true, false, viewWeakReference);
|
||||
return SpannableHelper.convert(context, content, null, null, this, viewWeakReference);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ public class Field implements Serializable {
|
|||
if (verified_at != null && value != null) {
|
||||
value_span = new ForegroundColorSpan(ContextCompat.getColor(context, R.color.verified_text));
|
||||
}
|
||||
Spannable spannable = SpannableHelper.convert(context, value, null, account, null, true, true, viewWeakReference);
|
||||
Spannable spannable = SpannableHelper.convert(context, value, null, account, null, viewWeakReference);
|
||||
if (value_span != null && spannable != null) {
|
||||
spannable.setSpan(value_span, 0, spannable.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ public class Field implements Serializable {
|
|||
|
||||
public synchronized Spannable getLabelSpan(Context context, Account account, WeakReference<View> viewWeakReference) {
|
||||
|
||||
Spannable spannable = SpannableHelper.convert(context, name, null, account, null, true, true, viewWeakReference);
|
||||
Spannable spannable = SpannableHelper.convert(context, name, null, account, null, viewWeakReference);
|
||||
if (name_span != null && spannable != null) {
|
||||
spannable.setSpan(name_span, 0, spannable.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ public class Poll implements Serializable {
|
|||
public transient Spannable span_title;
|
||||
|
||||
public Spannable getSpanTitle(Context context, Status status, WeakReference<View> viewWeakReference) {
|
||||
span_title = SpannableHelper.convert(context, title, status, null, null, false, false, viewWeakReference);
|
||||
span_title = SpannableHelper.convert(context, title, status, null, null, viewWeakReference);
|
||||
return span_title;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -134,21 +134,21 @@ public class Status implements Serializable, Cloneable {
|
|||
|
||||
public synchronized Spannable getSpanContent(Context context, WeakReference<View> viewWeakReference, Callback callback) {
|
||||
if (contentSpan == null) {
|
||||
contentSpan = SpannableHelper.convert(context, content, this, null, null, true, false, viewWeakReference, callback);
|
||||
contentSpan = SpannableHelper.convert(context, content, this, null, null, viewWeakReference, callback);
|
||||
}
|
||||
return contentSpan;
|
||||
}
|
||||
|
||||
public synchronized Spannable getSpanSpoiler(Context context, WeakReference<View> viewWeakReference, Callback callback) {
|
||||
if (contentSpoilerSpan == null) {
|
||||
contentSpoilerSpan = SpannableHelper.convert(context, spoiler_text, this, null, null, true, false, viewWeakReference, callback);
|
||||
contentSpoilerSpan = SpannableHelper.convert(context, spoiler_text, this, null, null, viewWeakReference, callback);
|
||||
}
|
||||
return contentSpoilerSpan;
|
||||
}
|
||||
|
||||
public synchronized Spannable getSpanTranslate(Context context, WeakReference<View> viewWeakReference, Callback callback) {
|
||||
if (contentTranslateSpan == null) {
|
||||
contentTranslateSpan = SpannableHelper.convert(context, translationContent, this, null, null, true, false, viewWeakReference, callback);
|
||||
contentTranslateSpan = SpannableHelper.convert(context, translationContent, this, null, null, viewWeakReference, callback);
|
||||
}
|
||||
return contentTranslateSpan;
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue