mirror of
https://github.com/metabolist/metatext
synced 2024-12-27 10:12:36 +01:00
UI refinements
This commit is contained in:
parent
921e84c08b
commit
757e8dba35
@ -10,4 +10,13 @@ extension View {
|
||||
Alert(title: Text($0.error.localizedDescription))
|
||||
}
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
func animation(_ animation: Animation?, if condition: Bool) -> some View {
|
||||
if condition {
|
||||
self.animation(animation)
|
||||
} else {
|
||||
self
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ struct AddIdentityView: View {
|
||||
.frame(maxWidth: .infinity, alignment: .center)
|
||||
}
|
||||
}
|
||||
.animation(.default)
|
||||
.animation(.default, if: !viewModel.loading)
|
||||
.alertItem($viewModel.alertItem)
|
||||
.onReceive(viewModel.addedIdentityID) { id in
|
||||
withAnimation {
|
||||
|
Loading…
Reference in New Issue
Block a user