Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search query not preserved on logout #116

Open
hjek opened this issue Sep 3, 2018 · 3 comments
Open

Search query not preserved on logout #116

hjek opened this issue Sep 3, 2018 · 3 comments

Comments

@hjek
Copy link

hjek commented Sep 3, 2018

When logged into News and doing a search, and then from the search results page pressing "logout", the search query disappears, e.g. the URL changes from being /search?q="something" to just /search. This doesn't happen with other pages, e.g. when logging out from threads?id=someone, the query string remains.

Must be something I implemented wrong in the search page...

@hjek
Copy link
Author

hjek commented Sep 4, 2018

Here's a fix for it. Turns out here was not being set correctly.

@hjek
Copy link
Author

hjek commented Sep 4, 2018

A slightly related thing is, that I wonder how to pre-fill the search bar with the previous search query. It would seem only possible to do by modifying tons of unrelated page functions to pass around search arguments, which would be proper spaghetti.

I wonder if there is some obvious way of dealing with this.

@hjek
Copy link
Author

hjek commented Sep 4, 2018

Ah, ok, it's not that complicated anyway. Yay, global variables!

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

No branches or pull requests

1 participant