Skip to content

Commit

Permalink
fix bucket selected bug when rename bucket
Browse files Browse the repository at this point in the history
  • Loading branch information
songlim327 committed Aug 15, 2023
1 parent 40f5539 commit b0d902f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
3 changes: 3 additions & 0 deletions internal/gui/lib.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ func bindAllBuckets() error {

// Clear key item list value
keys.Set([]string{})

// Unselect bucket
bucketItemList.UnselectAll()
return nil
}

Expand Down
19 changes: 10 additions & 9 deletions internal/gui/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ import (

// Global variables for ui state
var (
a fyne.App
mw fyne.Window
db *core.Database
selBucket string
selKey string
filename binding.String
buckets binding.StringList
keys binding.StringList
keyItemList *widget.List
a fyne.App
mw fyne.Window
db *core.Database
selBucket string
selKey string
filename binding.String
buckets binding.StringList
keys binding.StringList
keyItemList *widget.List
bucketItemList *widget.List
)
2 changes: 1 addition & 1 deletion internal/gui/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func keyBox() *fyne.Container {

// bucBox renders the bucket list container
func bucBox() *fyne.Container {
bucketItemList := itemList(buckets, images.Bucket, cons.BucketEntity)
bucketItemList = itemList(buckets, images.Bucket, cons.BucketEntity)
bucketItemList.OnSelected = bucketHandler
eBucket := widget.NewEntry()
eBucket.PlaceHolder = "Search for buckets..."
Expand Down

0 comments on commit b0d902f

Please sign in to comment.