Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
RobbWatershed committed Jan 31, 2024
1 parent de43c60 commit 573c2d9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,9 @@ class CookiesDialogFragment : DialogFragment(R.layout.dialog_prefs_cookies) {
private var binding: DialogPrefsCookiesBinding? = null

// === VARIABLES
// private var parent: Parent? = null
private lateinit var sites: List<Site>


override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
// parent = parentFragment as Parent
}

override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
Expand All @@ -43,7 +37,6 @@ class CookiesDialogFragment : DialogFragment(R.layout.dialog_prefs_cookies) {
}

override fun onDestroyView() {
// parent = null
binding = null
super.onDestroyView()
}
Expand Down Expand Up @@ -82,7 +75,10 @@ class CookiesDialogFragment : DialogFragment(R.layout.dialog_prefs_cookies) {
val site = sites[sitePicker.index - 1]
cookies = HttpHelper.parseCookies(HttpHelper.getCookies(site.url))
}
cookiesList.text = TextUtils.join("\n", cookies.keys)
if (cookies.keys.isNotEmpty())
cookiesList.text = TextUtils.join("\n", cookies.keys)
else
cookiesList.text = resources.getString(R.string.pref_browser_clear_cookies_ko)
}
}

Expand Down
5 changes: 4 additions & 1 deletion app/src/main/res/layout/dialog_prefs_cookies.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@
android:gravity="center"
android:padding="8dp"
android:text=" "
android:scrollbarAlwaysDrawVerticalTrack="true"
android:scrollbars="vertical"
android:maxHeight="200dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/site_picker"
tools:text="Keep 546 books" />
tools:text="Stuff" />

<com.google.android.material.button.MaterialButton
android:id="@+id/action_button"
Expand Down

0 comments on commit 573c2d9

Please sign in to comment.