IceCubesApp/Packages/Models/Sources/Models/SwiftData/Draft.swift
Paul Schuetz 0b5e764556
Automatically remove spaces in server names (#1600)
* Automatically remove spaces in server names

If a server name includes a space (which can happen if the string is pasted /
autocompleted), this space is removed, which results in the app not crashing.
Fixes #1599

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>

* Format

---------

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-10-01 09:37:09 +02:00

16 lines
291 B
Swift

import Foundation
import SwiftData
import SwiftUI
@Model public class Draft {
@Attribute(.unique) public var id: UUID
public var content: String
public var creationDate: Date
public init(content: String) {
id = UUID()
self.content = content
creationDate = Date()
}
}