Skip to content

Commit

Permalink
Reuse click handlers for project and team searches
Browse files Browse the repository at this point in the history
  • Loading branch information
afwillia committed Feb 5, 2025
1 parent 00db61b commit ee4f29b
Showing 1 changed file with 9 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -270,18 +270,15 @@ public ProfileViewImpl(
}
});

teamSearchButton.addClickHandler(event ->
presenter.goTo(new TeamSearch(teamSearchTextBox.getValue()))
);
teamSearchButtonSmall.addClickHandler(event ->
presenter.goTo(new TeamSearch(teamSearchTextBox.getValue()))
);
projectSearchButton.addClickHandler(event ->
presenter.goTo(new Search(getCurrentProjectSearchJSON()))
);
projectSearchButtonSmall.addClickHandler(event ->
presenter.goTo(new Search(getCurrentProjectSearchJSON()))
);
ClickHandler teamSearchHandler = event ->
presenter.goTo(new TeamSearch(teamSearchTextBox.getValue()));
teamSearchButton.addClickHandler(teamSearchHandler);
teamSearchButtonSmall.addClickHandler(teamSearchHandler);

ClickHandler projectSearchHandler = event ->
presenter.goTo(new Search(projectSearchTextBox.getValue()));
projectSearchButton.addClickHandler(projectSearchHandler);
projectSearchButtonSmall.addClickHandler(projectSearchHandler);

moreChallengesButton.addClickHandler(event -> presenter.getMoreChallenges()
);
Expand Down

0 comments on commit ee4f29b

Please sign in to comment.