We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 319e79b commit 4bdcde7Copy full SHA for 4bdcde7
1 file changed
app/src/main/java/to/bitkit/ext/GraphPeriod.kt
@@ -0,0 +1,13 @@
1
+package to.bitkit.ext
2
+
3
+import androidx.annotation.StringRes
4
+import to.bitkit.R
5
+import to.bitkit.data.dto.price.GraphPeriod
6
7
+@StringRes
8
+fun GraphPeriod.labelRes(): Int = when (this) {
9
+ GraphPeriod.ONE_DAY -> R.string.appwidget__price__day
10
+ GraphPeriod.ONE_WEEK -> R.string.appwidget__price__week
11
+ GraphPeriod.ONE_MONTH -> R.string.appwidget__price__month
12
+ GraphPeriod.ONE_YEAR -> R.string.appwidget__price__year
13
+}
0 commit comments