mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-28 19:11:30 +00:00
UI refinements
This commit is contained in:
parent
921e84c08b
commit
757e8dba35
2 changed files with 10 additions and 1 deletions
|
@ -10,4 +10,13 @@ extension View {
|
||||||
Alert(title: Text($0.error.localizedDescription))
|
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)
|
.frame(maxWidth: .infinity, alignment: .center)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.animation(.default)
|
.animation(.default, if: !viewModel.loading)
|
||||||
.alertItem($viewModel.alertItem)
|
.alertItem($viewModel.alertItem)
|
||||||
.onReceive(viewModel.addedIdentityID) { id in
|
.onReceive(viewModel.addedIdentityID) { id in
|
||||||
withAnimation {
|
withAnimation {
|
||||||
|
|
Loading…
Reference in a new issue