mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-06-12 12:47:37 +02:00
refactor: reorganize and rename settings (#1307)
Co-authored-by: Pun Butrach <pun.butrach@gmail.com> Co-authored-by: Ushie <ushiekane@gmail.com>
This commit is contained in:
@ -48,13 +48,12 @@ class _PatchItemState extends State<PatchItem> {
|
||||
Widget build(BuildContext context) {
|
||||
widget.isSelected = widget.isSelected &&
|
||||
(!widget.isUnsupported ||
|
||||
widget._managerAPI.areExperimentalPatchesEnabled()) &&
|
||||
!widget.hasUnsupportedPatchOption;
|
||||
widget._managerAPI.isVersionCompatibilityCheckEnabled()) && !widget.hasUnsupportedPatchOption;
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 4.0),
|
||||
child: Opacity(
|
||||
opacity: widget.isUnsupported &&
|
||||
widget._managerAPI.areExperimentalPatchesEnabled() == false
|
||||
widget._managerAPI.isVersionCompatibilityCheckEnabled() == false
|
||||
? 0.5
|
||||
: 1,
|
||||
child: CustomCard(
|
||||
@ -66,7 +65,7 @@ class _PatchItemState extends State<PatchItem> {
|
||||
),
|
||||
onTap: () {
|
||||
if (widget.isUnsupported &&
|
||||
!widget._managerAPI.areExperimentalPatchesEnabled()) {
|
||||
!widget._managerAPI.isVersionCompatibilityCheckEnabled()) {
|
||||
widget.isSelected = false;
|
||||
widget.toast.showBottom('patchItem.unsupportedPatchVersion');
|
||||
} else if (widget.isChangeEnabled) {
|
||||
@ -80,7 +79,7 @@ class _PatchItemState extends State<PatchItem> {
|
||||
setState(() {});
|
||||
}
|
||||
if (!widget.isUnsupported ||
|
||||
widget._managerAPI.areExperimentalPatchesEnabled()) {
|
||||
widget._managerAPI.isVersionCompatibilityCheckEnabled()) {
|
||||
widget.onChanged(widget.isSelected);
|
||||
}
|
||||
},
|
||||
@ -99,7 +98,7 @@ class _PatchItemState extends State<PatchItem> {
|
||||
),
|
||||
onChanged: (newValue) {
|
||||
if (widget.isUnsupported &&
|
||||
!widget._managerAPI.areExperimentalPatchesEnabled()) {
|
||||
!widget._managerAPI.isVersionCompatibilityCheckEnabled()) {
|
||||
widget.isSelected = false;
|
||||
widget.toast.showBottom(
|
||||
'patchItem.unsupportedPatchVersion',
|
||||
@ -115,7 +114,7 @@ class _PatchItemState extends State<PatchItem> {
|
||||
setState(() {});
|
||||
}
|
||||
if (!widget.isUnsupported ||
|
||||
widget._managerAPI.areExperimentalPatchesEnabled()) {
|
||||
widget._managerAPI.isVersionCompatibilityCheckEnabled()) {
|
||||
widget.onChanged(widget.isSelected);
|
||||
}
|
||||
},
|
||||
@ -156,7 +155,7 @@ class _PatchItemState extends State<PatchItem> {
|
||||
children: [
|
||||
if (widget.isUnsupported &&
|
||||
widget._managerAPI
|
||||
.areExperimentalPatchesEnabled())
|
||||
.isVersionCompatibilityCheckEnabled())
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 8),
|
||||
child: TextButton.icon(
|
||||
|
Reference in New Issue
Block a user