correctly set current image state on new dir load
This commit is contained in:
5
main.go
5
main.go
@@ -92,9 +92,14 @@ func newBrowse(file string) {
|
||||
return
|
||||
}
|
||||
directoryState.images = []string{}
|
||||
i := 0
|
||||
for _, v := range dirfiles {
|
||||
if filetypes.IsImage(v) {
|
||||
directoryState.images = append(directoryState.images, v.Name())
|
||||
if filepath.Join(directoryState.dir, v.Name()) == file {
|
||||
directoryState.i = i
|
||||
}
|
||||
i++
|
||||
}
|
||||
}
|
||||
updateImage(file)
|
||||
|
Reference in New Issue
Block a user