diff --git a/Easydict/NewApp/View/SettingView/Tabs/DisabledAppTab.swift b/Easydict/NewApp/View/SettingView/Tabs/DisabledAppTab.swift index 86a161507..b7121c403 100644 --- a/Easydict/NewApp/View/SettingView/Tabs/DisabledAppTab.swift +++ b/Easydict/NewApp/View/SettingView/Tabs/DisabledAppTab.swift @@ -136,13 +136,13 @@ private struct ListToolbar: View { ListButton(systemName: "plus") { disabledAppViewModel.isImporting.toggle() } - .environment(\.isEnabled, true) + .disabled(false) Divider() .padding(.vertical, 1) ListButton(systemName: "minus") { disabledAppViewModel.removeDisabledApp() } - .environment(\.isEnabled, !disabledAppViewModel.selectedAppModels.isEmpty) + .disabled(!disabledAppViewModel.selectedAppModels.isEmpty) Spacer() } .padding(2) @@ -172,7 +172,6 @@ private struct ListButton: View { .font(.system(size: 14, weight: .semibold)) } .buttonStyle(BorderlessButtonStyle()) - .disabled(isEnabled) } }