Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
fix: invalidate options menu after closing files (related #1176) (#1251)
Browse files Browse the repository at this point in the history
  • Loading branch information
FaSheep authored and itsaky committed Nov 9, 2023
1 parent 5f2dca3 commit 31f9b04
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class CloseAllFilesAction(context: Context) : FileTabAction() {

override fun EditorHandlerActivity.doAction(data: ActionData): Boolean {
closeAll()
this.invalidateOptionsMenu()
return true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

0 comments on commit 31f9b04

Please sign in to comment.