Skip to content

gui: Avoid search action if query is empty#209

Merged
jpochyla merged 1 commit intojpochyla:masterfrom
guerinoni:search-fix-emtpy-query
Nov 11, 2021
Merged

gui: Avoid search action if query is empty#209
jpochyla merged 1 commit intojpochyla:masterfrom
guerinoni:search-fix-emtpy-query

Conversation

@guerinoni
Copy link
Copy Markdown
Contributor

This avoid to show api error from spotify.

Signed-off-by: Federico Guerinoni guerinoni.federico@gmail.com
Co-authored-by: Paolo Barbolini paolo@paolo565.org

This avoid to show api error from spotify.

Signed-off-by: Federico Guerinoni <guerinoni.federico@gmail.com>
Co-authored-by: Paolo Barbolini <paolo@paolo565.org>
@guerinoni
Copy link
Copy Markdown
Contributor Author

@jpochyla any news?

Comment thread psst-gui/src/ui/search.rs
.with_placeholder("Search")
.controller(InputController::new().on_submit(|ctx, query, _| {
if query.trim().is_empty() {
return
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit, missing a ; here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As lambda it works, but if you prefer I can add it :)

@jpochyla
Copy link
Copy Markdown
Owner

jpochyla commented Nov 9, 2021

Hi! Thanks for the change and sorry for the delay.

@jpochyla jpochyla merged commit 08282a9 into jpochyla:master Nov 11, 2021
@guerinoni guerinoni deleted the search-fix-emtpy-query branch November 11, 2021 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants