|
@@ -43,6 +43,17 @@ struct AcknowledgementPendingView: View {
|
|
|
.navigationBarBackButtonHidden(true)
|
|
.navigationBarBackButtonHidden(true)
|
|
|
.toolbar(.hidden)
|
|
.toolbar(.hidden)
|
|
|
.background(trioBackgroundColor)
|
|
.background(trioBackgroundColor)
|
|
|
|
|
+ .onChange(of: state.showCommsAnimation) { oldValue, newValue in
|
|
|
|
|
+ if newValue && !oldValue {
|
|
|
|
|
+ DispatchQueue.main.asyncAfter(deadline: .now() + 5) {
|
|
|
|
|
+ // If after 5 seconds there is still no acknowledgement banner, return to root
|
|
|
|
|
+ if !state.showAcknowledgmentBanner {
|
|
|
|
|
+ // Navigate back to the root
|
|
|
|
|
+ navigationPath.removeLast(navigationPath.count)
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
.onChange(of: state.showAcknowledgmentBanner) { _, newValue in
|
|
.onChange(of: state.showAcknowledgmentBanner) { _, newValue in
|
|
|
if !newValue {
|
|
if !newValue {
|
|
|
// Navigate back to the root when acknowledgment banner disappears
|
|
// Navigate back to the root when acknowledgment banner disappears
|