PageFragment: do not count URL as visited twice

This commit is contained in:
dece 2022-02-18 21:36:14 +01:00
parent 44aa42e67d
commit f7b1b9072c

View file

@ -157,6 +157,7 @@ class PageFragment : Fragment(), PageAdapter.Listener {
}
is PageViewModel.SuccessEvent -> {
vm.currentUrl = event.uri
if (vm.visitedUrls.isEmpty() || vm.visitedUrls.last() != event.uri)
vm.visitedUrls.add(event.uri)
binding.addressBar.setText(event.uri)
}