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