Show correct category

FossilOrigin-Name: 579e6afea17ae7cbe5cd22097ae7c1e84a0cf9841bf8eafce0e9316cfdb35e7a
This commit is contained in:
me@ow.nekobit.net 2022-04-19 17:09:51 +00:00
parent 88985eed10
commit 853744e1b0
3 changed files with 7 additions and 7 deletions

View file

@ -22,5 +22,5 @@
void content_index(struct session* ssn, mastodont_t* api)
{
// Check logins
tl_public(ssn, api, 0);
tl_public(ssn, api, 0, BASE_CAT_HOME);
}

View file

@ -31,7 +31,7 @@
#include "../static/navigation.chtml"
void tl_public(struct session* ssn, mastodont_t* api, int local)
void tl_public(struct session* ssn, mastodont_t* api, int local, enum base_category cat)
{
size_t status_count = 0, statuses_html_count = 0;
struct mstdnt_status* statuses = NULL;
@ -82,7 +82,7 @@ void tl_public(struct session* ssn, mastodont_t* api, int local)
STR_NULL_EMPTY(navigation_box));
struct base_page b = {
.category = BASE_CAT_HOME,
.category = cat,
.locale = L10N_EN_US,
.content = output,
.sidebar_left = NULL
@ -152,17 +152,16 @@ void tl_list(struct session* ssn, mastodont_t* api, char* list_id)
if (output) free(output);
}
void content_tl_federated(struct session* ssn, mastodont_t* api, char** data)
{
(void)data;
tl_public(ssn, api, 0);
tl_public(ssn, api, 0, BASE_CAT_FEDERATED);
}
void content_tl_local(struct session* ssn, mastodont_t* api, char** data)
{
(void)data;
tl_public(ssn, api, 1);
tl_public(ssn, api, 1, BASE_CAT_LOCAL);
}
void content_tl_list(struct session* ssn, mastodont_t* api, char** data)

View file

@ -21,9 +21,10 @@
#include <stddef.h>
#include <mastodont.h>
#include "session.h"
#include "base_page.h"
// Federated and local are here
void tl_public(struct session* ssn, mastodont_t* api, int local);
void tl_public(struct session* ssn, mastodont_t* api, int local, enum base_category cat);
void tl_list(struct session* ssn, mastodont_t* api, char* list_id);
void content_tl_federated(struct session* ssn, mastodont_t* api, char** data);