Start poll model

master
teknomunk 8 months ago
parent 07c197396c
commit 60ca308c7c

@ -11,6 +11,7 @@
#include "model/emoji.h"
#include "model/media.h"
#include "model/fetch.h"
#include "model/status/poll.h"
// Submodules
#include "json/json.h"

@ -7,6 +7,7 @@
struct account;
struct emoji;
struct media;
struct status_poll;
enum
{
@ -90,6 +91,8 @@ struct status
char** items;
int count;
} tags;
struct status_poll* poll;
};
void status_model_init();

@ -0,0 +1,33 @@
#pragma once
#include <time.h>
struct emoji;
struct status_poll_option
{
char* title;
struct {
int* items;
int count;
} votes;
};
struct status_poll
{
time_t expires_at;
bool multiple_choice;
int votes_seen;
bool voted;
struct {
struct status_poll_option* items;
int count;
} options;
struct {
struct emoji** items;
int count;
} emoji;
};
Loading…
Cancel
Save