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

feat: Hide the Install button during installation #1633

Merged
merged 10 commits into from Feb 25, 2024

Conversation

erayerdin
Copy link
Contributor

@erayerdin erayerdin commented Jan 12, 2024

Closes #1629

Checked on emulator to test the behavior.

One strange behavior is that the install button does not grey-out for some reason when it's set to null.

@erayerdin erayerdin changed the title Disable Install Button feat: Disable Install Button Jan 12, 2024
label: I18nText('installerView.installButton'),
icon: const Icon(Icons.file_download_outlined),
onPressed: model.isInstalling
? null
Copy link
Contributor Author

@erayerdin erayerdin Jan 12, 2024

Choose a reason for hiding this comment

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

It's been a while since I didn't write anything in Flutter (3 months or sth). AFAIK, passing null to onPressed should also grey-out its styling, but this does not, for some reason (new Metarial 3 thing I suppose).

It behaves correctly, tho.

Copy link
Member

Choose a reason for hiding this comment

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

FABs can't be disabled

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Ushie I can apply a custom disabled styling or hide FAB altogether. Would you like me to? :)

Copy link
Member

Choose a reason for hiding this comment

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

Hi, sorry for the late reply

By material design guidelines, FABs can be hidden but not disabled, so it'd certainly be better to go with hiding it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the feedback. Will apply the patch as soon as I'm available. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Applied the patch.

@@ -453,6 +454,7 @@ class InstallerViewModel extends BaseViewModel {
}

Future<void> installResult(BuildContext context, bool installAsRoot) async {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was lazy to comprehend all the try-catch thing, so I've set isInstalling in each reasonable line in installResult method.

Copy link
Member

@Ushie Ushie left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution! 🎉

@Ushie Ushie changed the title feat: Disable Install Button feat: Hide the Install button during installation Feb 25, 2024
@Ushie Ushie merged commit 3e696d6 into ReVanced:dev Feb 25, 2024
1 check passed
github-actions bot pushed a commit that referenced this pull request Feb 25, 2024
## Features
* Hide the Install button during installation (#1633) ([Eray Erdin (&mut self)](3e696d6))
## Bug Fixes
* Show version label correctly ([oSumAtrIX](c72d10a))
@erayerdin erayerdin deleted the feat/disable-install-button branch February 26, 2024 07:35
github-actions bot pushed a commit that referenced this pull request Mar 5, 2024
# [1.19.0](v1.18.0...v1.19.0) (2024-03-05)

### Bug Fixes

* added a trailing comma ([975180b](975180b))
* adjust padding ([3559477](3559477))
* Allow mounting without Magisk ([3f96608](3f96608))
* Bump dependencies to support BCS keystore ([6ec6546](6ec6546))
* Do not delete files from post-fs-data.d ([70a1086](70a1086))
* Fix patched APKs exports after installation ([1200360](1200360))
* fix redundant buttons on dialog ([079c0de](079c0de))
* Incorrect strings and logics ([#1619](#1619)) ([4f22e88](4f22e88))
* **Keystore Password:** textfield title display ([8e52abd](8e52abd))
* Mount script causes build to fail ([#1613](#1613)) ([f3c78c2](f3c78c2))
* **Patch Option:** Set text colour on dropdown menu ([acb1e24](acb1e24))
* **PopScope:** User able to exit patch screen when the installer is still running ([#1663](#1663)) ([eb6d3cd](eb6d3cd))
* **Release CI:** truncate the "v" from version ([8595099](8595099))
* Show version label correctly ([c72d10a](c72d10a))
* Specify that dark theme is dark ([#1699](#1699)) ([d4b15ae](d4b15ae))
* Stop patch when signing fails ([#1553](#1553)) ([5b2c551](5b2c551))
* **Update Confirmation Sheet:** Add top padding ([9aeb156](9aeb156))
* Use correct title size for bottom sheet ([#1687](#1687)) ([3436523](3436523))
* Use correct version code & name ([#1647](#1647)) ([d933997](d933997))
* use lowercase repo names ([#1626](#1626)) ([edd8602](edd8602))

### Features

* Add a toggle for alternative sources ([#1686](#1686)) ([f89c742](f89c742))
* Add API migration code ([#1615](#1615)) ([28ae276](28ae276))
* add haptic feedback ([#1459](#1459)) ([7911459](7911459))
* Allow changing languages ([#1488](#1488)) ([f82c439](f82c439))
* Display current app language at the top of the list ([aa0575a](aa0575a))
* Hide the Install button during installation ([#1633](#1633)) ([3e696d6](3e696d6))
* Improve app selector and patcher UI ([#1616](#1616)) ([efb2d5e](efb2d5e))
* Improve consistency on language selector ([b2119ce](b2119ce))
* Improve language distinguishness and resolve language-specific issues ([#1706](#1706)) ([6d866d4](6d866d4))
* Improve Split APK warning readability ([#1625](#1625)) ([6fd740f](6fd740f))
* Show a dialog when an update is available ([#1654](#1654)) ([c7d975e](c7d975e))
* Simplify settings strings ([#1618](#1618)) ([0d45fe4](0d45fe4))
* Use more appropriate progress values ([2d7026a](2d7026a))
* use native TextField ([9ed43ef](9ed43ef))

### Performance Improvements

* Load patched apps as soon as possible ([c94eb7a](c94eb7a))

### Reverts

* WillPopScope migration ([3b0fed5](3b0fed5))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants