diff --git a/app/src/main/java/dev/lowrespalmtree/comet/PageViewFragment.kt b/app/src/main/java/dev/lowrespalmtree/comet/PageViewFragment.kt index a016b63..fd7076a 100644 --- a/app/src/main/java/dev/lowrespalmtree/comet/PageViewFragment.kt +++ b/app/src/main/java/dev/lowrespalmtree/comet/PageViewFragment.kt @@ -63,6 +63,11 @@ class PageViewFragment : Fragment(), ContentAdapter.ContentAdapterListener { pageViewModel.event.observe(viewLifecycleOwner, { handleEvent(it) }) activity?.onBackPressedDispatcher?.addCallback(viewLifecycleOwner) { onBackPressed() } + + if (visitedUrls.isEmpty()) { + PreferenceManager.getDefaultSharedPreferences(requireContext()) + .getString("home", null)?.let { openUrl(it) } + } } override fun onLinkClick(url: String) {