fix warnings
This commit is contained in:
@@ -23,7 +23,7 @@ final class ChatModel {
|
||||
@ObservationIgnored private var offs: [() -> Void] = []
|
||||
@ObservationIgnored private var focusStart = true
|
||||
@ObservationIgnored private var visibleSummaries: Set<Int64> = []
|
||||
@ObservationIgnored private var activeObserver: (any NSObjectProtocol)?
|
||||
@ObservationIgnored private var activeObserver: NotificationCenter.ObservationToken?
|
||||
@ObservationIgnored private var started = false
|
||||
|
||||
init(_ kind: ChatKind, _ store: Store) {
|
||||
@@ -124,10 +124,8 @@ final class ChatModel {
|
||||
offs.append(feed.streamed.add { [weak self] ev in
|
||||
self?.builder.appendDelta(ev)
|
||||
})
|
||||
activeObserver = NotificationCenter.default.addObserver(forName: NSApplication.didBecomeActiveNotification, object: nil, queue: .main) { [weak self] _ in
|
||||
MainActor.assumeIsolated {
|
||||
self?.markShown()
|
||||
}
|
||||
activeObserver = NotificationCenter.default.addObserver(of: NSApplication.self, for: .didBecomeActive) { [weak self] _ in
|
||||
self?.markShown()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user