mirror of
https://github.com/wiiu-env/AromaBasePlugin.git
synced 2024-12-25 11:21:51 +01:00
Fix the update notification
This commit is contained in:
parent
ae56c04b7c
commit
10743f784c
@ -33,7 +33,7 @@ void ShowHints() {
|
||||
const char *tmp_file = "fs:/vol/external01/wiiu/write_lock";
|
||||
int fd = -1;
|
||||
if ((fd = open(tmp_file, O_CREAT | O_TRUNC | O_RDWR)) < 0) {
|
||||
DEBUG_FUNCTION_LINE_VERBOSE("SD Card mounted but not writable");
|
||||
DEBUG_FUNCTION_LINE_WARN("SD Card mounted but not writable. errno: %d", errno);
|
||||
NotificationModuleStatus err;
|
||||
NMColor red = {237, 28, 36, 255};
|
||||
NotificationModuleHandle outHandle;
|
||||
|
@ -57,7 +57,7 @@ bool saveLatestUpdateHash(const std::string &hash) {
|
||||
}
|
||||
|
||||
if (WUPSStorageAPI::SaveStorage() != WUPS_STORAGE_ERROR_SUCCESS) {
|
||||
DEBUG_FUNCTION_LINE_ERR("Failed to save strorage");
|
||||
DEBUG_FUNCTION_LINE_ERR("Failed to save storage");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -88,7 +88,11 @@ void UpdateCheckThreadEntry() {
|
||||
AromaUpdater::LatestVersion data = nlohmann::json::parse(outBuffer);
|
||||
gUpdateChecked = true;
|
||||
|
||||
if (gLastHash == data.getHash()) {
|
||||
if (gLastHash.empty()) { // don't show update warning on first boot
|
||||
gLastHash = data.getHash();
|
||||
} else if (gLastHash != data.getHash()) {
|
||||
ShowUpdateNotification();
|
||||
} else if (gLastHash == data.getHash()) {
|
||||
DEBUG_FUNCTION_LINE_VERBOSE("We don't need to update the hash");
|
||||
return;
|
||||
}
|
||||
@ -96,10 +100,6 @@ void UpdateCheckThreadEntry() {
|
||||
// Update hash
|
||||
gLastHash = data.getHash();
|
||||
|
||||
if (!gLastHash.empty()) { // don't show update warning on first boot
|
||||
ShowUpdateNotification();
|
||||
}
|
||||
|
||||
saveLatestUpdateHash(gLastHash);
|
||||
} catch (std::exception &e) {
|
||||
DEBUG_FUNCTION_LINE_WARN("Failed to parse AromaUpdater::LatestVersion");
|
||||
|
Loading…
Reference in New Issue
Block a user