diff --git a/MiddlePanel.qml b/MiddlePanel.qml index c1f1f8ec..4ed21c58 100644 --- a/MiddlePanel.qml +++ b/MiddlePanel.qml @@ -166,6 +166,7 @@ Rectangle { // color stripe at the top Row { id: styledRow + visible: currentView !== merchantView height: 4 anchors.top: parent.top anchors.left: parent.left diff --git a/js/Utils.js b/js/Utils.js index 8ba7fa85..8bf7660c 100644 --- a/js/Utils.js +++ b/js/Utils.js @@ -57,7 +57,11 @@ function ago(epoch) { var delta = now - epoch; if(delta < 60) { - return delta + " " + qsTr("seconds ago") + if (delta <= 1) { + return 1 + " " + qsTr("second ago") + } else { + return Math.floor(delta) + " " + qsTr("seconds ago") + } } else if (delta >= 60 && delta <= 3600) { if(delta >= 60 && delta < 120){ return 1 + " " + qsTr("minute ago") diff --git a/pages/merchant/Merchant.qml b/pages/merchant/Merchant.qml index 5f816782..4dcd0d28 100644 --- a/pages/merchant/Merchant.qml +++ b/pages/merchant/Merchant.qml @@ -603,7 +603,7 @@ Item { var isout = model.data(idx, TransactionHistoryModel.TransactionIsOutRole); var timeDate = model.data(idx, TransactionHistoryModel.TransactionDateRole); var timeHour = model.data(idx, TransactionHistoryModel.TransactionTimeRole); - var timeEpoch = new Date(timeDate + "T" + timeHour + "Z") .getTime() / 1000; + var timeEpoch = new Date(timeDate + "T" + timeHour) .getTime() / 1000; var subaddrAccount = model.data(idx, TransactionHistoryModel.TransactionSubaddrAccountRole); var subaddrIndex = model.data(idx, TransactionHistoryModel.TransactionSubaddrIndexRole); diff --git a/src/libwalletqt/Wallet.cpp b/src/libwalletqt/Wallet.cpp index 4aa442fa..85761e0b 100644 --- a/src/libwalletqt/Wallet.cpp +++ b/src/libwalletqt/Wallet.cpp @@ -507,6 +507,8 @@ TransactionHistorySortFilterModel *Wallet::historyModel() const m_historyModel->setTransactionHistory(this->history()); m_historySortFilterModel = new TransactionHistorySortFilterModel(w); m_historySortFilterModel->setSourceModel(m_historyModel); + m_historySortFilterModel->setSortRole(TransactionHistoryModel::TransactionBlockHeightRole); + m_historySortFilterModel->sort(0, Qt::DescendingOrder); } return m_historySortFilterModel;