Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
5b7670b
fix duplicated download screen in nav stack
catreedle Jan 15, 2026
954890c
fix: reset to Installation tab's root when app is reopened
catreedle Jan 15, 2026
3b75219
init add contracts and update query nouns
catreedle Jan 22, 2026
317c8f8
"Noun annotation: update queryNounForm based on gender contract"
catreedle Jan 23, 2026
e7ae502
Merge remote-tracking branch 'origin/main' into data-contract
catreedle Jan 23, 2026
4c7eb1c
Restore DACommandVariables.swift
catreedle Jan 23, 2026
503c90b
Plural command: update query for plural command and add plural annota…
catreedle Jan 26, 2026
148942c
Noun annotation: fix multiple annotation case
catreedle Jan 27, 2026
0ca13d6
Preposition annotation: update queryPrepForm and add conversion prepo…
catreedle Jan 28, 2026
2418846
Conjugate: use dynamic conjugation and declension
catreedle Feb 2, 2026
8747297
Merge branch 'main' into conjugation-declension
catreedle Feb 8, 2026
f219be9
Declension: move declension contract to main contract file
catreedle Feb 9, 2026
d7791fa
Conjugation and declension: add function documentation and fix comments
catreedle Feb 9, 2026
d3a5efe
Add YAML version of data contracts
andrewtavis Feb 15, 2026
5b007a7
Minor fix in comment in contracts
andrewtavis Feb 15, 2026
a3193ce
feat: change to using YAML contract
catreedle Feb 16, 2026
667d415
feat: API call and write into sqlite db
catreedle Feb 19, 2026
9e6318a
feat: initialize download button state
catreedle Feb 19, 2026
ce75623
feat: All languages button download state and handle click
catreedle Feb 19, 2026
5cb3825
feat: initialize button states on "Check for new data"
catreedle Feb 20, 2026
19aabea
feat: remove built in database and read from new downloaded one
catreedle Feb 20, 2026
7856ff5
add comments for new functions
catreedle Feb 20, 2026
a742d25
Merge branch 'main' into download-from-API
catreedle Feb 24, 2026
daa3dfc
feat: replace "All languages" download button with one way "Update al…
catreedle Mar 6, 2026
4fb4341
removes "all" state
catreedle Mar 6, 2026
a120117
Merge branch 'main' of https://github.com/scribe-org/Scribe-iOS into …
andrewtavis Mar 7, 2026
34c15e7
Formatting for marks - add a space after them
andrewtavis Mar 7, 2026
9a900f8
Merge branch 'main' into update-all
catreedle Mar 24, 2026
8c83445
Merge branch 'main' into update-all
andrewtavis Mar 24, 2026
f6216b9
Merge branch 'main' into update-all
catreedle Mar 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions Scribe/InstallationTab/DownloadDataScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -167,27 +167,22 @@ struct LanguageListView: View {
comment: ""
)

private let allLanguagesText = NSLocalizedString(
"i18n.app.download.menu_ui.download_data.all_languages",
value: "All languages",
comment: ""
)

@State private var showConfirmDialog = false
@State private var targetLanguage = ""
@State private var selectedLanguageCode = ""
let userDefaults = UserDefaults(suiteName: "group.be.scri.userDefaultsContainer")!

private func handleButtonClick(targetLang: String, langCode: String) {
if langCode == "all" {
let toDownload = stateManager.downloadStates.keys.filter {
private func handleUpdateAllLanguages() {
let toDownload = stateManager.downloadStates.keys.filter {
stateManager.downloadStates[$0] != .updated && stateManager.downloadStates[$0] != .downloading
}
for lang in toDownload {
}

for lang in toDownload {
stateManager.handleDownloadAction(key: lang)
}
return
}
}

private func handleButtonClick(targetLang: String, langCode: String) {

targetLanguage = targetLang
selectedLanguageCode = langCode
Expand Down Expand Up @@ -219,17 +214,22 @@ struct LanguageListView: View {
EmptyStateView()
} else {
VStack(spacing: 0) {
LanguageDownloadCard(
language: allLanguagesText,
state: allLanguagesState,
action: {
handleButtonClick(targetLang: allLanguagesText, langCode: "all")
HStack {
Spacer()
Text(NSLocalizedString(
"i18n.app.download.menu_ui.download_data.update_all",
value: "Update all",
comment: ""
))
.foregroundColor(Color("linkBlue"))
.font(.system(size: 20, weight: .medium))
.padding(.horizontal, 12)
.padding(.bottom, 10)
.onTapGesture {
handleUpdateAllLanguages()
}
)

Divider()
.padding(.vertical, 8)

}
.padding(.horizontal, 4)
ForEach(Array(languages.enumerated()), id: \.offset) { index, section in
let langCode: String = {
if case let .specificLang(code) = section.sectionState {
Expand Down
4 changes: 2 additions & 2 deletions Scribe/InstallationTab/DownloadStateManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class DownloadStateManager: ObservableObject {

/// Initialize download states for languages.
func initializeStates(languages: [String]) {
for language in languages where language != "all" {
for language in languages {
if downloadStates[language] != nil { continue }

// Check if data exists locally.
Expand Down Expand Up @@ -102,7 +102,7 @@ class DownloadStateManager: ObservableObject {

/// Check all downloaded languages for updates.
func checkAllForUpdates() {
for (language, state) in downloadStates where language != "all" && state == .updated {
for (language, state) in downloadStates where state == .updated {
checkForUpdates(language: language)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ final class InfoChildTableViewCell: UITableViewCell {

var languageCode: String {
guard let parentSection = parentSection,
case let .specificLang(lang) = parentSection.sectionState else { return "all" }
case let .specificLang(lang) = parentSection.sectionState else { return "" }

return lang
}
Expand Down
Loading