mirror of
https://github.com/feather-wallet/feather.git
synced 2024-12-23 12:09:50 +00:00
Wizard: sort wallets by last modified
This commit is contained in:
parent
5b679da427
commit
469c783a48
1 changed files with 8 additions and 1 deletions
|
@ -18,7 +18,14 @@ WalletKeysFiles::WalletKeysFiles(const QFileInfo &info, int networkType, QString
|
||||||
m_modified(info.lastModified().toSecsSinceEpoch()),
|
m_modified(info.lastModified().toSecsSinceEpoch()),
|
||||||
m_path(QDir::toNativeSeparators(info.absoluteFilePath())),
|
m_path(QDir::toNativeSeparators(info.absoluteFilePath())),
|
||||||
m_networkType(networkType),
|
m_networkType(networkType),
|
||||||
m_address(std::move(address)) {}
|
m_address(std::move(address))
|
||||||
|
{
|
||||||
|
QFileInfo cacheFile = QFileInfo(info.absoluteFilePath().replace(QRegExp(".keys$"), ""));
|
||||||
|
qint64 cacheLastModified = cacheFile.lastModified().toSecsSinceEpoch();
|
||||||
|
if (cacheFile.exists()) {
|
||||||
|
m_modified = (cacheLastModified > m_modified) ? cacheLastModified : m_modified;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QString WalletKeysFiles::fileName() const {
|
QString WalletKeysFiles::fileName() const {
|
||||||
return m_fileName;
|
return m_fileName;
|
||||||
|
|
Loading…
Reference in a new issue