PageFragment: do not count URL as visited twice
This commit is contained in:
parent
44aa42e67d
commit
f7b1b9072c
|
@ -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 -> {
|
||||||
|
|
Reference in a new issue