From 55670dc8b1d85c8a934a1f07c88423441ec209e5 Mon Sep 17 00:00:00 2001 From: Dan Cunningham Date: Sat, 14 Sep 2024 12:02:24 -0700 Subject: [PATCH] Fixes broken notification view with newer notifications (#816) Signed-off-by: Dan Cunningham --- openHAB/OpenHABNotification.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/openHAB/OpenHABNotification.swift b/openHAB/OpenHABNotification.swift index 4970cc65..43eb5f09 100644 --- a/openHAB/OpenHABNotification.swift +++ b/openHAB/OpenHABNotification.swift @@ -12,12 +12,12 @@ import Foundation class OpenHABNotification: NSObject { - var message = "" + var message: String? var created: Date? - var icon = "" - var severity = "" + var icon: String? + var severity: String? - init(message: String, created: Date?) { + init(message: String?, created: Date?) { self.message = message self.created = created } @@ -46,8 +46,8 @@ class OpenHABNotification: NSObject { // Inspired by https://www.swiftbysundell.com/basics/codable?rq=codingdata extension OpenHABNotification { public struct CodingData: Decodable { - let id: String - let message: String + let id: String? + let message: String? let v: Int let created: Date?