Fix Apple host compilation

This commit is contained in:
KhooLy 2026-07-14 19:13:11 +03:00
parent e747ca3d0e
commit be954edd4b
3 changed files with 12 additions and 3 deletions

View file

@ -61,6 +61,8 @@ jobs:
distribution: temurin
java-version: "17"
- uses: gradle/actions/setup-gradle@v4
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
@ -126,6 +128,8 @@ jobs:
distribution: temurin
java-version: "17"
- uses: gradle/actions/setup-gradle@v4
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:

View file

@ -218,8 +218,13 @@ struct FluxaAppleAddonCatalogResolver {
!catalog.hasRequiredExtraExceptGenre else {
return nil
}
let label = catalog.name?.trimmingCharacters(in: .whitespacesAndNewlines)
.flatMap { $0.isEmpty ? nil : $0 } ?? catalogId
let trimmedName = catalog.name?.trimmingCharacters(in: .whitespacesAndNewlines)
let label: String
if let trimmedName, !trimmedName.isEmpty {
label = trimmedName
} else {
label = catalogId
}
let genres = (catalog.genres ?? []) + (catalog.extra ?? [])
.filter { $0.name?.lowercased() == "genre" }
.flatMap { $0.options ?? [] }

View file

@ -28,7 +28,7 @@ final class FluxaAppleCalendarStartup {
}
private func updateSharedCalendar(year: Int, month: Int, items: [AppleCalendarReleaseSnapshot]) {
FluxaApple.shared.updateCalendar(snapshot: AppleCalendarSnapshot(year: year, month: month, items: items, isLoading: false))
FluxaApple.shared.updateCalendar(snapshot: AppleCalendarSnapshot(year: Int32(year), month: Int32(month), items: items, isLoading: false))
}
private func sharedItem(_ value: FluxaAppleJsonValue) -> AppleCalendarReleaseSnapshot? {