feat: use targetAccount domain name in lookup dialog
This commit is contained in:
parent
1098c855c4
commit
32da4f8e09
|
@ -1139,6 +1139,7 @@ public class UiUtils {
|
|||
return;
|
||||
}
|
||||
|
||||
String finalDomain = domain;
|
||||
new GetSearchResults(trimmedQuery, type, false).setCallback(new Callback<>() {
|
||||
@Override
|
||||
public void onSuccess(SearchResults results) {
|
||||
|
@ -1156,7 +1157,7 @@ public class UiUtils {
|
|||
}
|
||||
})
|
||||
.wrapProgress((Activity)context, R.string.loading, true,
|
||||
d -> transformDialogForLookup(context, targetAccountID, null, d))
|
||||
d -> transformDialogForLookup(context, targetAccountID, null, d, finalDomain))
|
||||
.execNoAuth(domain);
|
||||
}
|
||||
|
||||
|
@ -1164,9 +1165,13 @@ public class UiUtils {
|
|||
openURL(context, accountID, url, true);
|
||||
}
|
||||
|
||||
private static void transformDialogForLookup(Context context, String accountID, @Nullable String url, ProgressDialog dialog) {
|
||||
private static void transformDialogForLookup(Context context, String accountID, @Nullable String url, ProgressDialog dialog){
|
||||
transformDialogForLookup(context, accountID, url, dialog, null);
|
||||
}
|
||||
|
||||
private static void transformDialogForLookup(Context context, String accountID, @Nullable String url, ProgressDialog dialog, @Nullable String instanceName) {
|
||||
if (accountID != null) {
|
||||
dialog.setTitle(context.getString(R.string.sk_loading_resource_on_instance_title, getInstanceName(accountID)));
|
||||
dialog.setTitle(context.getString(R.string.sk_loading_resource_on_instance_title, instanceName != null ? instanceName : getInstanceName(accountID)));
|
||||
} else {
|
||||
dialog.setTitle(R.string.sk_loading_fediverse_resource_title);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue