Improve progress updating, fix warnings
This commit is contained in:
@@ -2,9 +2,8 @@ import SwiftUI
|
||||
|
||||
struct ClassifierDownloadView: View {
|
||||
|
||||
@ObservedObject
|
||||
var progress: Database.ClassifierProgress
|
||||
|
||||
let progress: ClassifierProgress
|
||||
|
||||
var body: some View {
|
||||
VStack {
|
||||
ProgressView("Downloading classifier...", value: progress.bytesLoaded, total: Double(progress.total))
|
||||
@@ -19,5 +18,8 @@ struct ClassifierDownloadView: View {
|
||||
}
|
||||
|
||||
#Preview {
|
||||
ClassifierDownloadView(progress: .init(bytesLoaded: 12_300_000, total: 24_500_000))
|
||||
ClassifierDownloadView(progress: .init(
|
||||
bytesLoaded: 12_300_000,
|
||||
total: 24_500_000)
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user