From 2f2a70040f1397b4171d7848fcb63acef5d8e1b4 Mon Sep 17 00:00:00 2001 From: dece Date: Thu, 17 Feb 2022 17:56:41 +0100 Subject: [PATCH] PageFragment: fix issue with empty home URL --- app/src/main/java/dev/lowrespalmtree/comet/PageFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/dev/lowrespalmtree/comet/PageFragment.kt b/app/src/main/java/dev/lowrespalmtree/comet/PageFragment.kt index a9077a6..d0717e9 100644 --- a/app/src/main/java/dev/lowrespalmtree/comet/PageFragment.kt +++ b/app/src/main/java/dev/lowrespalmtree/comet/PageFragment.kt @@ -63,7 +63,7 @@ class PageFragment : Fragment(), PageAdapter.Listener { Log.d(TAG, "onViewCreated: reuse current URL, probably fragment recreation") } else if (vm.visitedUrls.isEmpty()) { Log.d(TAG, "onViewCreated: no current URL, open home if configured") - Preferences.getHomeUrl(requireContext())?.let { openUrl(it) } + Preferences.getHomeUrl(requireContext())?.let { if (it.isNotBlank()) openUrl(it) } } }