refactor: extract HistoryScreen into separate components

This commit is contained in:
2026-06-03 19:11:03 +02:00
parent 57d718caf6
commit a345a4cb7d
10 changed files with 1534 additions and 1319 deletions
@@ -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() }