Skip to content

Commit

Permalink
Merge branch 'develop' into fix/removal-of-splash-screen-night-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
AmadeyKuspakov authored Oct 9, 2023
2 parents 26e82b9 + 8197769 commit bcfc6ad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ buildscript {
composeCompiler : '1.5.3',
composeConstraintLayout: '1.1.0-alpha05',
uiCore : '0.2.7',
soraCard : '0.1.54',
soraCard : '0.1.55',
lazySodium : '5.0.2',
jna : '5.8.0',
accompanist : '0.30.1',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.flow.onStart
import kotlinx.coroutines.flow.withIndex
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext

Expand Down Expand Up @@ -136,16 +135,11 @@ class CardsHubViewModel @Inject constructor(
.subscribeVisibleCardsHubList()
.catch { onError(it) }
.distinctUntilChanged()
.withIndex()
.flatMapLatest { indexed ->
val data = indexed.value
if (indexed.index == 0) {
_state.value = _state.value.copy(
curAccount = data.first.accountTitle(),
loading = false,
cards = emptyList(),
)
}
.flatMapLatest { data ->
_state.value = _state.value.copy(
curAccount = data.first.accountTitle(),
loading = false,
)
val flows = data.second.filter { it.visibility }.map { cardHub ->
when (cardHub.cardType) {
CardHubType.ASSETS -> {
Expand Down

0 comments on commit bcfc6ad

Please sign in to comment.