Refactoring

This commit is contained in:
M66B 2021-04-05 15:43:30 +02:00
parent 9498813e73
commit b55f257fbe
1 changed files with 5 additions and 5 deletions

View File

@ -99,8 +99,11 @@ public class FragmentDialogOpenLink extends FragmentDialogBase {
_title = null; _title = null;
final String title = _title; final String title = _title;
final Context context = getContext();
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
// Preload web view // Preload web view
Helper.customTabsWarmup(getContext()); Helper.customTabsWarmup(context);
// Process link // Process link
final Uri sanitized; final Uri sanitized;
@ -119,7 +122,7 @@ public class FragmentDialogOpenLink extends FragmentDialogBase {
uriTitle = null; uriTitle = null;
// Get views // Get views
final View dview = LayoutInflater.from(getContext()).inflate(R.layout.dialog_open_link, null); final View dview = LayoutInflater.from(context).inflate(R.layout.dialog_open_link, null);
final TextView tvTitle = dview.findViewById(R.id.tvTitle); final TextView tvTitle = dview.findViewById(R.id.tvTitle);
final ImageButton ibDifferent = dview.findViewById(R.id.ibDifferent); final ImageButton ibDifferent = dview.findViewById(R.id.ibDifferent);
final EditText etLink = dview.findViewById(R.id.etLink); final EditText etLink = dview.findViewById(R.id.etLink);
@ -140,9 +143,6 @@ public class FragmentDialogOpenLink extends FragmentDialogBase {
final Group grpDifferent = dview.findViewById(R.id.grpDifferent); final Group grpDifferent = dview.findViewById(R.id.grpDifferent);
final Group grpOwner = dview.findViewById(R.id.grpOwner); final Group grpOwner = dview.findViewById(R.id.grpOwner);
final Context context = getContext();
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
ibDifferent.setOnClickListener(new View.OnClickListener() { ibDifferent.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {