aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/ca/allanwang/kau/swipe/RelativeSlider.kt
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/kotlin/ca/allanwang/kau/swipe/RelativeSlider.kt')
-rw-r--r--core/src/main/kotlin/ca/allanwang/kau/swipe/RelativeSlider.kt7
1 files changed, 2 insertions, 5 deletions
diff --git a/core/src/main/kotlin/ca/allanwang/kau/swipe/RelativeSlider.kt b/core/src/main/kotlin/ca/allanwang/kau/swipe/RelativeSlider.kt
index 2ffb2ef..f14f5cf 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/swipe/RelativeSlider.kt
+++ b/core/src/main/kotlin/ca/allanwang/kau/swipe/RelativeSlider.kt
@@ -1,7 +1,5 @@
package ca.allanwang.kau.swipe
-import ca.allanwang.kau.kotlin.nonReadable
-
/**
* Created by Mr.Jude on 2015/8/26.
*
@@ -9,13 +7,12 @@ import ca.allanwang.kau.kotlin.nonReadable
*
* Helper class to give the previous activity an offset as the main page is pulled
*/
-class RelativeSlider(var curPage: SwipeBackPage) : SwipeListener {
+internal class RelativeSlider(var curPage: SwipeBackPage) : SwipeListener {
var offset = 0f
var enabled: Boolean
- @Deprecated(level = DeprecationLevel.ERROR, message = "Cannot use enabled as getter")
- get() = nonReadable()
+ get() = curPage.hasListener(this)
set(value) {
if (value) curPage.addListener(this)
else curPage.removeListener(this)