]> Nutra Git (v2) - gamesguru/feather.git/commitdiff
History: sort by blockheight for date ordering
authortobtoht <tob@featherwallet.org>
Sun, 21 Jan 2024 15:36:50 +0000 (16:36 +0100)
committertobtoht <tob@featherwallet.org>
Sun, 21 Jan 2024 15:36:50 +0000 (16:36 +0100)
src/model/TransactionHistoryModel.cpp

index b8ffcb4d1e3891ae7f73d828903f320137f3c4b9..1cbc17b5f2a2ce34c05bd7aedb6d46420d24a64e 100644 (file)
@@ -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()));