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

Reviewed-on: feather/feather#280
remotes/1691844314220217825/master
tobtoht 3 years ago
commit 7762e283db

@ -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;

Loading…
Cancel
Save