Fix error notifications

This commit is contained in:
Maschell 2024-04-26 16:02:20 +02:00
parent 34bae7038f
commit 69268535d8

View File

@ -16,7 +16,7 @@ bool DisplayNotificationMessage(std::string_view text, NotificationModuleNotific
NotificationModule_SetDefaultValue(NOTIFICATION_MODULE_NOTIFICATION_TYPE_INFO, NOTIFICATION_MODULE_DEFAULT_OPTION_DURATION_BEFORE_FADE_OUT, duration); NotificationModule_SetDefaultValue(NOTIFICATION_MODULE_NOTIFICATION_TYPE_INFO, NOTIFICATION_MODULE_DEFAULT_OPTION_DURATION_BEFORE_FADE_OUT, duration);
NotificationModule_AddInfoNotification(text.data()); NotificationModule_AddInfoNotification(text.data());
} else if (type == NOTIFICATION_MODULE_NOTIFICATION_TYPE_ERROR) { } else if (type == NOTIFICATION_MODULE_NOTIFICATION_TYPE_ERROR) {
NotificationModule_SetDefaultValue(NOTIFICATION_MODULE_NOTIFICATION_TYPE_ERROR, NOTIFICATION_MODULE_DEFAULT_OPTION_KEEP_UNTIL_SHOWN, false); NotificationModule_SetDefaultValue(NOTIFICATION_MODULE_NOTIFICATION_TYPE_ERROR, NOTIFICATION_MODULE_DEFAULT_OPTION_KEEP_UNTIL_SHOWN, true);
NotificationModule_SetDefaultValue(NOTIFICATION_MODULE_NOTIFICATION_TYPE_ERROR, NOTIFICATION_MODULE_DEFAULT_OPTION_DURATION_BEFORE_FADE_OUT, duration); NotificationModule_SetDefaultValue(NOTIFICATION_MODULE_NOTIFICATION_TYPE_ERROR, NOTIFICATION_MODULE_DEFAULT_OPTION_DURATION_BEFORE_FADE_OUT, duration);
NotificationModule_AddErrorNotification(text.data()); NotificationModule_AddErrorNotification(text.data());
} else { } else {