@@ -105,6 +105,21 @@ public static ArrayList<StatusDisplayItem> buildItems(BaseStatusListFragment<?>
105
105
return buildItems (fragment , status , accountID , parentObject , knownAccounts , inset , addFooter , notification , false , filterContext );
106
106
}
107
107
108
+ public static ReblogOrReplyLineStatusDisplayItem buildReplyLine (BaseStatusListFragment <?> fragment , Status status , String accountID , DisplayItemsParent parent , Account account , boolean threadReply ) {
109
+ String parentID = parent .getID ();
110
+ String text = threadReply ? fragment .getString (R .string .sk_show_thread )
111
+ : account == null ? fragment .getString (R .string .sk_in_reply )
112
+ : GlobalUserPreferences .compactReblogReplyLine && status .reblog != null ? account .displayName
113
+ : fragment .getString (R .string .in_reply_to , account .displayName );
114
+ String fullText = threadReply ? fragment .getString (R .string .sk_show_thread )
115
+ : account == null ? fragment .getString (R .string .sk_in_reply )
116
+ : fragment .getString (R .string .in_reply_to , account .displayName );
117
+ return new ReblogOrReplyLineStatusDisplayItem (
118
+ parentID , fragment , text , account == null ? List .of () : account .emojis ,
119
+ R .drawable .ic_fluent_arrow_reply_20sp_filled , null , null , fullText
120
+ );
121
+ }
122
+
108
123
public static ArrayList <StatusDisplayItem > buildItems (BaseStatusListFragment <?> fragment , Status status , String accountID , DisplayItemsParent parentObject , Map <String , Account > knownAccounts , boolean inset , boolean addFooter , Notification notification , boolean disableTranslate , Filter .FilterContext filterContext ){
109
124
String parentID =parentObject .getID ();
110
125
ArrayList <StatusDisplayItem > items =new ArrayList <>();
@@ -120,17 +135,7 @@ public static ArrayList<StatusDisplayItem> buildItems(BaseStatusListFragment<?>
120
135
121
136
if (statusForContent .inReplyToAccountId !=null && !(threadReply && fragment instanceof ThreadFragment )){
122
137
Account account = knownAccounts .get (statusForContent .inReplyToAccountId );
123
- String text = threadReply ? fragment .getString (R .string .sk_show_thread )
124
- : account == null ? fragment .getString (R .string .sk_in_reply )
125
- : GlobalUserPreferences .compactReblogReplyLine && status .reblog != null ? account .displayName
126
- : fragment .getString (R .string .in_reply_to , account .displayName );
127
- String fullText = threadReply ? fragment .getString (R .string .sk_show_thread )
128
- : account == null ? fragment .getString (R .string .sk_in_reply )
129
- : fragment .getString (R .string .in_reply_to , account .displayName );
130
- replyLine = new ReblogOrReplyLineStatusDisplayItem (
131
- parentID , fragment , text , account == null ? List .of () : account .emojis ,
132
- R .drawable .ic_fluent_arrow_reply_20sp_filled , null , null , fullText
133
- );
138
+ replyLine = buildReplyLine (fragment , status , accountID , parentObject , account , threadReply );
134
139
}
135
140
136
141
if (status .reblog !=null ){
0 commit comments