1
0
forked from GRIN/grim

ui: show scan and wallet actions before getting data from node

This commit is contained in:
ardocrat
2026-03-10 00:49:18 +03:00
parent 28ecb5b1f4
commit feb38dc7cf
2 changed files with 6 additions and 14 deletions
@@ -156,13 +156,10 @@ impl WalletAccountContent {
ui.allocate_ui_with_layout(rect.size(), Layout::right_to_left(Align::Center), |ui| {
// Draw button to show QR code scanner.
let wallet_synced = wallet.synced_from_node();
if wallet_synced {
View::item_button(ui, View::item_rounding(0, 2, true), SCAN, None, || {
self.qr_scan_content = Some(CameraContent::default());
cb.start_camera();
});
}
View::item_button(ui, View::item_rounding(0, 2, true), SCAN, None, || {
self.qr_scan_content = Some(CameraContent::default());
cb.start_camera();
});
// Draw button to show list of accounts.
let accounts = wallet.accounts();
@@ -171,11 +168,7 @@ impl WalletAccountContent {
} else {
USER_PLUS
};
let rounding = if wallet_synced {
View::item_rounding(1, 3, true)
} else {
View::item_rounding(0, 2, true)
};
let rounding = View::item_rounding(1, 3, true);
View::item_button(ui, rounding, accounts_icon, None, || {
if accounts.len() == 1 {
self.create_account_content = CreateAccountContent::default();
+1 -2
View File
@@ -386,8 +386,7 @@ impl WalletContent {
self.settings_content = None;
});
});
let active = if wallet.synced_from_node() &&
has_wallet_data { Some(false) } else { None };
let active = if has_wallet_data { Some(false) } else { None };
columns[1].vertical_centered_justified(|ui| {
if wallet.invoice_creating() {
ui.add_space(4.0);