Fix handling of non-ready profiles

- Omit title while isLoading, to not show former profile name

- Animate on isLoading
This commit is contained in:
Davide De Rosa 2022-05-03 13:45:27 +02:00
parent b9248cbb89
commit 7036ca5f41
2 changed files with 5 additions and 2 deletions

View File

@ -96,7 +96,7 @@ struct ProfileView: View {
ExtraSection(currentProfile: currentProfile)
DiagnosticsSection(currentProfile: currentProfile)
}
}
}.themeAnimation(on: isLoading)
}
@ViewBuilder

View File

@ -32,7 +32,10 @@ public class ObservableProfile: ValueHolder, ObservableObject {
@Published public var value: Profile
public var name: String {
!value.header.isPlaceholder ? value.header.name : ""
guard !isLoading && !value.isPlaceholder else {
return ""
}
return value.header.name
}
public init() {