Conversation
|
@mdrlzy Could you brief which improvements were made in this PR? |
scorewidget/build.gradle.kts
Outdated
| implementation(libraries.arklib) | ||
| implementation(libraries.orbit.mvi.viewmodel) | ||
| implementation(libs.orbit.mvi.compose) | ||
| implementation("com.github.mdrlzy:ComposeCounterSlider:0.1.4") |
There was a problem hiding this comment.
Can this dependency be added in predefined version management scheme that we already have?
|
Looks awesome! One bug, not critical since it's just a sample:
|
| ) = lifecycleScope.launch { | ||
| val (index, scoreStorage) = setupIndexAndScoreStorage(root) | ||
| val id = index.allPaths().toList() | ||
| .find { it.second == resourcePath }!!.first |
There was a problem hiding this comment.
The result of find could be null, and app will crash in that case because of !! assertion.
There was a problem hiding this comment.
Fixed. This can happen if file is selected from outside root
| root: Path, | ||
| resourcePath: Path | ||
| ) = lifecycleScope.launch { | ||
| val (index, scoreStorage) = setupIndexAndScoreStorage(root) |
There was a problem hiding this comment.
setupIndexAndScoreStorage is a suspend function so it should be scheduled in background thread. It's now running in main.
There was a problem hiding this comment.
I was sure that initialization of Index and ScoreStorage occurs on Dispatcher.IO, but ScoreStorage does not change dispatcher :/
Replace old score view with plain arrows with new one with animations
Before
After
scorewidgetnew.mp4