Skip to content

Commit

Permalink
Merge pull request #653 from jingchanglu/master
Browse files Browse the repository at this point in the history
refactor: Remove redundant logic
  • Loading branch information
0xfornax authored Sep 19, 2024
2 parents 260652c + a2700c3 commit e2857c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions rocketpool-cli/service/config/directional-modal.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,7 @@ func (m *DirectionalModal) SetFocus(index int) *DirectionalModal {

// Focus is called when this primitive receives focus.
func (m *DirectionalModal) Focus(delegate func(p tview.Primitive)) {
if m.direction == DirectionalModalHorizontal {
delegate(m.forms[0])
} else {
delegate(m.forms[0])
}
delegate(m.forms[0])
}

// HasFocus returns whether or not this primitive has focus.
Expand Down
6 changes: 1 addition & 5 deletions rocketpool-cli/service/config/pseudomodal.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,7 @@ func (m *Pseudomodal) SetFocus(index int) *Pseudomodal {

// Focus is called when this primitive receives focus.
func (m *Pseudomodal) Focus(delegate func(p tview.Primitive)) {
if m.direction == DirectionalModalHorizontal {
delegate(m.forms[0])
} else {
delegate(m.forms[0])
}
delegate(m.forms[0])
}

// HasFocus returns whether or not this primitive has focus.
Expand Down

0 comments on commit e2857c0

Please sign in to comment.