Add support for notifications on error

This commit is contained in:
Maschell
2023-08-16 10:08:44 +02:00
parent efcde57f74
commit 07de996bf9
12 changed files with 165 additions and 5 deletions

View File

@@ -1,10 +1,12 @@
#include "StorageUtils.h"
#include "NotificationsUtils.h"
#include "StringTools.h"
#include "fs/CFile.hpp"
#include "fs/FSUtils.h"
#include "utils.h"
#include "utils/json.hpp"
#include "utils/logger.h"
#include <notifications/notifications.h>
static void processJson(wups_storage_item_t *items, nlohmann::json json) {
if (items == nullptr) {
@@ -72,6 +74,8 @@ WUPSStorageError StorageUtils::OpenStorage(const char *plugin_id, wups_storage_i
DEBUG_FUNCTION_LINE_ERR("%s", errorMessage.c_str());
remove(filePath.c_str());
DisplayErrorNotificationMessage(errorMessage, 10.0f);
return WUPS_STORAGE_ERROR_SUCCESS;
}
} else { // empty or no config exists yet