Skip to content

Commit

Permalink
SettingsViewModelのPublisher変数への書き込みを別スレッドから書いていたバグを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
mtgto committed Feb 11, 2024
1 parent f86f335 commit 7fa16fa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion macSKK/Settings/SettingsViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ final class SettingsViewModel: ObservableObject {
logger.log("インラインで表示する変換候補の数を\(inlineCandidateCount)個に変更しました")
}.store(in: &cancellables)

NotificationCenter.default.publisher(for: notificationNameDictLoad).sink { [weak self] notification in
NotificationCenter.default.publisher(for: notificationNameDictLoad).receive(on: RunLoop.main).sink { [weak self] notification in
if let loadEvent = notification.object as? DictLoadEvent, let self {
if let userDict = dictionary.userDict as? FileDict, userDict.id == loadEvent.id {
self.userDictLoadingStatus = loadEvent.status
Expand Down
1 change: 0 additions & 1 deletion macSKK/UserDict.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import Combine
import Foundation
import UserNotifications

/// ユーザー辞書。マイ辞書 (単語登録対象。ファイル名固定) とファイル辞書 をまとめて参照することができる。
///
Expand Down

0 comments on commit 7fa16fa

Please sign in to comment.