Using `Either<Throwable, T>` is basically the same as `Result<T>` with a less friendly API. Futhermore, `Either` is currently only used in a single component. - Replace `Either` with `Result` in `AccountsInListFragment` and `AccountsInListViewModel`. - Add a method to convert a `NetworkResult` to a `Result` in `AccountsInListViewModel`. Alternatively, `NetworkResult` could be used everywhere in the code but other classes are already using `Result`. - Replace `updateState()` method with `MutableStateFlow.update()` in `AccountsInListViewModel`. - Store the current search query in a `MutableStateFlow` collected by a coroutine. This allows automatically cancelling the previous search when a new query arrives, instead of launching a new coroutine for each query which may conflict with the previous ones. - Optimize `ListUtils`. |
||
|---|---|---|
| .. | ||
| schemas/com.keylesspalace.tusky.db.AppDatabase | ||
| src | ||
| build.gradle | ||
| getGitSha.gradle | ||
| lint-baseline.xml | ||
| lint.xml | ||
| proguard-rules.pro | ||