gui: sort events and txs after push in the list
when a pending tx is confirmed, it is pushed in the HistoryTransaction list at the end. It should be first in the list. We sort now the list in order to make sure it will be always the case.
This commit is contained in:
parent
dd29578c50
commit
ff7e30794b
@ -180,6 +180,7 @@ impl State for Home {
|
||||
self.events.push(event);
|
||||
}
|
||||
}
|
||||
self.events.sort_by(|a, b| b.time.cmp(&a.time));
|
||||
}
|
||||
},
|
||||
Message::PendingTransactions(res) => match res {
|
||||
|
||||
@ -100,6 +100,7 @@ impl State for TransactionsPanel {
|
||||
self.txs.push(tx);
|
||||
}
|
||||
}
|
||||
self.txs.sort_by(|a, b| b.time.cmp(&a.time));
|
||||
}
|
||||
},
|
||||
Message::PendingTransactions(res) => match res {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user