Make sure the save button is disabled when no usb application is selected

This commit is contained in:
Dennis Fokin 2022-06-14 16:26:35 +02:00
parent 8f932b3af0
commit e75793ae30
No known key found for this signature in database
GPG Key ID: 870B88256690D8BC

View File

@ -250,10 +250,11 @@ class _ManagementScreenState extends ConsumerState<ManagementScreen> {
data: (info) {
bool hasConfig = info.version.major > 4;
if (hasConfig) {
canSave = !_mapEquals(
_enabled,
info.config.enabledCapabilities,
);
canSave = _enabled[Transport.usb] != 0 &&
!_mapEquals(
_enabled,
info.config.enabledCapabilities,
);
} else {
canSave = _interfaces != 0 &&
_interfaces !=