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,7 +250,8 @@ class _ManagementScreenState extends ConsumerState<ManagementScreen> {
data: (info) {
bool hasConfig = info.version.major > 4;
if (hasConfig) {
canSave = !_mapEquals(
canSave = _enabled[Transport.usb] != 0 &&
!_mapEquals(
_enabled,
info.config.enabledCapabilities,
);