Skip to content

Commit 14db506

Browse files
Update AppHelper.kt
Signed-off-by: HᴇCᴏᴅᴇs2ᴍᴜᴄʜ <wayne6324@gmail.com>
1 parent 57369bb commit 14db506

File tree

1 file changed

+5
-5
lines changed
  • app/src/main/java/com/github/droidworksstudio/launcher/helper

1 file changed

+5
-5
lines changed

app/src/main/java/com/github/droidworksstudio/launcher/helper/AppHelper.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,11 @@ class AppHelper @Inject constructor() {
137137
}
138138
}
139139

140-
fun getGravityFromSelectedItem(selectedItem: String): Int {
140+
fun getGravityFromSelectedItem(selectedItem: Int): Int {
141141
return when (selectedItem) {
142-
"Left" -> Gravity.START
143-
"Center" -> Gravity.CENTER
144-
"Right" -> Gravity.END
142+
0 -> Gravity.START
143+
1 -> Gravity.CENTER
144+
2 -> Gravity.END
145145
else -> Gravity.START
146146
}
147147
}
@@ -387,4 +387,4 @@ class AppHelper @Inject constructor() {
387387

388388
// Data class to hold cached weather data along with timestamp
389389
data class CachedWeatherData(val timestamp: Long, val weatherResponse: WeatherResponse)
390-
}
390+
}

0 commit comments

Comments
 (0)