qml: history list: don't update fiat values during drag scoll
What changed, and why it matters
This commit is a performance optimization for the mobile-style QML history list in the Electrum Bitcoin wallet. It stops the fiat (local currency) value labels from being recalculated while the user is drag-scrolling, and refreshes them only when the scroll finishes. There is no security-relevant change.
No security action needed. Treat as a normal UI performance fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
In HistoryItemDelegate.qml, a new readonly property listDragActive tracks ListView.view.dragScrolling. While drag-scrolling is active, the fiatLabel.updateText() function now sets the label text to empty instead of computing a fiat conversion. An onListDragActiveChanged handler calls fiatLabel.updateText() once when drag-scrolling ends so the value is refreshed. This is purely a UI rendering/performance optimization.
Changed components
electrum/gui/qml/components/controls/HistoryItemDelegate.qmlInspect captured patch +8 / −1
diff --git a/electrum/gui/qml/components/controls/HistoryItemDelegate.qml b/electrum/gui/qml/components/controls/HistoryItemDelegate.qml
index c5a96e2..6d57f1f 100644
--- a/electrum/gui/qml/components/controls/HistoryItemDelegate.qml
+++ b/electrum/gui/qml/components/controls/HistoryItemDelegate.qml
@@ -13,6 +13,13 @@ Item {
// expose delegate model for scroll indicator
property var delegateModel: model
+ readonly property bool listDragActive: ListView.view.dragScrolling
+ onListDragActiveChanged:
+ // refresh the fiat label once drags-scroll gets released
+ if (!listDragActive) {
+ fiatLabel.updateText()
+ }
+
// reuseItems is enabled on the parent ListView. If a delegate item goes out of view it is not destroyed but
// stored in a pool and re-used when a new delegate is required.
property bool pooled: false
@@ -118,7 +125,7 @@ Item {
color: constants.mutedForeground
function updateText() {
- if (delegate.pooled || !Daemon.fx.enabled) {
+ if (delegate.pooled || delegate.listDragActive || !Daemon.fx.enabled) {
text = ''
} else if (Daemon.fx.historicRates && model.timestamp) {
text = Daemon.fx.fiatValueHistoric(model.value, model.timestamp) + ' ' + Daemon.fx.fiatCurrency
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.