Merge pull request 'Wizard: sort wallets by last modified' (#280) from tobtoht/feather:open_wallet_last_modified into master

Reviewed-on: https://git.wownero.com/feather/feather/pulls/280
This commit is contained in:
tobtoht 2020-12-31 02:39:14 +00:00
commit 7762e283db
1 changed files with 8 additions and 1 deletions

View File

@ -18,7 +18,14 @@ WalletKeysFiles::WalletKeysFiles(const QFileInfo &info, int networkType, QString
m_modified(info.lastModified().toSecsSinceEpoch()),
m_path(QDir::toNativeSeparators(info.absoluteFilePath())),
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 {
return m_fileName;