mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
QML UI: if remote is same as local cache, don't load / process remote
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
8c1cc4524d
commit
bbcc6fb3c2
1 changed files with 8 additions and 0 deletions
|
@ -267,7 +267,15 @@ void QMLManager::loadDivesWithValidCredentials()
|
||||||
clear_dive_file_data();
|
clear_dive_file_data();
|
||||||
|
|
||||||
QByteArray fileNamePrt = QFile::encodeName(url);
|
QByteArray fileNamePrt = QFile::encodeName(url);
|
||||||
|
QString savedSHA(saved_git_id);
|
||||||
int error = parse_file(fileNamePrt.data());
|
int error = parse_file(fileNamePrt.data());
|
||||||
|
if (savedSHA == saved_git_id) {
|
||||||
|
qDebug() << "local cache was current, no need to modify dive list";
|
||||||
|
appendTextToLog("Cloud sync shows local cache was current");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
qDebug() << "had" << savedSHA << "got" << saved_git_id << ", so let's reload";
|
||||||
|
|
||||||
if (!error) {
|
if (!error) {
|
||||||
report_error("filename is now %s", fileNamePrt.data());
|
report_error("filename is now %s", fileNamePrt.data());
|
||||||
const char *error_string = get_error_string();
|
const char *error_string = get_error_string();
|
||||||
|
|
Loading…
Add table
Reference in a new issue