-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0076eeb
commit 107e410
Showing
25 changed files
with
2,738 additions
and
2,644 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
778 changes: 396 additions & 382 deletions
778
...rc/main/java/com/wisnu/kurniawan/wallee/features/account/detail/ui/AccountDetailScreen.kt
Large diffs are not rendered by default.
Oops, something went wrong.
99 changes: 50 additions & 49 deletions
99
app/src/main/java/com/wisnu/kurniawan/wallee/features/dashboard/ui/DashboardHostViewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,50 @@ | ||
package com.wisnu.kurniawan.wallee.features.dashboard.ui | ||
|
||
import androidx.compose.material.icons.Icons | ||
import androidx.compose.material.icons.rounded.ReceiptLong | ||
import androidx.compose.material.icons.rounded.Wallet | ||
import androidx.lifecycle.viewModelScope | ||
import com.wisnu.foundation.coreviewmodel.StatefulViewModel | ||
import com.wisnu.kurniawan.wallee.R | ||
import com.wisnu.kurniawan.wallee.runtime.navigation.home.BalanceSummaryFlow | ||
import com.wisnu.kurniawan.wallee.runtime.navigation.home.TransactionSummaryFlow | ||
import dagger.hilt.android.lifecycle.HiltViewModel | ||
import javax.inject.Inject | ||
import kotlinx.coroutines.launch | ||
|
||
@HiltViewModel | ||
class DashboardHostViewModel @Inject constructor() : StatefulViewModel<DashboardHostState, Unit, Unit, Unit>(DashboardHostState(), Unit) { | ||
|
||
init { | ||
initTab() | ||
} | ||
|
||
override fun dispatch(action: Unit) { | ||
|
||
} | ||
|
||
private fun initTab() { | ||
viewModelScope.launch { | ||
setState { copy(sections = initial()) } | ||
} | ||
} | ||
|
||
private fun initial(): List<DashboardSection> { | ||
return listOf( | ||
DashboardSection( | ||
SectionType.TRANSACTION, | ||
R.string.dashboard_transaction, | ||
Icons.Rounded.ReceiptLong, | ||
TransactionSummaryFlow.Root.route | ||
), | ||
DashboardSection( | ||
SectionType.BALANCE, | ||
R.string.dashboard_balance, | ||
Icons.Rounded.Wallet, | ||
BalanceSummaryFlow.Root.route | ||
), | ||
) | ||
} | ||
|
||
} | ||
package com.wisnu.kurniawan.wallee.features.dashboard.ui | ||
|
||
import androidx.compose.material.icons.Icons | ||
import androidx.compose.material.icons.automirrored.rounded.ReceiptLong | ||
import androidx.compose.material.icons.rounded.ReceiptLong | ||
import androidx.compose.material.icons.rounded.Wallet | ||
import androidx.lifecycle.viewModelScope | ||
import com.wisnu.foundation.coreviewmodel.StatefulViewModel | ||
import com.wisnu.kurniawan.wallee.R | ||
import com.wisnu.kurniawan.wallee.runtime.navigation.home.BalanceSummaryFlow | ||
import com.wisnu.kurniawan.wallee.runtime.navigation.home.TransactionSummaryFlow | ||
import dagger.hilt.android.lifecycle.HiltViewModel | ||
import javax.inject.Inject | ||
import kotlinx.coroutines.launch | ||
|
||
@HiltViewModel | ||
class DashboardHostViewModel @Inject constructor() : StatefulViewModel<DashboardHostState, Unit, Unit, Unit>(DashboardHostState(), Unit) { | ||
|
||
init { | ||
initTab() | ||
} | ||
|
||
override fun dispatch(action: Unit) { | ||
|
||
} | ||
|
||
private fun initTab() { | ||
viewModelScope.launch { | ||
setState { copy(sections = initial()) } | ||
} | ||
} | ||
|
||
private fun initial(): List<DashboardSection> { | ||
return listOf( | ||
DashboardSection( | ||
SectionType.TRANSACTION, | ||
R.string.dashboard_transaction, | ||
Icons.AutoMirrored.Rounded.ReceiptLong, | ||
TransactionSummaryFlow.Root.route | ||
), | ||
DashboardSection( | ||
SectionType.BALANCE, | ||
R.string.dashboard_balance, | ||
Icons.Rounded.Wallet, | ||
BalanceSummaryFlow.Root.route | ||
), | ||
) | ||
} | ||
|
||
} |
Oops, something went wrong.