summaryrefslogtreecommitdiffhomepage
path: root/android/scripts
diff options
context:
space:
mode:
authorTobias Järvelöv <tobias.jarvelov@mullvad.net>2025-03-11 13:56:06 +0100
committerMarkus Pettersson <markus.pettersson@mullvad.net>2025-03-13 16:19:01 +0100
commitf84318090fa44ac0918b282e66877936fba49b5e (patch)
tree79279217180ac1dd44dac710af21140d0e45f96e /android/scripts
parent8fcdf86f43f86c1a8b649b2dd66ed11bb17c9339 (diff)
downloadmullvadvpn-f84318090fa44ac0918b282e66877936fba49b5e.tar.xz
mullvadvpn-f84318090fa44ac0918b282e66877936fba49b5e.zip
Fix logic keeping users on expired route even after time has been added
When a user creates an account in the app and then adds time to the account outside of the app the user should then be shown the "/main/time-added" route. Whenever an account is created in the app, it's expiredStatus is set immediately to "expired", which makes the app show the "/main/expired" route. When time is added to the account its expiredStatus changes to "time_added" and this should show the "/main/time-added" route. However, due to an overly broad condition in the logic to determine when the "/main/expired" route should be shown, this caused the "main/time-added" route to never be shown, as the overly broad condition effectively prevented the logic to determine when to show the "/main/time-added" route from ever being called. This overly broad condition erroneously targeted all new accounts created from within the app and prevented the transition to the "/main/time-added" route. To fix the problem we update the logic regarding when to show the "/main/expired" route to not check if the account is new, as it is enough to only check if the account is logged in and that its expiredStatus is "expired". This change allows the logic to determine when the "/main/time-added" route should be shown to be called and as such can allow the route to be shown after time has been added.
Diffstat (limited to 'android/scripts')
0 files changed, 0 insertions, 0 deletions