fix: allow tapping on patch card when experimental switch is enabled (#464)

This commit is contained in:
Boris M 2022-11-01 22:02:33 +01:00 committed by GitHub
parent e563049f6a
commit 97d4da568b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,7 +53,9 @@ class _PatchItemState extends State<PatchItem> {
: null, : null,
onTap: () { onTap: () {
setState(() { setState(() {
if (widget.isUnsupported) { if (widget.isUnsupported &&
!widget._managerAPI.areExperimentalPatchesEnabled()
) {
widget.isSelected = false; widget.isSelected = false;
widget.toast.showBottom('patchItem.unsupportedPatchVersion'); widget.toast.showBottom('patchItem.unsupportedPatchVersion');
} else { } else {
@ -123,9 +125,8 @@ class _PatchItemState extends State<PatchItem> {
onChanged: (newValue) { onChanged: (newValue) {
setState(() { setState(() {
if (widget.isUnsupported && if (widget.isUnsupported &&
widget._managerAPI !widget._managerAPI.areExperimentalPatchesEnabled()
.areExperimentalPatchesEnabled() == ) {
false) {
widget.isSelected = false; widget.isSelected = false;
widget.toast widget.toast
.showBottom('patchItem.unsupportedPatchVersion'); .showBottom('patchItem.unsupportedPatchVersion');