I have this issue since I started my project, and it's not really critical but I have been holding on to it for a while and I'd like to find a fix or a workaround for it.
It's hard for me to explain it in brief so I'll try to mention real examples to try and get me point out there.
I'm working on an ESS system that deals with employees and their leaves, business trip requests and such. Everything is working as intended, but here is the hiccup. Let's say an employee submitted a request for a leave and a business trip. Their manager would get the push notification for both which is working as intended, but if said manager takes a decision for one (call it request A) and then while inside the app takes a decision for the other one (call it request B), they still end up with the notification for request B, which is completely fine. But when they tap that notification which takes them to the request they have already took their decision upon, they get the page like it's still awaiting their decision, the data inside the page is outdated and does not reflect the changes that took place and I have confirmed that the changes are written to Firebase. (I have even made a dummy boolean page state and toggle it's value with a page rebuild on page load and still nothing.)
That is one case. The other case, I have a page that is hidden (no way to navigate to it normally from within the app), but a user can reach it if they scan an NFC tag using the app's URL scheme (so they can reach it even if the app is not in the foreground). That page has a countdown timer for the user to take action or else their action button gets disabled and they are navigated to the home screen (while disabling the back button action for Android). It works fine, until any user that got timed out tries to scan the NFC tag again, they get the page in it's timed out state, the counter is not reset and the option to take action is disabled. I have the countdown timer tied to a page state that gets reset on page load but still having this behavior. The only way to rectify it is to literally close the app and either relaunch it manually or scan the NFC tag while it's closed.
P.S: To test that the page state gets reset, I have made a dummy button linking to that page and every time I tap the button it works as intended (resets and timer and the action button is enabled).
Sorry for rambling, but, can anyone help with this issue or has faced such issues and fixed it?
Thanks!