File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 {
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments