Skip to content

Commit 145bc90

Browse files
author
Stephan Dilly
committed
little cleanup
1 parent 445b732 commit 145bc90

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/app.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -322,10 +322,7 @@ impl App {
322322
}
323323

324324
//TODO: use a new popups_list call for this
325-
let main_cmds_available = !self.commit.is_visible()
326-
&& !self.help.is_visible()
327-
&& !self.reset.is_visible()
328-
&& !self.msg.is_visible();
325+
let main_cmds_available = !self.any_popup_visible();
329326

330327
{
331328
{
@@ -416,6 +413,13 @@ impl App {
416413
None
417414
}
418415

416+
fn any_popup_visible(&self) -> bool {
417+
self.commit.is_visible()
418+
|| self.help.is_visible()
419+
|| self.reset.is_visible()
420+
|| self.msg.is_visible()
421+
}
422+
419423
fn draw_popups<B: Backend>(&self, f: &mut Frame<B>) {
420424
let size = f.size();
421425

0 commit comments

Comments
 (0)