PageViewFragment: handle home page
This commit is contained in:
parent
656b699ce9
commit
51d1844ba0
|
@ -63,6 +63,11 @@ class PageViewFragment : Fragment(), ContentAdapter.ContentAdapterListener {
|
||||||
pageViewModel.event.observe(viewLifecycleOwner, { handleEvent(it) })
|
pageViewModel.event.observe(viewLifecycleOwner, { handleEvent(it) })
|
||||||
|
|
||||||
activity?.onBackPressedDispatcher?.addCallback(viewLifecycleOwner) { onBackPressed() }
|
activity?.onBackPressedDispatcher?.addCallback(viewLifecycleOwner) { onBackPressed() }
|
||||||
|
|
||||||
|
if (visitedUrls.isEmpty()) {
|
||||||
|
PreferenceManager.getDefaultSharedPreferences(requireContext())
|
||||||
|
.getString("home", null)?.let { openUrl(it) }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onLinkClick(url: String) {
|
override fun onLinkClick(url: String) {
|
||||||
|
|
Reference in a new issue