Fix multireddit sidebars
This commit is contained in:
parent
21d96e261f
commit
8c80946121
@ -52,18 +52,19 @@ pub async fn page(req: HttpRequest) -> HttpResponse {
|
|||||||
let sub = if !sub.contains('+') && sub != subscribed && sub != "popular" && sub != "all" {
|
let sub = if !sub.contains('+') && sub != subscribed && sub != "popular" && sub != "all" {
|
||||||
// Regular subreddit
|
// Regular subreddit
|
||||||
subreddit(&sub).await.unwrap_or_default()
|
subreddit(&sub).await.unwrap_or_default()
|
||||||
|
} else if sub == subscribed {
|
||||||
|
// Subscription feed
|
||||||
|
if req.path().starts_with("/r/") {
|
||||||
|
subreddit(&sub).await.unwrap_or_default()
|
||||||
|
} else {
|
||||||
|
Subreddit::default()
|
||||||
|
}
|
||||||
} else if sub.contains('+') {
|
} else if sub.contains('+') {
|
||||||
// Multireddit
|
// Multireddit
|
||||||
Subreddit {
|
Subreddit {
|
||||||
name: sub,
|
name: sub,
|
||||||
..Subreddit::default()
|
..Subreddit::default()
|
||||||
}
|
}
|
||||||
} else if sub == subscribed {
|
|
||||||
if req.path().starts_with("/r/") {
|
|
||||||
subreddit(&sub).await.unwrap_or_default()
|
|
||||||
} else {
|
|
||||||
Subreddit::default()
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
Subreddit::default()
|
Subreddit::default()
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user