diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2020-10-22 20:13:50 +0000 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2020-10-23 10:22:14 -0300 |
| commit | 40fc5e3b6fff6ac163d31bd72804d6cdb981b094 (patch) | |
| tree | 3fb2bb82d2299654871c06e3c6223c90436450f3 /android/src | |
| parent | 564949f62d11446e739f23b19539967e6cbe3e19 (diff) | |
| download | mullvadvpn-40fc5e3b6fff6ac163d31bd72804d6cdb981b094.tar.xz mullvadvpn-40fc5e3b6fff6ac163d31bd72804d6cdb981b094.zip | |
Refactor to create `dispatchScrollEvent` method
Diffstat (limited to 'android/src')
| -rw-r--r-- | android/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/CustomRecyclerView.kt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/CustomRecyclerView.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/CustomRecyclerView.kt index 710bb834d0..dd0392c3bb 100644 --- a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/CustomRecyclerView.kt +++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/CustomRecyclerView.kt @@ -22,6 +22,10 @@ class CustomRecyclerView : RecyclerView, ListenableScrollableView { override fun onScrolled(horizontalDelta: Int, verticalDelta: Int) { super.onScrolled(horizontalDelta, verticalDelta) + dispatchScrollEvent(horizontalDelta, verticalDelta) + } + + private fun dispatchScrollEvent(horizontalDelta: Int, verticalDelta: Int) { val oldHorizontalScrollOffset = horizontalScrollOffset val oldVerticalScrollOffset = verticalScrollOffset |
