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