fix(app): close preview on single click
match on Preview (the type) to close preview context in single click. matching on Preview type prevents the equality check failing b/w ContextPage::Preview(Some,_) and ContextPage::Preview(None,_)
This commit is contained in:
parent
1c6c93c130
commit
eaef410939
1 changed files with 3 additions and 1 deletions
|
|
@ -3097,7 +3097,9 @@ impl Application for App {
|
||||||
}
|
}
|
||||||
Message::ToggleContextPage(context_page) => {
|
Message::ToggleContextPage(context_page) => {
|
||||||
//TODO: ensure context menus are closed
|
//TODO: ensure context menus are closed
|
||||||
if self.context_page == context_page {
|
if self.context_page == context_page
|
||||||
|
|| matches!(self.context_page, ContextPage::Preview(_, _))
|
||||||
|
{
|
||||||
self.set_show_context(!self.core.window.show_context);
|
self.set_show_context(!self.core.window.show_context);
|
||||||
} else {
|
} else {
|
||||||
self.set_show_context(true);
|
self.set_show_context(true);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue