mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-04-30 05:54:26 +02:00
feat(patches-selector): improve disabled card UI (#941)
This commit is contained in:
parent
5e7458ff1c
commit
b161608d02
@ -44,13 +44,12 @@ class _PatchItemState extends State<PatchItem> {
|
||||
widget.isSelected = widget.isSelected && (!widget.isUnsupported || widget._managerAPI.areExperimentalPatchesEnabled());
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 4.0),
|
||||
child: CustomCard(
|
||||
backgroundColor: widget.isUnsupported &&
|
||||
child: Opacity(
|
||||
opacity: widget.isUnsupported &&
|
||||
widget._managerAPI.areExperimentalPatchesEnabled() == false
|
||||
? Theme.of(context).colorScheme.brightness == Brightness.light
|
||||
? Colors.grey[400]
|
||||
: Colors.grey[700]
|
||||
: null,
|
||||
? 0.5
|
||||
: 1,
|
||||
child: CustomCard(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
if (widget.isUnsupported &&
|
||||
@ -128,8 +127,8 @@ class _PatchItemState extends State<PatchItem> {
|
||||
!widget._managerAPI
|
||||
.areExperimentalPatchesEnabled()) {
|
||||
widget.isSelected = false;
|
||||
widget.toast
|
||||
.showBottom('patchItem.unsupportedPatchVersion');
|
||||
widget.toast.showBottom(
|
||||
'patchItem.unsupportedPatchVersion');
|
||||
} else {
|
||||
widget.isSelected = newValue!;
|
||||
}
|
||||
@ -140,7 +139,8 @@ class _PatchItemState extends State<PatchItem> {
|
||||
)
|
||||
],
|
||||
),
|
||||
if (widget.isUnsupported)
|
||||
if (widget.isUnsupported &&
|
||||
widget._managerAPI.areExperimentalPatchesEnabled())
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
@ -175,6 +175,7 @@ class _PatchItemState extends State<PatchItem> {
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user