I am building a simple application and need to update an Environment variable when a navigation link is clicked. To do this I placed a simultaneous gesture with the navigation link to run when the link is clicked. There I will update my variable so that when the new page is opened it can read that updated variable. I basically need to pass the variable to initialize the page but can't seem to get this simultaneous gesture to run. It runs sometimes and sometimes it does not. It is not dependent on short or long clicks either, it seems to be random.
UserLoggedIn is my environment object which needs to be updated BEFORE the new page loads