fix: do not show file button at message finalization, qr code padding, request message at tx info modal
This commit is contained in:
parent
d2c5bdb53f
commit
2688bf606e
2 changed files with 14 additions and 9 deletions
|
@ -487,7 +487,6 @@ impl WalletMessages {
|
||||||
self.request_qr = false;
|
self.request_qr = false;
|
||||||
}
|
}
|
||||||
self.request_qr_content.ui(ui, text.clone(), cb);
|
self.request_qr_content.ui(ui, text.clone(), cb);
|
||||||
ui.add_space(6.0);
|
|
||||||
|
|
||||||
// Show button to close modal.
|
// Show button to close modal.
|
||||||
ui.vertical_centered_justified(|ui| {
|
ui.vertical_centered_justified(|ui| {
|
||||||
|
@ -823,7 +822,7 @@ impl WalletMessages {
|
||||||
self.message_slate = None;
|
self.message_slate = None;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else if self.message_slate.is_none() {
|
||||||
// Draw button to choose file.
|
// Draw button to choose file.
|
||||||
let mut parsed_text = "".to_string();
|
let mut parsed_text = "".to_string();
|
||||||
self.file_pick_button.ui(ui, cb, |text| {
|
self.file_pick_button.ui(ui, cb, |text| {
|
||||||
|
@ -884,7 +883,6 @@ impl WalletMessages {
|
||||||
// Draw QR code content.
|
// Draw QR code content.
|
||||||
let text = self.qr_message_text.clone().unwrap();
|
let text = self.qr_message_text.clone().unwrap();
|
||||||
self.qr_message_content.ui(ui, text.clone(), cb);
|
self.qr_message_content.ui(ui, text.clone(), cb);
|
||||||
ui.add_space(8.0);
|
|
||||||
|
|
||||||
ui.vertical_centered_justified(|ui| {
|
ui.vertical_centered_justified(|ui| {
|
||||||
View::button(ui, t!("close"), Colors::white_or_black(false), || {
|
View::button(ui, t!("close"), Colors::white_or_black(false), || {
|
||||||
|
|
|
@ -525,15 +525,22 @@ impl WalletTransactions {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Setup slate and message from transaction.
|
// Setup slate and message from transaction.
|
||||||
self.tx_info_response_edit = if !tx.data.confirmed && tx.can_finalize &&
|
self.tx_info_response_edit = if !tx.data.confirmed && tx.data.tx_slate_id.is_some() &&
|
||||||
(tx.data.tx_type == TxLogEntryType::TxSent ||
|
(tx.data.tx_type == TxLogEntryType::TxSent ||
|
||||||
tx.data.tx_type == TxLogEntryType::TxReceived) {
|
tx.data.tx_type == TxLogEntryType::TxReceived) {
|
||||||
let invoice = tx.data.tx_type == TxLogEntryType::TxReceived;
|
let mut slate = Slate::blank(1, false);
|
||||||
let mut slate = Slate::blank(1, invoice);
|
slate.state = if tx.can_finalize {
|
||||||
slate.state = if invoice {
|
if tx.data.tx_type == TxLogEntryType::TxSent {
|
||||||
SlateState::Invoice1
|
SlateState::Standard1
|
||||||
|
} else {
|
||||||
|
SlateState::Invoice1
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
SlateState::Standard1
|
if tx.data.tx_type == TxLogEntryType::TxReceived {
|
||||||
|
SlateState::Standard2
|
||||||
|
} else {
|
||||||
|
SlateState::Invoice2
|
||||||
|
}
|
||||||
};
|
};
|
||||||
slate.id = tx.data.tx_slate_id.unwrap();
|
slate.id = tx.data.tx_slate_id.unwrap();
|
||||||
wallet.read_slatepack(&slate).unwrap_or("".to_string())
|
wallet.read_slatepack(&slate).unwrap_or("".to_string())
|
||||||
|
|
Loading…
Reference in a new issue