mirror of
https://github.com/ivanvorobei/SwiftUI.git
synced 2026-04-23 17:18:45 +02:00
Update
This commit is contained in:
21
Other Projects/UINote/SwiftUINote/Models/UserData.swift
Executable file
21
Other Projects/UINote/SwiftUINote/Models/UserData.swift
Executable file
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// UserData.swift
|
||||
// SwiftUINote
|
||||
//
|
||||
// Created by chanju Jeon on 05/06/2019.
|
||||
// Copyright © 2019 we'd. All rights reserved.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import Combine
|
||||
|
||||
final class UserData: BindableObject {
|
||||
let didChange = PassthroughSubject<UserData, Never>()
|
||||
|
||||
var notes = NoteData.shared.notes {
|
||||
didSet {
|
||||
didChange.send(self)
|
||||
NoteData.shared.notes = notes
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user