Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bdfd1e3a authored by tibbi's avatar tibbi
Browse files

adding a toggle for enabling Pull to refresh

parent e4bc2e42
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ buildscript {
        propMinSdkVersion = 16
        propTargetSdkVersion = propCompileSdkVersion
        propVersionCode = 1
        propVersionName = '3.12.24'
        propVersionName = '3.13.0'
        kotlin_version = '1.2.21'
        support_libs = '27.0.2'
    }
+8 −0
Original line number Diff line number Diff line
@@ -163,4 +163,12 @@ open class BaseConfig(val context: Context) {
    var skipDeleteConfirmation: Boolean
        get() = prefs.getBoolean(SKIP_DELETE_CONFIRMATION, false)
        set(skipDeleteConfirmation) = prefs.edit().putBoolean(SKIP_DELETE_CONFIRMATION, skipDeleteConfirmation).apply()

    var enablePullToRefresh: Boolean
        get() = prefs.getBoolean(ENABLE_PULL_TO_REFRESH, true)
        set(enablePullToRefresh) = prefs.edit().putBoolean(ENABLE_PULL_TO_REFRESH, enablePullToRefresh).apply()

    var scrollHorizontally: Boolean
        get() = prefs.getBoolean(SCROLL_HORIZONTALLY, false)
        set(scrollHorizontally) = prefs.edit().putBoolean(SCROLL_HORIZONTALLY, scrollHorizontally).apply()
}
+2 −0
Original line number Diff line number Diff line
@@ -46,6 +46,8 @@ const val LAST_CONFLICT_APPLY_TO_ALL = "last_conflict_apply_to_all"
const val AVOID_WHATS_NEW = "avoid_whats_new"
const val HAD_THANK_YOU_INSTALLED = "had_thank_you_installed"
const val SKIP_DELETE_CONFIRMATION = "skip_delete_confirmation"
const val ENABLE_PULL_TO_REFRESH = "enable_pull_to_refresh"
const val SCROLL_HORIZONTALLY = "scroll_horizontally"

// licenses
const val LICENSE_KOTLIN = 1
+3 −1
Original line number Diff line number Diff line
@@ -237,7 +237,9 @@ class FastScroller : FrameLayout {
            MotionEvent.ACTION_UP, MotionEvent.ACTION_CANCEL -> {
                handleYOffset = 0
                handle!!.isSelected = false
                if (context.baseConfig.enablePullToRefresh) {
                    swipeRefreshLayout?.isEnabled = true
                }
                hideHandle()
                true
            }
+1 −0
Original line number Diff line number Diff line
@@ -248,6 +248,7 @@
    <string name="show_info_bubble">Mostra una bombolla d\'informació en elements de desplaçament mitjançant arrossegament de la barra de desplaçament</string>
    <string name="prevent_phone_from_sleeping">Evita que el telèfon dormi</string>
    <string name="skip_delete_confirmation">Always skip delete confirmation dialog</string>
    <string name="enable_pull_to_refresh">Enable pull-to-refresh from the top</string>

    <!-- Setting sections -->
    <string name="visibility">Visibilitat</string>
Loading