chore: use setPrimitiveValue
This commit is contained in:
parent
07d3c3cbff
commit
4ce3f96dae
|
@ -24,7 +24,7 @@ public final class Application: NSManagedObject {
|
|||
public extension Application {
|
||||
override func awakeFromInsert() {
|
||||
super.awakeFromInsert()
|
||||
identifier = UUID()
|
||||
setPrimitiveValue(UUID(), forKey: #keyPath(Application.identifier))
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
|
|
|
@ -36,7 +36,7 @@ public extension Attachment {
|
|||
|
||||
override func awakeFromInsert() {
|
||||
super.awakeFromInsert()
|
||||
createdAt = Date()
|
||||
setPrimitiveValue(Date(), forKey: #keyPath(Attachment.createdAt))
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
|
|
|
@ -26,7 +26,7 @@ public final class Emoji: NSManagedObject {
|
|||
public extension Emoji {
|
||||
override func awakeFromInsert() {
|
||||
super.awakeFromInsert()
|
||||
identifier = UUID()
|
||||
setPrimitiveValue(UUID(), forKey: #keyPath(Emoji.identifier))
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
|
|
|
@ -24,7 +24,7 @@ public final class History: NSManagedObject {
|
|||
public extension History {
|
||||
override func awakeFromInsert() {
|
||||
super.awakeFromInsert()
|
||||
identifier = UUID()
|
||||
setPrimitiveValue(UUID(), forKey: #keyPath(History.identifier))
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
|
|
|
@ -36,12 +36,12 @@ extension MastodonAuthentication {
|
|||
|
||||
public override func awakeFromInsert() {
|
||||
super.awakeFromInsert()
|
||||
identifier = UUID()
|
||||
|
||||
setPrimitiveValue(UUID(), forKey: #keyPath(MastodonAuthentication.identifier))
|
||||
let now = Date()
|
||||
createdAt = now
|
||||
updatedAt = now
|
||||
activedAt = now
|
||||
setPrimitiveValue(now, forKey: #keyPath(MastodonAuthentication.createdAt))
|
||||
setPrimitiveValue(now, forKey: #keyPath(MastodonAuthentication.updatedAt))
|
||||
setPrimitiveValue(now, forKey: #keyPath(MastodonAuthentication.activedAt))
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
|
|
|
@ -25,7 +25,8 @@ public final class Mention: NSManagedObject {
|
|||
public extension Mention {
|
||||
override func awakeFromInsert() {
|
||||
super.awakeFromInsert()
|
||||
identifier = UUID()
|
||||
|
||||
setPrimitiveValue(UUID(), forKey: #keyPath(Mention.identifier))
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
|
|
|
@ -35,7 +35,7 @@ extension Poll {
|
|||
|
||||
public override func awakeFromInsert() {
|
||||
super.awakeFromInsert()
|
||||
createdAt = Date()
|
||||
setPrimitiveValue(Date(), forKey: #keyPath(Poll.createdAt))
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
|
|
|
@ -27,7 +27,7 @@ extension PollOption {
|
|||
|
||||
public override func awakeFromInsert() {
|
||||
super.awakeFromInsert()
|
||||
createdAt = Date()
|
||||
setPrimitiveValue(Date(), forKey: #keyPath(PollOption.createdAt))
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
|
|
|
@ -26,7 +26,7 @@ public final class Tag: NSManagedObject {
|
|||
extension Tag {
|
||||
public override func awakeFromInsert() {
|
||||
super.awakeFromInsert()
|
||||
identifier = UUID()
|
||||
setPrimitiveValue(UUID(), forKey: #keyPath(Tag.identifier))
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<key>CoreDataStack.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>13</integer>
|
||||
<integer>7</integer>
|
||||
</dict>
|
||||
<key>Mastodon - RTL.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
|
@ -22,31 +22,10 @@
|
|||
<key>Mastodon.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>1</integer>
|
||||
<integer>12</integer>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>SuppressBuildableAutocreation</key>
|
||||
<dict>
|
||||
<key>DB427DD125BAA00100D1B89D</key>
|
||||
<dict>
|
||||
<key>primary</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>DB427DE725BAA00100D1B89D</key>
|
||||
<dict>
|
||||
<key>primary</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>DB427DF225BAA00100D1B89D</key>
|
||||
<dict>
|
||||
<key>primary</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>DB89B9F525C10FD0008580ED</key>
|
||||
<dict>
|
||||
<key>primary</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
Loading…
Reference in New Issue