Skip to content

Commit

Permalink
Add a severity level to Status Messages
Browse files Browse the repository at this point in the history
  • Loading branch information
winsmith committed Jan 9, 2024
1 parent 313e322 commit 0cff1fb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Sources/DataTransferObjects/DTOs/DTOv2.swift
Original file line number Diff line number Diff line change
Expand Up @@ -453,12 +453,13 @@ public enum DTOv2 {

/// A short message that goes out to users and is usually displayed in the app UI
public struct StatusMessage: Identifiable, Codable {
public init(id: String, validFrom: Date, validUntil: Date?, title: String, description: String?, systemImageName: String?) {
public init(id: String, validFrom: Date, validUntil: Date?, title: String, description: String?, severity: Int?, systemImageName: String?) {

Check warning on line 456 in Sources/DataTransferObjects/DTOs/DTOv2.swift

View workflow job for this annotation

GitHub Actions / Run Swiftlint

There should be no space before and one after any comma. (comma)
self.id = id
self.validFrom = validFrom
self.validUntil = validUntil
self.title = title
self.description = description
self.severity = severity
self.systemImageName = systemImageName
}

Expand All @@ -467,6 +468,9 @@ public enum DTOv2 {
public let validUntil: Date?
public let title: String
public let description: String?

Check warning on line 471 in Sources/DataTransferObjects/DTOs/DTOv2.swift

View workflow job for this annotation

GitHub Actions / Run Swiftlint

Lines should not have trailing whitespace. (trailing_whitespace)
/// 3 = bad, 2 = moderate, 1 = okay, 0 = info
public let severity: Int?
public let systemImageName: String?
}

Expand Down

0 comments on commit 0cff1fb

Please sign in to comment.