Browse Source

Fixed parameters that send to server

sirekanyan 8 năm trước cách đây
mục cha
commit
84dc2be108

+ 1 - 1
app/src/main/java/me/vadik/knigopis/BookActivity.kt

@@ -113,7 +113,7 @@ class BookActivity : AppCompatActivity() {
                                 titleEditText.text.toString(),
                                 authorEditText.text.toString(),
                                 notesTextArea.text.toString(),
-                                progressSeekBar.progress
+                                progressSeekBar.progress.takeIf { it in (1..100) }
                             ),
                             wasFinished
                         )

+ 1 - 1
app/src/main/java/me/vadik/knigopis/model/PlannedBookToSend.kt

@@ -4,5 +4,5 @@ class PlannedBookToSend(
     val title: String,
     val author: String,
     val notes: String,
-    val priority: Int
+    val priority: Int?
 )