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

update : added forced app update #226

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

SimardeepSingh1450
Copy link
Contributor

@SimardeepSingh1450 SimardeepSingh1450 commented Dec 26, 2023

Description

Added forced app update prompt so so as to prompt the users to force update the app when their app goes below a minimum version.

How it works ?
Conditionally render the login screen only after the minimum version check has been passed using the future-builder widget, but if check is not passed then a prompt pops up which asks the user to first update the app and then use it.

Fixes #217

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Locally tested this app on my android device and tested the new changes as well.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Maintainer Checklist

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tag the PR with the appropriate labels

Copy link
Member

@chandansgowda chandansgowda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please refactor the project. This logic cannot be put inside login screen. Create a utility function or a separate controller if required.

@SimardeepSingh1450
Copy link
Contributor Author

SimardeepSingh1450 commented Dec 27, 2023

@chandansgowda , so should i put it at the beginning when the app just starts ? or where do you suggest to put it ?

@SimardeepSingh1450
Copy link
Contributor Author

@chandansgowda ?

@chandansgowda
Copy link
Member

I meant, the code has to be refactored.

@SimardeepSingh1450
Copy link
Contributor Author

@chandansgowda I have refactored the code and moved the logic to controllers, please review and merge.

Copy link
Member

@chandansgowda chandansgowda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SimardeepSingh1450 I see that there are a lot of code quality guidelines to be met. Refer to dart's coding convention and update the PR.

lib/controllers/version_check_controller.dart Show resolved Hide resolved
lib/controllers/version_check_controller.dart Outdated Show resolved Hide resolved
lib/controllers/version_check_controller.dart Outdated Show resolved Hide resolved
lib/views/screens/login_screen.dart Outdated Show resolved Hide resolved
@SimardeepSingh1450
Copy link
Contributor Author

SimardeepSingh1450 commented Jan 5, 2024

@chandansgowda made the changes please re-review

@SimardeepSingh1450
Copy link
Contributor Author

@chandansgowda , sorry for the delay, but I have resolved the conflicts on the branch and can be merged now 👍

@Aarush-Acharya Aarush-Acharya added enhancement New feature or request ua unattended and removed enhancement New feature or request labels May 24, 2024
@Aarush-Acharya
Copy link
Contributor

Hey @SimardeepSingh1450 please do the requested changes, or explain the reason for leaving it hard coded.

Resolve the conflicts to bring the PR in a stable state will merge once required changes are made

@Aarush-Acharya Aarush-Acharya added attended This PR was attended by a Reviewer and removed ua unattended labels May 24, 2024
@Aarush-Acharya
Copy link
Contributor

@SimardeepSingh1450 please do the requested changes, asap and revet back please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
attended This PR was attended by a Reviewer enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prompt users to upgrade when there is a newer version is available
3 participants