X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Fdialogs%2FUrlHistoryDialog.kt;h=e9de8b31eda4fc20223234fa35fec70c4d8ca0fd;hp=4061ef733143eabfd8701b5dad056a7374e68a8a;hb=b0f0322c62a5cd25e587f1760a33fcf60c279954;hpb=8142ac5fc2489de735de4b6fa21a1eae733ccfce diff --git a/app/src/main/java/com/stoutner/privacybrowser/dialogs/UrlHistoryDialog.kt b/app/src/main/java/com/stoutner/privacybrowser/dialogs/UrlHistoryDialog.kt index 4061ef73..e9de8b31 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/dialogs/UrlHistoryDialog.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/dialogs/UrlHistoryDialog.kt @@ -159,7 +159,7 @@ class UrlHistoryDialog : DialogFragment() { val alertDialog = dialogBuilder.create() // Get a handle for the shared preferences. - val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context) + val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(requireContext()) // Get the screenshot preference. val allowScreenshots = sharedPreferences.getBoolean(getString(R.string.allow_screenshots_key), false) @@ -174,7 +174,7 @@ class UrlHistoryDialog : DialogFragment() { alertDialog.show() // Instantiate a history array adapter. - val historyArrayAdapter = HistoryArrayAdapter(context, historyArrayList, currentPageId) + val historyArrayAdapter = HistoryArrayAdapter(requireContext(), historyArrayList, currentPageId) // Get a handle for the list view. val listView = alertDialog.findViewById(R.id.history_listview)!!