             return
         }
 
-        shouldShowModal = true
+        shouldShowModalOnForeground = true
         UIApplication.shared.open(mailtoURL)
     }
     

    }
    
    @SwiftUI.ObservedObject var userInput: UserInput
    @SwiftUI.State var toggleModalVisibility = false
    @SwiftUI.State var shouldShowModal = false
    
    var theme: Theme
    var username: String

                .background(Color(theme.colors.baseBackground).edgesIgnoringSafeArea(.all))
            }
            .onReceive(NotificationCenter.default.publisher(for: UIApplication.willEnterForegroundNotification)) { _ in
                if shouldShowModalOnForeground {
                    withAnimation(.linear(duration: 0.3)) {
                        isModalVisible = true
                        shouldShowModalOnForeground = false
                    }
                }
            }
            VanishAccountPopUpAlertView(theme:theme, isVisible: $isModalVisible, userInput: $userInput.text)
        }
        
    }
