Refactoring

pull/194/merge
M66B 3 years ago
parent 4d38281d64
commit fe6f50200a

@ -3840,9 +3840,12 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
}
if (Boolean.FALSE.equals(message.reply_domain)) {
if (sb.length() > 0)
sb.append('\n');
sb.append(message.checkReplyDomain(context));
String[] warning = message.checkReplyDomain(context);
if (warning != null) {
if (sb.length() > 0)
sb.append('\n');
sb.append(context.getString(R.string.title_reply_domain, warning[0], warning[1]));
}
}
if (message.from != null && message.from.length > 0) {

@ -3795,7 +3795,7 @@ class Core {
}
if (!self) {
String warning = message.checkReplyDomain(context);
String[] warning = message.checkReplyDomain(context);
message.reply_domain = (warning == null);
}

@ -307,7 +307,7 @@ public class EntityMessage implements Serializable {
return hasKeyword(MessageHelper.FLAG_FORWARDED);
}
String checkReplyDomain(Context context) {
String[] checkReplyDomain(Context context) {
if (from == null || from.length == 0)
return null;
if (reply == null || reply.length == 0)
@ -328,7 +328,7 @@ public class EntityMessage implements Serializable {
String fdomain = UriHelper.getParentDomain(context, f.substring(fat + 1));
if (!rdomain.equalsIgnoreCase(fdomain))
return context.getString(R.string.title_reply_domain, fdomain, rdomain);
return new String[]{fdomain, rdomain};
}
}

Loading…
Cancel
Save