Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,12 @@ class SettingsRepository(
const val KEY_DUO_HIDE_WHEN_SCREEN_OFF = "duo_hide_when_screen_off"
const val KEY_DUO_HIDE_WHEN_SCREEN_OFF_ONLY_IDLE = "duo_hide_when_screen_off_only_idle"
const val KEY_DUO_USE_MATERIAL_YOU = "duo_use_material_you"
const val KEY_DUO_ENABLE_GESTURES = "duo_enable_gestures"
const val KEY_DUO_GESTURE_HAPTIC = "duo_gesture_haptic"
const val KEY_DUO_GESTURE_SINGLE_TAP = "duo_gesture_single_tap"
const val KEY_DUO_GESTURE_DOUBLE_TAP = "duo_gesture_double_tap"
const val KEY_DUO_GESTURE_ANIMATIONS = "duo_gesture_animations"
const val KEY_DUO_ROTARY_DIAL = "duo_rotary_dial"

// Live Wallpaper
const val LIVE_WALLPAPER_PREFS_NAME = "live_wallpaper_prefs"
Expand Down Expand Up @@ -3117,4 +3123,22 @@ class SettingsRepository(

fun isDuoUseMaterialYouEnabled(): Boolean = getBoolean(KEY_DUO_USE_MATERIAL_YOU, true)
fun setDuoUseMaterialYouEnabled(enabled: Boolean) = putBoolean(KEY_DUO_USE_MATERIAL_YOU, enabled)

fun isDuoEnableGesturesEnabled(): Boolean = getBoolean(KEY_DUO_ENABLE_GESTURES, true)
fun setDuoEnableGesturesEnabled(enabled: Boolean) = putBoolean(KEY_DUO_ENABLE_GESTURES, enabled)

fun isDuoGestureHapticEnabled(): Boolean = getBoolean(KEY_DUO_GESTURE_HAPTIC, true)
fun setDuoGestureHapticEnabled(enabled: Boolean) = putBoolean(KEY_DUO_GESTURE_HAPTIC, enabled)

fun getDuoGestureSingleTapAction(): String = getString(KEY_DUO_GESTURE_SINGLE_TAP, "notifications") ?: "notifications"
fun setDuoGestureSingleTapAction(action: String) = putString(KEY_DUO_GESTURE_SINGLE_TAP, action)

fun getDuoGestureDoubleTapAction(): String = getString(KEY_DUO_GESTURE_DOUBLE_TAP, "lock_screen") ?: "lock_screen"
fun setDuoGestureDoubleTapAction(action: String) = putString(KEY_DUO_GESTURE_DOUBLE_TAP, action)

fun isDuoGestureAnimationsEnabled(): Boolean = getBoolean(KEY_DUO_GESTURE_ANIMATIONS, true)
fun setDuoGestureAnimationsEnabled(enabled: Boolean) = putBoolean(KEY_DUO_GESTURE_ANIMATIONS, enabled)

fun isDuoRotaryDialEnabled(): Boolean = getBoolean(KEY_DUO_ROTARY_DIAL, true)
fun setDuoRotaryDialEnabled(enabled: Boolean) = putBoolean(KEY_DUO_ROTARY_DIAL, enabled)
}
Loading
Loading