From 5e9580500c38409f627ea66c2edcadbdb21eadf8 Mon Sep 17 00:00:00 2001 From: Gokcehan Date: Sat, 5 Sep 2020 12:55:27 +0300 Subject: [PATCH] show loading directories with previous file list Related #414 --- ui.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ui.go b/ui.go index de19fe4..f5b7b22 100644 --- a/ui.go +++ b/ui.go @@ -318,13 +318,13 @@ func (win *win) printDir(screen tcell.Screen, dir *dir, selections map[string]in return } - if dir.loading { - win.print(screen, 2, 0, tcell.StyleDefault.Reverse(true), "loading...") + if dir.noPerm { + win.print(screen, 2, 0, tcell.StyleDefault.Reverse(true), "permission denied") return } - if dir.noPerm { - win.print(screen, 2, 0, tcell.StyleDefault.Reverse(true), "permission denied") + if dir.loading && len(dir.files) == 0 { + win.print(screen, 2, 0, tcell.StyleDefault.Reverse(true), "loading...") return }