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 f626389 commit 487350bCopy full SHA for 487350b
app/src/main/kotlin/com/simplemobiletools/notes/pro/helpers/Constants.kt
@@ -44,9 +44,6 @@ const val GRAVITY_LEFT = 0
44
const val GRAVITY_CENTER = 1
45
const val GRAVITY_RIGHT = 2
46
47
-// note types
48
-enum class NoteType(val value: Int) { TYPE_TEXT(0), TYPE_CHECKLIST(1) }
49
-
50
// mime types
51
const val MIME_TEXT_PLAIN = "text/plain"
52
app/src/main/kotlin/com/simplemobiletools/notes/pro/models/NoteType.kt
@@ -0,0 +1,15 @@
1
+package com.simplemobiletools.notes.pro.models
2
+
3
+import kotlinx.serialization.Serializable
4
5
+@Serializable
6
+enum class NoteType(val value: Int) {
7
+ TYPE_TEXT(0),
8
+ TYPE_CHECKLIST(1);
9
10
+ companion object {
11
+ fun fromValue(value: Int): NoteType {
12
+ return values().find { it.value == value } ?: TYPE_TEXT
13
+ }
14
15
+}
0 commit comments