mirror of
https://git.wownero.com/wowlet/wowlet.git
synced 2024-08-15 01:03:14 +00:00
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:
commit
7762e283db
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