arclanguage / anarki

Community-managed fork of the Arc dialect of Lisp; for commit privileges submit a pull request.
http://arclanguage.github.io
Other
1.17k stars 160 forks source link

Search query not preserved on logout #116

Open hjek opened 6 years ago

hjek commented 6 years ago

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 commented 6 years ago

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

hjek commented 6 years ago

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 commented 6 years ago

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