refactor: extract HistoryScreen into separate components
This commit is contained in:
@@ -53,6 +53,8 @@ import androidx.navigation.compose.currentBackStackEntryAsState
|
||||
import androidx.navigation.compose.rememberNavController
|
||||
import androidx.navigation.navArgument
|
||||
import com.bitcointxoko.gudariwallet.MainActivity
|
||||
import com.bitcointxoko.gudariwallet.ui.history.HistoryScreen
|
||||
import com.bitcointxoko.gudariwallet.ui.history.PaymentDetailScreen
|
||||
import com.bitcointxoko.gudariwallet.ui.receive.ReceiveScreen
|
||||
import com.bitcointxoko.gudariwallet.ui.send.SendScreen
|
||||
import com.bitcointxoko.gudariwallet.util.SendInputType
|
||||
@@ -308,8 +310,8 @@ fun WalletScreen(
|
||||
|
||||
) {
|
||||
HistoryScreen(
|
||||
vm = historyVm,
|
||||
onClose = {
|
||||
vm = historyVm,
|
||||
onClose = {
|
||||
navController.popBackStack(ROUTE_HOME, inclusive = false)
|
||||
},
|
||||
onPaymentClick = { payment ->
|
||||
@@ -332,8 +334,8 @@ fun WalletScreen(
|
||||
if (payment != null) {
|
||||
PaymentDetailScreen(
|
||||
payment = payment,
|
||||
vm = historyVm,
|
||||
onBack = { navController.popBackStack() }
|
||||
vm = historyVm,
|
||||
onBack = { navController.popBackStack() }
|
||||
)
|
||||
} else {
|
||||
LaunchedEffect(paymentHash) { historyVm.refresh() }
|
||||
|
||||
Reference in New Issue
Block a user