Skip to content

Commit

Permalink
Merge pull request #208 from uhooi/feature/fix_warnings
Browse files Browse the repository at this point in the history
不要な `try` の削除
  • Loading branch information
mtgto authored Aug 27, 2024

Verified

This commit was signed with the committer’s verified signature. The key has expired.
2 parents 7a24e29 + fb0a896 commit e432b42
Showing 2 changed files with 2 additions and 12 deletions.
7 changes: 1 addition & 6 deletions macSKK/InputController.swift
Original file line number Diff line number Diff line change
@@ -308,12 +308,7 @@ class InputController: IMKInputController {
}

@objc func saveDict() {
do {
try Global.dictionary.save()
} catch {
// TODO: NotificationCenterでユーザーに通知する
logger.error("ユーザー辞書保存中にエラーが発生しました")
}
Global.dictionary.save()
}

@objc func togglePrivateMode() {
7 changes: 1 addition & 6 deletions macSKK/UserDict.swift
Original file line number Diff line number Diff line change
@@ -74,12 +74,7 @@ class UserDict: NSObject, DictProtocol {
.sink { [weak self] _ in
if let fileDict = self?.userDict as? FileDict {
logger.log("ユーザー辞書を永続化します。現在のエントリ数は \(fileDict.dict.entries.count)")
do {
try fileDict.save()
} catch {
logger.error("ユーザー辞書の永続化でエラーが発生しました")
UNNotifier.sendNotificationForUserDict(writeError: error)
}
fileDict.save()
}
}
.store(in: &cancellables)

0 comments on commit e432b42

Please sign in to comment.