mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
[collab/space] IDEA-357346 Close action menu after disabling a review mode
Merge-request: IJ-MR-143759 Merged-by: Dmitrii Petukhov <dmitrii.petukhov@jetbrains.com> GitOrigin-RevId: fc4af171625c296d1f09d88542b0525f68036d42
This commit is contained in:
committed by
intellij-monorepo-bot
parent
3ce4eb6cd2
commit
12d67d5f9a
@@ -80,9 +80,20 @@ class CodeReviewInEditorToolbarActionGroup(private val vm: CodeReviewInEditorVie
|
||||
override fun actionPerformed(e: AnActionEvent) = vm.updateBranch()
|
||||
}
|
||||
|
||||
private inner class ViewOptionToggleAction(private val option: DiscussionsViewOption,
|
||||
text: @NlsActions.ActionText String) : ToggleAction(text), DumbAware {
|
||||
private inner class ViewOptionToggleAction(
|
||||
private val option: DiscussionsViewOption,
|
||||
text: @NlsActions.ActionText String,
|
||||
) : ToggleAction(text), DumbAware {
|
||||
override fun getActionUpdateThread(): ActionUpdateThread = ActionUpdateThread.EDT
|
||||
|
||||
override fun update(e: AnActionEvent) {
|
||||
super.update(e)
|
||||
|
||||
if (option == DiscussionsViewOption.DONT_SHOW) {
|
||||
e.presentation.keepPopupOnPerform = KeepPopupOnPerform.Never
|
||||
}
|
||||
}
|
||||
|
||||
override fun isSelected(e: AnActionEvent): Boolean = vm.discussionsViewOption.value == option
|
||||
override fun setSelected(e: AnActionEvent, state: Boolean) = vm.setDiscussionsViewOption(option)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user