Skip to content

Commit

Permalink
sca-133
Browse files Browse the repository at this point in the history
  • Loading branch information
arvifox committed Oct 9, 2023
1 parent 41a911e commit 37da2b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 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 @@ -136,16 +136,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 37da2b4

Please sign in to comment.