From f291649ce2615039dca8e3995fc2f2a0db65898a Mon Sep 17 00:00:00 2001 From: tobtoht Date: Sun, 21 Jan 2024 16:36:50 +0100 Subject: [PATCH] History: sort by blockheight for date ordering --- src/model/TransactionHistoryModel.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/model/TransactionHistoryModel.cpp b/src/model/TransactionHistoryModel.cpp index b8ffcb4..1cbc17b 100644 --- a/src/model/TransactionHistoryModel.cpp +++ b/src/model/TransactionHistoryModel.cpp @@ -146,7 +146,10 @@ QVariant TransactionHistoryModel::parseTransactionInfo(const TransactionRow &tIn case Column::Date: { if (role == Qt::UserRole) { - return tInfo.timestamp(); + if (tInfo.blockHeight() > 0) { + return tInfo.blockHeight(); + } + return tInfo.timestamp().toMSecsSinceEpoch(); } return tInfo.timestamp().toString(QString("%1 %2 ").arg(conf()->get(Config::dateFormat).toString(), conf()->get(Config::timeFormat).toString()));