- Added search functionality to BookmarkLabelsView with real-time filtering - Implemented custom tag creation with smart suggestions - Unified search and tag selection in ShareBookmarkView - Added keyboard toolbar with 'Done' button for extensions - Implemented notification-based keyboard dismissal for extensions - Added pagination logic to ShareBookmarkViewModel - Created selected tags section with remove functionality - Improved UX with consistent tag management across views - Added proper keyboard handling for iOS extensions
58 lines
1.6 KiB
Swift
58 lines
1.6 KiB
Swift
//
|
|
// readeckApp.swift
|
|
// readeck
|
|
//
|
|
// Created by Ilyas Hallak on 10.06.25.
|
|
//
|
|
|
|
import SwiftUI
|
|
import netfox
|
|
|
|
@main
|
|
struct readeckApp: App {
|
|
@State private var hasFinishedSetup = true
|
|
@StateObject private var appSettings = AppSettings()
|
|
|
|
var body: some Scene {
|
|
WindowGroup {
|
|
Group {
|
|
if hasFinishedSetup {
|
|
MainTabView()
|
|
} else {
|
|
SettingsServerView()
|
|
.padding()
|
|
}
|
|
}
|
|
.environmentObject(appSettings)
|
|
.preferredColorScheme(appSettings.theme.colorScheme)
|
|
.onAppear {
|
|
#if DEBUG
|
|
NFX.sharedInstance().start()
|
|
#endif
|
|
Task {
|
|
await loadSetupStatus()
|
|
}
|
|
}
|
|
.onReceive(NotificationCenter.default.publisher(for: NSNotification.Name("SetupStatusChanged"))) { _ in
|
|
Task {
|
|
await loadSetupStatus()
|
|
}
|
|
}
|
|
.onReceive(NotificationCenter.default.publisher(for: NSNotification.Name("SettingsChanged"))) { _ in
|
|
Task {
|
|
await loadSetupStatus()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
private func loadSetupStatus() async {
|
|
let settingsRepository = SettingsRepository()
|
|
hasFinishedSetup = settingsRepository.hasFinishedSetup
|
|
let settings = try? await settingsRepository.loadSettings()
|
|
await MainActor.run {
|
|
appSettings.settings = settings
|
|
}
|
|
}
|
|
}
|