mirror of
https://code.gri.mw/GUI/grim.git
synced 2026-07-09 00:18:31 +00:00
ui: show scan and wallet actions before getting data from node
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user