mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-16 05:57:29 +01:00
Update types of legacy tracker model to match to domain one (#245)
* `score` to Double * `tracker_id` to Long * `last_chapter_read` to Double * `total_chapters` to Long * `status` to Long
This commit is contained in:
@@ -285,13 +285,13 @@ private data class TrackStatusSelectorScreen(
|
||||
private class Model(
|
||||
private val track: Track,
|
||||
private val tracker: Tracker,
|
||||
) : StateScreenModel<Model.State>(State(track.status.toInt())) {
|
||||
) : StateScreenModel<Model.State>(State(track.status)) {
|
||||
|
||||
fun getSelections(): Map<Int, StringResource?> {
|
||||
fun getSelections(): Map<Long, StringResource?> {
|
||||
return tracker.getStatusList().associateWith { tracker.getStatus(it) }
|
||||
}
|
||||
|
||||
fun setSelection(selection: Int) {
|
||||
fun setSelection(selection: Long) {
|
||||
mutableState.update { it.copy(selection = selection) }
|
||||
}
|
||||
|
||||
@@ -303,7 +303,7 @@ private data class TrackStatusSelectorScreen(
|
||||
|
||||
@Immutable
|
||||
data class State(
|
||||
val selection: Int,
|
||||
val selection: Long,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user