Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimum application version handling #508

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
- Hanaa Allohibi - <https://github.com/hn-n>
- Shey Alnasrawi - <https://github.com/Milksheyke>
- Costas Korai - <https://github.com/watcher6280>
- Bassam Mutairi - <https://github.com/mutairibassam>

## Translators

Expand Down
6 changes: 4 additions & 2 deletions lib/providers/auth.dart
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ class AuthProvider with ChangeNotifier {
if (response.statusCode >= 400) {
throw WgerHttpException(response.body);
}

// If update is required don't log in user
if (await applicationUpdateRequired()) {
return {'action': LoginActions.update};
Expand Down Expand Up @@ -174,7 +173,10 @@ class AuthProvider with ChangeNotifier {
await initData(serverUrl);

// If update is required don't log in user
if (await applicationUpdateRequired()) {
if (await applicationUpdateRequired(
applicationVersion!.version,
{MANIFEST_KEY_CHECK_UPDATE: 'true'},
)) {
return {'action': LoginActions.update};
}

Expand Down
Loading