Closed TJ-BitCanna closed 9 months ago
I have started integrating this option but I still have to think about how to best integrate it
Coded here: https://github.com/BitCannaGlobal/WeedMobile/commit/cfbe3601b30e0e5502482f5678431e78e73b9cb7
To summarize, here is the current configuration: 1/ If the user opens the app for the first time, the default time is 1 minute (60 sec) 2/ If the user has already changed the default disconnection time, each time the app is opened, this value will be set by default.
Fixed here: https://github.com/BitCannaGlobal/WeedMobile/commit/38e15be1e29f4c3970d16de5da5baed4dfb368f2
Just tested setting from 1 minute to 5 minutes on Android. App is indeed not locked after 1 minute in the background. That works.
However, when the app is closed and restarted the value is reset to 1 minute again. It does not remember the preference set to 5 minutes.
Ok! First debug result:
https://capacitorjs.com/docs/apis/app
For app status change detection, I use 1 Except that this function only checks if the app is used or not
In addition to 1, I would have to use 2, this is exactly the solution for issue #20 This feature is more important than I thought!! And I had to read the doc to understand (RTFM, as usual)
Fix: https://capacitorjs.com/docs/apis/app#addlistenerapprestoredresult-
This is a personal note
And finaly fixed!! Can be tested =)
Tested: over 5 minutes it nicely gives a time-out if the time has been set to 5. Returning after just 1 minute nicely gives an unlocked wallet.
Works!
As specified in the UX flow a setting is desired for users to be able to decide themselves what timeframe would be applicable for their wallet to lock itself. That is now missing.