mirror of
https://github.com/redlib-org/redlib.git
synced 2025-06-08 23:57:46 +00:00
Default subreddit post sorting. Closes #166
This commit is contained in:
parent
2533e8cef5
commit
6a7f725c12
6 changed files with 16 additions and 20 deletions
|
@ -40,7 +40,7 @@ pub async fn item(req: Request<Body>) -> Result<Response<Body>, String> {
|
|||
#[cfg(debug_assertions)]
|
||||
dbg!(req.param("id").unwrap_or_default());
|
||||
|
||||
let single_thread = &req.param("comment_id").is_some();
|
||||
let single_thread = req.param("comment_id").is_some();
|
||||
let highlighted_comment = &req.param("comment_id").unwrap_or_default();
|
||||
|
||||
// Send a request to the url, receive JSON in response
|
||||
|
@ -57,7 +57,7 @@ pub async fn item(req: Request<Body>) -> Result<Response<Body>, String> {
|
|||
post,
|
||||
sort,
|
||||
prefs: Preferences::new(req),
|
||||
single_thread: *single_thread,
|
||||
single_thread,
|
||||
})
|
||||
}
|
||||
// If the Reddit API returns an error, exit and send error page to user
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue