Centralization in CustomGlideRequest of the corner rounding setting for images

This commit is contained in:
antonio 2023-03-16 19:47:39 +01:00
parent afa5375675
commit 1ac6ab3e3c
32 changed files with 99 additions and 106 deletions

View file

@ -25,6 +25,8 @@ object Preferences {
private const val SYNC_STARRED_TRACKS_FOR_OFFLINE_USE = "sync_starred_tracks_for_offline_use"
private const val QUEUE_SYNCING = "queue_syncing"
private const val QUEUE_SYNCING_COUNTDOWN = "queue_syncing_countdown"
private const val ROUNDED_CORNER = "rounded_corner"
private const val ROUNDED_CORNER_SIZE = "rounded_corner_size"
@JvmStatic
fun getServer(): String? {
@ -195,4 +197,14 @@ object Preferences {
fun getSyncCountdownTimer(): Int {
return App.getInstance().preferences.getString(QUEUE_SYNCING_COUNTDOWN, "5")!!.toInt()
}
@JvmStatic
fun isCornerRoundingEnabled(): Boolean {
return App.getInstance().preferences.getBoolean(ROUNDED_CORNER, false)
}
@JvmStatic
fun getRoundedCornerSize(): Int {
return App.getInstance().preferences.getString(ROUNDED_CORNER_SIZE, "12")!!.toInt()
}
}