Skip to content

Commit 7856ff5

Browse files
committed
add comments for new functions
1 parent 19aabea commit 7856ff5

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

Keyboards/DataManager/LanguageDBManager.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ class LanguageDBManager {
4242
}
4343
}
4444

45+
/// Opens a connection to the downloaded language database for the current language.
4546
private func openDownloadedDBQueue(_ dbName: String) -> DatabaseQueue? {
4647
let fileManager = FileManager.default
4748
guard let containerURL = fileManager.containerURL(forSecurityApplicationGroupIdentifier: "group.be.scri.userDefaultsContainer") else {

Scribe/InstallationTab/DownloadDataScreen.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ struct LanguageListView: View {
189189
}
190190
}
191191

192+
// Determines the button state for the "All languages" option based on the states of individual languages.
192193
private var allLanguagesState: ButtonState {
193194
let states = stateManager.downloadStates.values
194195
if states.allSatisfy({ $0 == .updated }) { return .updated }
@@ -304,6 +305,7 @@ struct DownloadDataScreen: View {
304305
@State private var languages = SettingsTableData.getInstalledKeyboardsSections()
305306
@StateObject private var stateManager = DownloadStateManager.shared
306307

308+
// Initializes the download states for all languages based on the currently installed keyboards.
307309
private func initializeLanguageStates() {
308310
// Extract language abbreviations from sections.
309311
let languageKeys = languages.compactMap { section -> String? in

0 commit comments

Comments
 (0)