diff --git a/app/src/main/java/com/itsaky/androidide/actions/file/CloseAllFilesAction.kt b/app/src/main/java/com/itsaky/androidide/actions/file/CloseAllFilesAction.kt index 9b647de2fc..e9453b17aa 100644 --- a/app/src/main/java/com/itsaky/androidide/actions/file/CloseAllFilesAction.kt +++ b/app/src/main/java/com/itsaky/androidide/actions/file/CloseAllFilesAction.kt @@ -39,6 +39,7 @@ class CloseAllFilesAction(context: Context) : FileTabAction() { override fun EditorHandlerActivity.doAction(data: ActionData): Boolean { closeAll() + this.invalidateOptionsMenu() return true } } diff --git a/app/src/main/java/com/itsaky/androidide/actions/file/CloseFileAction.kt b/app/src/main/java/com/itsaky/androidide/actions/file/CloseFileAction.kt index 1051c363ce..ae8a738b25 100644 --- a/app/src/main/java/com/itsaky/androidide/actions/file/CloseFileAction.kt +++ b/app/src/main/java/com/itsaky/androidide/actions/file/CloseFileAction.kt @@ -38,7 +38,10 @@ class CloseFileAction(context: Context) : FileTabAction() { } override fun EditorHandlerActivity.doAction(data: ActionData): Boolean { - binding.tabs.selectedTabPosition.let { closeFile(it) } + binding.tabs.selectedTabPosition.let { + closeFile(it) + this.invalidateOptionsMenu() + } return true } }