/* Hashtags.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from Hashtags.vala, do not modify */

#include <adwaita.h>
#include <glib-object.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <gio/gio.h>
#include <gee.h>
#include <json-glib/json-glib.h>
#include <glib/gi18n-lib.h>

#define TUBA_VIEWS_SIDEBAR_MAX_SIDEBAR_TAGS 25
#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define TUBA_VIEWS_TYPE_BASE (tuba_views_base_get_type ())
#define TUBA_VIEWS_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_BASE, TubaViewsBase))
#define TUBA_VIEWS_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_BASE, TubaViewsBaseClass))
#define TUBA_VIEWS_IS_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_BASE))
#define TUBA_VIEWS_IS_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_BASE))
#define TUBA_VIEWS_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_BASE, TubaViewsBaseClass))

typedef struct _TubaViewsBase TubaViewsBase;
typedef struct _TubaViewsBaseClass TubaViewsBaseClass;
typedef struct _TubaViewsBasePrivate TubaViewsBasePrivate;

#define TUBA_VIEWS_TYPE_CONTENT_BASE (tuba_views_content_base_get_type ())
#define TUBA_VIEWS_CONTENT_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_CONTENT_BASE, TubaViewsContentBase))
#define TUBA_VIEWS_CONTENT_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_CONTENT_BASE, TubaViewsContentBaseClass))
#define TUBA_VIEWS_IS_CONTENT_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_CONTENT_BASE))
#define TUBA_VIEWS_IS_CONTENT_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_CONTENT_BASE))
#define TUBA_VIEWS_CONTENT_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_CONTENT_BASE, TubaViewsContentBaseClass))

typedef struct _TubaViewsContentBase TubaViewsContentBase;
typedef struct _TubaViewsContentBaseClass TubaViewsContentBaseClass;
typedef struct _TubaViewsContentBasePrivate TubaViewsContentBasePrivate;

#define TUBA_TYPE_ACCOUNT_HOLDER (tuba_account_holder_get_type ())
#define TUBA_ACCOUNT_HOLDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_ACCOUNT_HOLDER, TubaAccountHolder))
#define TUBA_IS_ACCOUNT_HOLDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_ACCOUNT_HOLDER))
#define TUBA_ACCOUNT_HOLDER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TUBA_TYPE_ACCOUNT_HOLDER, TubaAccountHolderIface))

typedef struct _TubaAccountHolder TubaAccountHolder;
typedef struct _TubaAccountHolderIface TubaAccountHolderIface;

#define TUBA_TYPE_ENTITY (tuba_entity_get_type ())
#define TUBA_ENTITY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_ENTITY, TubaEntity))
#define TUBA_ENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_ENTITY, TubaEntityClass))
#define TUBA_IS_ENTITY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_ENTITY))
#define TUBA_IS_ENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_ENTITY))
#define TUBA_ENTITY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_ENTITY, TubaEntityClass))

typedef struct _TubaEntity TubaEntity;
typedef struct _TubaEntityClass TubaEntityClass;

#define TUBA_API_TYPE_ACCOUNT (tuba_api_account_get_type ())
#define TUBA_API_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_ACCOUNT, TubaAPIAccount))
#define TUBA_API_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_ACCOUNT, TubaAPIAccountClass))
#define TUBA_API_IS_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_ACCOUNT))
#define TUBA_API_IS_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_ACCOUNT))
#define TUBA_API_ACCOUNT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_ACCOUNT, TubaAPIAccountClass))

typedef struct _TubaAPIAccount TubaAPIAccount;
typedef struct _TubaAPIAccountClass TubaAPIAccountClass;

#define TUBA_TYPE_INSTANCE_ACCOUNT (tuba_instance_account_get_type ())
#define TUBA_INSTANCE_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_INSTANCE_ACCOUNT, TubaInstanceAccount))
#define TUBA_INSTANCE_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_INSTANCE_ACCOUNT, TubaInstanceAccountClass))
#define TUBA_IS_INSTANCE_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_INSTANCE_ACCOUNT))
#define TUBA_IS_INSTANCE_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_INSTANCE_ACCOUNT))
#define TUBA_INSTANCE_ACCOUNT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_INSTANCE_ACCOUNT, TubaInstanceAccountClass))

typedef struct _TubaInstanceAccount TubaInstanceAccount;
typedef struct _TubaInstanceAccountClass TubaInstanceAccountClass;

#define TUBA_TYPE_STREAMABLE (tuba_streamable_get_type ())
#define TUBA_STREAMABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_STREAMABLE, TubaStreamable))
#define TUBA_IS_STREAMABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_STREAMABLE))
#define TUBA_STREAMABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TUBA_TYPE_STREAMABLE, TubaStreamableIface))

typedef struct _TubaStreamable TubaStreamable;
typedef struct _TubaStreamableIface TubaStreamableIface;

#define TUBA_VIEWS_TYPE_TIMELINE (tuba_views_timeline_get_type ())
#define TUBA_VIEWS_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_TIMELINE, TubaViewsTimeline))
#define TUBA_VIEWS_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_TIMELINE, TubaViewsTimelineClass))
#define TUBA_VIEWS_IS_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_TIMELINE))
#define TUBA_VIEWS_IS_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_TIMELINE))
#define TUBA_VIEWS_TIMELINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_TIMELINE, TubaViewsTimelineClass))

typedef struct _TubaViewsTimeline TubaViewsTimeline;
typedef struct _TubaViewsTimelineClass TubaViewsTimelineClass;
typedef struct _TubaViewsTimelinePrivate TubaViewsTimelinePrivate;

#define TUBA_TYPE_REQUEST (tuba_request_get_type ())
#define TUBA_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_REQUEST, TubaRequest))
#define TUBA_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_REQUEST, TubaRequestClass))
#define TUBA_IS_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_REQUEST))
#define TUBA_IS_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_REQUEST))
#define TUBA_REQUEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_REQUEST, TubaRequestClass))

typedef struct _TubaRequest TubaRequest;
typedef struct _TubaRequestClass TubaRequestClass;

#define TUBA_STREAMABLE_TYPE_EVENT (tuba_streamable_event_get_type ())
typedef struct _TubaStreamableEvent TubaStreamableEvent;

#define TUBA_VIEWS_TYPE_HASHTAGS (tuba_views_hashtags_get_type ())
#define TUBA_VIEWS_HASHTAGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_HASHTAGS, TubaViewsHashtags))
#define TUBA_VIEWS_HASHTAGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_HASHTAGS, TubaViewsHashtagsClass))
#define TUBA_VIEWS_IS_HASHTAGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_HASHTAGS))
#define TUBA_VIEWS_IS_HASHTAGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_HASHTAGS))
#define TUBA_VIEWS_HASHTAGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_HASHTAGS, TubaViewsHashtagsClass))

typedef struct _TubaViewsHashtags TubaViewsHashtags;
typedef struct _TubaViewsHashtagsClass TubaViewsHashtagsClass;
typedef struct _TubaViewsHashtagsPrivate TubaViewsHashtagsPrivate;
enum  {
	TUBA_VIEWS_HASHTAGS_0_PROPERTY,
	TUBA_VIEWS_HASHTAGS_NUM_PROPERTIES
};
static GParamSpec* tuba_views_hashtags_properties[TUBA_VIEWS_HASHTAGS_NUM_PROPERTIES];

#define TUBA_TYPE_WIDGETIZABLE (tuba_widgetizable_get_type ())
#define TUBA_WIDGETIZABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_WIDGETIZABLE, TubaWidgetizable))
#define TUBA_IS_WIDGETIZABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_WIDGETIZABLE))
#define TUBA_WIDGETIZABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TUBA_TYPE_WIDGETIZABLE, TubaWidgetizableIface))

typedef struct _TubaWidgetizable TubaWidgetizable;
typedef struct _TubaWidgetizableIface TubaWidgetizableIface;
typedef struct _TubaEntityPrivate TubaEntityPrivate;

#define TUBA_API_TYPE_TAG (tuba_api_tag_get_type ())
#define TUBA_API_TAG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_TAG, TubaAPITag))
#define TUBA_API_TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_TAG, TubaAPITagClass))
#define TUBA_API_IS_TAG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_TAG))
#define TUBA_API_IS_TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_TAG))
#define TUBA_API_TAG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_TAG, TubaAPITagClass))

typedef struct _TubaAPITag TubaAPITag;
typedef struct _TubaAPITagClass TubaAPITagClass;
typedef struct _TubaAPITagPrivate TubaAPITagPrivate;

#define TUBA_VIEWS_HASHTAGS_TYPE_FAVORITE_TAG (tuba_views_hashtags_favorite_tag_get_type ())
#define TUBA_VIEWS_HASHTAGS_FAVORITE_TAG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_HASHTAGS_TYPE_FAVORITE_TAG, TubaViewsHashtagsFavoriteTag))
#define TUBA_VIEWS_HASHTAGS_FAVORITE_TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_HASHTAGS_TYPE_FAVORITE_TAG, TubaViewsHashtagsFavoriteTagClass))
#define TUBA_VIEWS_HASHTAGS_IS_FAVORITE_TAG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_HASHTAGS_TYPE_FAVORITE_TAG))
#define TUBA_VIEWS_HASHTAGS_IS_FAVORITE_TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_HASHTAGS_TYPE_FAVORITE_TAG))
#define TUBA_VIEWS_HASHTAGS_FAVORITE_TAG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_HASHTAGS_TYPE_FAVORITE_TAG, TubaViewsHashtagsFavoriteTagClass))

typedef struct _TubaViewsHashtagsFavoriteTag TubaViewsHashtagsFavoriteTag;
typedef struct _TubaViewsHashtagsFavoriteTagClass TubaViewsHashtagsFavoriteTagClass;
typedef struct _TubaViewsHashtagsFavoriteTagPrivate TubaViewsHashtagsFavoriteTagPrivate;

#define TUBA_WIDGETS_TYPE_STATUS_ACTION_BUTTON (tuba_widgets_status_action_button_get_type ())
#define TUBA_WIDGETS_STATUS_ACTION_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_STATUS_ACTION_BUTTON, TubaWidgetsStatusActionButton))
#define TUBA_WIDGETS_STATUS_ACTION_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_STATUS_ACTION_BUTTON, TubaWidgetsStatusActionButtonClass))
#define TUBA_WIDGETS_IS_STATUS_ACTION_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_STATUS_ACTION_BUTTON))
#define TUBA_WIDGETS_IS_STATUS_ACTION_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_STATUS_ACTION_BUTTON))
#define TUBA_WIDGETS_STATUS_ACTION_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_STATUS_ACTION_BUTTON, TubaWidgetsStatusActionButtonClass))

typedef struct _TubaWidgetsStatusActionButton TubaWidgetsStatusActionButton;
typedef struct _TubaWidgetsStatusActionButtonClass TubaWidgetsStatusActionButtonClass;
enum  {
	TUBA_VIEWS_HASHTAGS_FAVORITE_TAG_0_PROPERTY,
	TUBA_VIEWS_HASHTAGS_FAVORITE_TAG_NUM_PROPERTIES
};
static GParamSpec* tuba_views_hashtags_favorite_tag_properties[TUBA_VIEWS_HASHTAGS_FAVORITE_TAG_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define TUBA_TYPE_SETTINGS (tuba_settings_get_type ())
#define TUBA_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_SETTINGS, TubaSettings))
#define TUBA_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_SETTINGS, TubaSettingsClass))
#define TUBA_IS_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_SETTINGS))
#define TUBA_IS_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_SETTINGS))
#define TUBA_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_SETTINGS, TubaSettingsClass))

typedef struct _TubaSettings TubaSettings;
typedef struct _TubaSettingsClass TubaSettingsClass;

#define TUBA_TYPE_ACCOUNT_STORE (tuba_account_store_get_type ())
#define TUBA_ACCOUNT_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_ACCOUNT_STORE, TubaAccountStore))
#define TUBA_ACCOUNT_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_ACCOUNT_STORE, TubaAccountStoreClass))
#define TUBA_IS_ACCOUNT_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_ACCOUNT_STORE))
#define TUBA_IS_ACCOUNT_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_ACCOUNT_STORE))
#define TUBA_ACCOUNT_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_ACCOUNT_STORE, TubaAccountStoreClass))

typedef struct _TubaAccountStore TubaAccountStore;
typedef struct _TubaAccountStoreClass TubaAccountStoreClass;

struct _TubaViewsBase {
	AdwBreakpointBin parent_instance;
	TubaViewsBasePrivate * priv;
	AdwHeaderBar* header;
	AdwToolbarView* toolbar_view;
	GtkScrolledWindow* scrolled;
	GtkOverlay* scrolled_overlay;
	GtkRevealer* scroll_to_top_rev;
	GtkButton* scroll_to_top;
	GtkStack* states;
	AdwClamp* content_box;
	GtkButton* status_button;
};

struct _TubaViewsBaseClass {
	AdwBreakpointBinClass parent_class;
	void (*scroll_page) (TubaViewsBase* self, gboolean up);
	void (*unbind_listboxes) (TubaViewsBase* self);
	void (*build_actions) (TubaViewsBase* self);
	void (*build_header) (TubaViewsBase* self);
	void (*clear) (TubaViewsBase* self);
	void (*on_shown) (TubaViewsBase* self);
	void (*on_hidden) (TubaViewsBase* self);
	void (*on_content_changed) (TubaViewsBase* self);
	void (*on_error) (TubaViewsBase* self, gint32 code, const gchar* reason);
};

struct _TubaViewsContentBase {
	TubaViewsBase parent_instance;
	TubaViewsContentBasePrivate * priv;
	GtkListBox* content;
	GListStore* model;
};

struct _TubaViewsContentBaseClass {
	TubaViewsBaseClass parent_class;
	void (*on_scrolled_vadjustment_value_change) (TubaViewsContentBase* self);
	void (*clear_all_but_first) (TubaViewsContentBase* self, gint i);
	GtkWidget* (*on_create_model_widget) (TubaViewsContentBase* self, GObject* obj);
	void (*on_bottom_reached) (TubaViewsContentBase* self);
	void (*on_content_item_activated) (TubaViewsContentBase* self, GtkListBoxRow* row);
	gboolean (*get_empty) (TubaViewsContentBase* self);
};

struct _TubaAccountHolderIface {
	GTypeInterface parent_iface;
	void (*on_account_changed) (TubaAccountHolder* self, TubaInstanceAccount* acc);
	void (*on_accounts_changed) (TubaAccountHolder* self, GeeArrayList* accounts);
	TubaInstanceAccount* (*get_account) (TubaAccountHolder* self);
	void (*set_account) (TubaAccountHolder* self, TubaInstanceAccount* value);
};

struct _TubaStreamableIface {
	GTypeInterface parent_iface;
	gchar* (*get_stream_url) (TubaStreamable* self);
	void (*on_streaming_policy_changed) (TubaStreamable* self);
	const gchar* (*get_t_connection_url) (TubaStreamable* self);
	void (*set_t_connection_url) (TubaStreamable* self, const gchar* value);
	gboolean (*get_subscribed) (TubaStreamable* self);
	void (*set_subscribed) (TubaStreamable* self, gboolean value);
};

struct _TubaStreamableEvent {
	gchar* type;
	JsonNode* payload;
};

struct _TubaViewsTimeline {
	TubaViewsContentBase parent_instance;
	TubaViewsTimelinePrivate * priv;
};

struct _TubaViewsTimelineClass {
	TubaViewsContentBaseClass parent_class;
	gchar* (*get_req_url) (TubaViewsTimeline* self);
	TubaRequest* (*append_params) (TubaViewsTimeline* self, TubaRequest* req);
	void (*on_request_finish) (TubaViewsTimeline* self);
	gboolean (*request) (TubaViewsTimeline* self);
	void (*on_refresh) (TubaViewsTimeline* self);
	void (*on_manual_refresh) (TubaViewsTimeline* self);
	void (*on_account_changed) (TubaViewsTimeline* self, TubaInstanceAccount* acc);
	gchar* (*get_stream_url) (TubaViewsTimeline* self);
	gboolean (*should_hide) (TubaViewsTimeline* self, TubaEntity* entity);
	void (*on_new_post) (TubaViewsTimeline* self, TubaStreamableEvent* ev);
	void (*on_edit_post) (TubaViewsTimeline* self, TubaStreamableEvent* ev);
	void (*on_delete_post) (TubaViewsTimeline* self, TubaStreamableEvent* ev);
	void (*on_remove_user) (TubaViewsTimeline* self, const gchar* user_id);
};

struct _TubaViewsHashtags {
	TubaViewsTimeline parent_instance;
	TubaViewsHashtagsPrivate * priv;
};

struct _TubaViewsHashtagsClass {
	TubaViewsTimelineClass parent_class;
};

struct _TubaWidgetizableIface {
	GTypeInterface parent_iface;
	GtkWidget* (*to_widget) (TubaWidgetizable* self);
	void (*open) (TubaWidgetizable* self);
	void (*resolve_open) (TubaWidgetizable* self, TubaInstanceAccount* account);
};

struct _TubaEntity {
	GObject parent_instance;
	TubaEntityPrivate * priv;
};

struct _TubaEntityClass {
	GObjectClass parent_class;
	gboolean (*is_local) (TubaEntity* self, TubaInstanceAccount* account);
	GType (*deserialize_array_type) (TubaEntity* self, const gchar* prop);
};

struct _TubaAPITag {
	TubaEntity parent_instance;
	TubaAPITagPrivate * priv;
};

struct _TubaAPITagClass {
	TubaEntityClass parent_class;
};

struct _TubaViewsHashtagsFavoriteTag {
	TubaAPITag parent_instance;
	TubaViewsHashtagsFavoriteTagPrivate * priv;
};

struct _TubaViewsHashtagsFavoriteTagClass {
	TubaAPITagClass parent_class;
};

struct _TubaViewsHashtagsFavoriteTagPrivate {
	TubaWidgetsStatusActionButton* tuba_fav_button;
};

static gpointer tuba_views_hashtags_parent_class = NULL;
static gint TubaViewsHashtagsFavoriteTag_private_offset;
static gpointer tuba_views_hashtags_favorite_tag_parent_class = NULL;
VALA_EXTERN TubaSettings* tuba_settings;
VALA_EXTERN TubaAccountStore* tuba_accounts;
static TubaWidgetizableIface * tuba_views_hashtags_favorite_tag_tuba_widgetizable_parent_iface = NULL;

VALA_EXTERN GType tuba_views_base_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsBase, g_object_unref)
VALA_EXTERN GType tuba_views_content_base_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsContentBase, g_object_unref)
VALA_EXTERN GType tuba_entity_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaEntity, g_object_unref)
VALA_EXTERN GType tuba_api_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIAccount, g_object_unref)
VALA_EXTERN GType tuba_instance_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaInstanceAccount, g_object_unref)
VALA_EXTERN GType tuba_account_holder_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAccountHolder, g_object_unref)
VALA_EXTERN GType tuba_streamable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaStreamable, g_object_unref)
VALA_EXTERN GType tuba_views_timeline_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsTimeline, g_object_unref)
VALA_EXTERN GType tuba_request_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaRequest, g_object_unref)
VALA_EXTERN GType tuba_streamable_event_get_type (void) G_GNUC_CONST ;
VALA_EXTERN TubaStreamableEvent* tuba_streamable_event_dup (const TubaStreamableEvent* self);
VALA_EXTERN void tuba_streamable_event_free (TubaStreamableEvent* self);
VALA_EXTERN void tuba_streamable_event_copy (const TubaStreamableEvent* self,
                                 TubaStreamableEvent* dest);
VALA_EXTERN void tuba_streamable_event_destroy (TubaStreamableEvent* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (TubaStreamableEvent, tuba_streamable_event_destroy)
VALA_EXTERN GType tuba_views_hashtags_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsHashtags, g_object_unref)
VALA_EXTERN TubaViewsHashtags* tuba_views_hashtags_new (void);
VALA_EXTERN TubaViewsHashtags* tuba_views_hashtags_construct (GType object_type);
VALA_EXTERN TubaViewsTimeline* tuba_views_timeline_new (void);
VALA_EXTERN TubaViewsTimeline* tuba_views_timeline_construct (GType object_type);
VALA_EXTERN GType tuba_widgetizable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetizable, g_object_unref)
VALA_EXTERN GType tuba_api_tag_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPITag, g_object_unref)
VALA_EXTERN GType tuba_views_hashtags_favorite_tag_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsHashtagsFavoriteTag, g_object_unref)
VALA_EXTERN GType tuba_widgets_status_action_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsStatusActionButton, g_object_unref)
static GtkWidget* tuba_views_hashtags_favorite_tag_real_to_widget (TubaWidgetizable* base);
VALA_EXTERN GtkWidget* tuba_widgetizable_to_widget (TubaWidgetizable* self);
VALA_EXTERN TubaWidgetsStatusActionButton* tuba_widgets_status_action_button_new_with_icon_name (const gchar* icon_name);
VALA_EXTERN TubaWidgetsStatusActionButton* tuba_widgets_status_action_button_construct_with_icon_name (GType object_type,
                                                                                           const gchar* icon_name);
VALA_EXTERN void tuba_widgets_status_action_button_set_active_icon_name (TubaWidgetsStatusActionButton* self,
                                                             const gchar* value);
static void tuba_views_hashtags_favorite_tag_on_favorite_button_clicked (TubaViewsHashtagsFavoriteTag* self);
static void _tuba_views_hashtags_favorite_tag_on_favorite_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                      gpointer self);
VALA_EXTERN GType tuba_settings_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaSettings, g_object_unref)
static void tuba_views_hashtags_favorite_tag_on_fav_tags_updated (TubaViewsHashtagsFavoriteTag* self);
static void _tuba_views_hashtags_favorite_tag_on_fav_tags_updated_g_object_notify (GObject* _sender,
                                                                            GParamSpec* pspec,
                                                                            gpointer self);
static void tuba_views_hashtags_favorite_tag_update_fav_status (TubaViewsHashtagsFavoriteTag* self);
VALA_EXTERN const gchar* tuba_api_tag_get_name (TubaAPITag* self);
VALA_EXTERN gchar** tuba_settings_get_favorite_tags_ids (TubaSettings* self,
                                             gint* result_length1);
VALA_EXTERN void tuba_widgets_status_action_button_set_active (TubaWidgetsStatusActionButton* self,
                                                   gboolean value);
VALA_EXTERN gboolean tuba_widgets_status_action_button_get_active (TubaWidgetsStatusActionButton* self);
static void tuba_views_hashtags_favorite_tag_add_to_favs (TubaViewsHashtagsFavoriteTag* self);
static void tuba_views_hashtags_favorite_tag_remove_from_favs (TubaViewsHashtagsFavoriteTag* self);
static void _vala_array_add61 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
static void _vala_array_add62 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
VALA_EXTERN void tuba_settings_set_favorite_tags_ids (TubaSettings* self,
                                          gchar** value,
                                          gint value_length1);
VALA_EXTERN GType tuba_account_store_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAccountStore, g_object_unref)
VALA_EXTERN TubaInstanceAccount* tuba_account_store_get_active (TubaAccountStore* self);
VALA_EXTERN gboolean tuba_instance_account_gather_fav_tags (TubaInstanceAccount* self);
static gboolean _tuba_instance_account_gather_fav_tags_gsource_func (gpointer self);
static void _vala_array_add63 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
VALA_EXTERN TubaViewsHashtagsFavoriteTag* tuba_views_hashtags_favorite_tag_new (void);
VALA_EXTERN TubaViewsHashtagsFavoriteTag* tuba_views_hashtags_favorite_tag_construct (GType object_type);
VALA_EXTERN TubaAPITag* tuba_api_tag_new (void);
VALA_EXTERN TubaAPITag* tuba_api_tag_construct (GType object_type);
static void tuba_views_hashtags_favorite_tag_finalize (GObject * obj);
static GType tuba_views_hashtags_favorite_tag_get_type_once (void);
static GObject * tuba_views_hashtags_constructor (GType type,
                                           guint n_construct_properties,
                                           GObjectConstructParam * construct_properties);
VALA_EXTERN void tuba_views_timeline_set_url (TubaViewsTimeline* self,
                                  const gchar* value);
VALA_EXTERN void tuba_views_base_set_label (TubaViewsBase* self,
                                const gchar* value);
VALA_EXTERN void tuba_views_base_set_icon (TubaViewsBase* self,
                               const gchar* value);
VALA_EXTERN void tuba_views_timeline_set_accepts (TubaViewsTimeline* self,
                                      GType value);
VALA_EXTERN void tuba_views_base_set_empty_state_title (TubaViewsBase* self,
                                            const gchar* value);
VALA_EXTERN void tuba_views_timeline_set_batch_size_min (TubaViewsTimeline* self,
                                             gint value);
static GType tuba_views_hashtags_get_type_once (void);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

TubaViewsHashtags*
tuba_views_hashtags_construct (GType object_type)
{
	TubaViewsHashtags * self = NULL;
	self = (TubaViewsHashtags*) tuba_views_timeline_construct (object_type);
	return self;
}

TubaViewsHashtags*
tuba_views_hashtags_new (void)
{
	return tuba_views_hashtags_construct (TUBA_VIEWS_TYPE_HASHTAGS);
}

static inline gpointer
tuba_views_hashtags_favorite_tag_get_instance_private (TubaViewsHashtagsFavoriteTag* self)
{
	return G_STRUCT_MEMBER_P (self, TubaViewsHashtagsFavoriteTag_private_offset);
}

static void
_tuba_views_hashtags_favorite_tag_on_favorite_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                 gpointer self)
{
	tuba_views_hashtags_favorite_tag_on_favorite_button_clicked ((TubaViewsHashtagsFavoriteTag*) self);
}

static void
_tuba_views_hashtags_favorite_tag_on_fav_tags_updated_g_object_notify (GObject* _sender,
                                                                       GParamSpec* pspec,
                                                                       gpointer self)
{
	tuba_views_hashtags_favorite_tag_on_fav_tags_updated ((TubaViewsHashtagsFavoriteTag*) self);
}

static GtkWidget*
tuba_views_hashtags_favorite_tag_real_to_widget (TubaWidgetizable* base)
{
	TubaViewsHashtagsFavoriteTag * self;
	AdwActionRow* row = NULL;
	GtkWidget* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar** _tmp5_;
	gchar* _tmp6_;
	TubaWidgetsStatusActionButton* _tmp7_ = NULL;
	TubaWidgetsStatusActionButton* _tmp8_;
	TubaWidgetsStatusActionButton* _tmp9_;
	TubaSettings* _tmp10_;
	GtkWidget* result;
	self = (TubaViewsHashtagsFavoriteTag*) base;
	_tmp0_ = tuba_views_hashtags_favorite_tag_tuba_widgetizable_parent_iface->to_widget ((TubaWidgetizable*) G_TYPE_CHECK_INSTANCE_CAST (self, TUBA_API_TYPE_TAG, TubaAPITag));
	row = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, adw_action_row_get_type (), AdwActionRow);
	_tmp1_ = g_strdup ("tuba-starred-symbolic");
	_tmp2_ = g_strdup ("ttl-status-action-star");
	_tmp3_ = g_strdup ("flat");
	_tmp4_ = g_strdup ("circular");
	_tmp5_ = g_new0 (gchar*, 3 + 1);
	_tmp5_[0] = _tmp2_;
	_tmp5_[1] = _tmp3_;
	_tmp5_[2] = _tmp4_;
	_tmp6_ = g_strdup (_ ("Favorite"));
	_tmp7_ = tuba_widgets_status_action_button_new_with_icon_name ("tuba-unstarred-symbolic");
	tuba_widgets_status_action_button_set_active_icon_name (_tmp7_, _tmp1_);
	_g_free0 (_tmp1_);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp7_, _tmp5_);
	_tmp5_ = (_vala_array_free (_tmp5_, 3, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_valign ((GtkWidget*) _tmp7_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp7_, GTK_ALIGN_CENTER);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp7_, _tmp6_);
	_g_free0 (_tmp6_);
	g_object_ref_sink (_tmp7_);
	_g_object_unref0 (self->priv->tuba_fav_button);
	self->priv->tuba_fav_button = _tmp7_;
	_tmp8_ = self->priv->tuba_fav_button;
	g_signal_connect_object ((GtkButton*) _tmp8_, "clicked", (GCallback) _tuba_views_hashtags_favorite_tag_on_favorite_button_clicked_gtk_button_clicked, self, 0);
	_tmp9_ = self->priv->tuba_fav_button;
	adw_action_row_add_prefix (row, (GtkWidget*) _tmp9_);
	_tmp10_ = tuba_settings;
	g_signal_connect_object ((GObject*) _tmp10_, "notify::favorite-tags-ids", (GCallback) _tuba_views_hashtags_favorite_tag_on_fav_tags_updated_g_object_notify, self, 0);
	tuba_views_hashtags_favorite_tag_update_fav_status (self);
	result = (GtkWidget*) row;
	return result;
}

static void
tuba_views_hashtags_favorite_tag_update_fav_status (TubaViewsHashtagsFavoriteTag* self)
{
	gboolean in_list = FALSE;
	gchar* down_name = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	TubaSettings* _tmp3_;
	gchar** _tmp4_;
	gint _tmp4__length1;
	gint _tmp5_ = 0;
	gchar** _tmp6_;
	gint _tmp6__length1;
	TubaWidgetsStatusActionButton* _tmp13_;
	g_return_if_fail (self != NULL);
	in_list = FALSE;
	_tmp0_ = tuba_api_tag_get_name ((TubaAPITag*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_utf8_strdown (_tmp1_, (gssize) -1);
	down_name = _tmp2_;
	_tmp3_ = tuba_settings;
	_tmp4_ = tuba_settings_get_favorite_tags_ids (_tmp3_, &_tmp5_);
	_tmp4__length1 = _tmp5_;
	_tmp6_ = _tmp4_;
	_tmp6__length1 = _tmp4__length1;
	{
		gchar** tag_name_collection = NULL;
		gint tag_name_collection_length1 = 0;
		gint _tag_name_collection_size_ = 0;
		gint tag_name_it = 0;
		tag_name_collection = _tmp6_;
		tag_name_collection_length1 = _tmp6__length1;
		for (tag_name_it = 0; tag_name_it < tag_name_collection_length1; tag_name_it = tag_name_it + 1) {
			gchar* _tmp7_;
			gchar* tag_name = NULL;
			_tmp7_ = g_strdup (tag_name_collection[tag_name_it]);
			tag_name = _tmp7_;
			{
				const gchar* _tmp8_;
				gchar* _tmp9_;
				gchar* _tmp10_;
				const gchar* _tmp11_;
				gboolean _tmp12_;
				_tmp8_ = tag_name;
				_tmp9_ = g_utf8_strdown (_tmp8_, (gssize) -1);
				_tmp10_ = _tmp9_;
				_tmp11_ = down_name;
				_tmp12_ = g_strcmp0 (_tmp10_, _tmp11_) == 0;
				_g_free0 (_tmp10_);
				if (_tmp12_) {
					in_list = TRUE;
					_g_free0 (tag_name);
					break;
				}
				_g_free0 (tag_name);
			}
		}
	}
	_tmp13_ = self->priv->tuba_fav_button;
	tuba_widgets_status_action_button_set_active (_tmp13_, in_list);
	tuba_views_hashtags_favorite_tag_on_fav_tags_updated (self);
	_g_free0 (down_name);
}

static void
tuba_views_hashtags_favorite_tag_on_favorite_button_clicked (TubaViewsHashtagsFavoriteTag* self)
{
	TubaWidgetsStatusActionButton* _tmp0_;
	TubaWidgetsStatusActionButton* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	TubaWidgetsStatusActionButton* _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->tuba_fav_button;
	_tmp1_ = self->priv->tuba_fav_button;
	_tmp2_ = tuba_widgets_status_action_button_get_active (_tmp1_);
	_tmp3_ = _tmp2_;
	tuba_widgets_status_action_button_set_active (_tmp0_, !_tmp3_);
	_tmp4_ = self->priv->tuba_fav_button;
	_tmp5_ = tuba_widgets_status_action_button_get_active (_tmp4_);
	_tmp6_ = _tmp5_;
	if (_tmp6_) {
		tuba_views_hashtags_favorite_tag_add_to_favs (self);
	} else {
		tuba_views_hashtags_favorite_tag_remove_from_favs (self);
	}
}

static void
tuba_views_hashtags_favorite_tag_on_fav_tags_updated (TubaViewsHashtagsFavoriteTag* self)
{
	gboolean _tmp0_ = FALSE;
	TubaWidgetsStatusActionButton* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	TubaWidgetsStatusActionButton* _tmp8_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->tuba_fav_button;
	_tmp2_ = tuba_widgets_status_action_button_get_active (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_) {
		_tmp0_ = TRUE;
	} else {
		TubaSettings* _tmp4_;
		gchar** _tmp5_;
		gint _tmp5__length1;
		gint _tmp6_ = 0;
		gchar** _tmp7_;
		gint _tmp7__length1;
		_tmp4_ = tuba_settings;
		_tmp5_ = tuba_settings_get_favorite_tags_ids (_tmp4_, &_tmp6_);
		_tmp5__length1 = _tmp6_;
		_tmp7_ = _tmp5_;
		_tmp7__length1 = _tmp5__length1;
		_tmp0_ = _tmp7__length1 < TUBA_VIEWS_SIDEBAR_MAX_SIDEBAR_TAGS;
	}
	_tmp8_ = self->priv->tuba_fav_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp8_, _tmp0_);
}

static void
_vala_array_add61 (gchar** * array,
                   gint* length,
                   gint* size,
                   gchar* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
_vala_array_add62 (gchar** * array,
                   gint* length,
                   gint* size,
                   gchar* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static gboolean
_tuba_instance_account_gather_fav_tags_gsource_func (gpointer self)
{
	gboolean result;
	result = tuba_instance_account_gather_fav_tags ((TubaInstanceAccount*) self);
	return result;
}

static void
tuba_views_hashtags_favorite_tag_add_to_favs (TubaViewsHashtagsFavoriteTag* self)
{
	gchar** res = NULL;
	gchar** _tmp0_;
	gint res_length1;
	gint _res_size_;
	gchar* down_name = NULL;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	TubaSettings* _tmp4_;
	gchar** _tmp5_;
	gint _tmp5__length1;
	gint _tmp6_ = 0;
	gchar** _tmp7_;
	gint _tmp7__length1;
	const gchar* _tmp16_;
	const gchar* _tmp17_;
	gchar* _tmp18_;
	TubaSettings* _tmp19_;
	gchar** _tmp20_;
	gint _tmp20__length1;
	TubaAccountStore* _tmp21_;
	TubaInstanceAccount* _tmp22_;
	TubaInstanceAccount* _tmp23_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_new0 (gchar*, 0 + 1);
	res = _tmp0_;
	res_length1 = 0;
	_res_size_ = res_length1;
	_tmp1_ = tuba_api_tag_get_name ((TubaAPITag*) self);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_utf8_strdown (_tmp2_, (gssize) -1);
	down_name = _tmp3_;
	_tmp4_ = tuba_settings;
	_tmp5_ = tuba_settings_get_favorite_tags_ids (_tmp4_, &_tmp6_);
	_tmp5__length1 = _tmp6_;
	_tmp7_ = _tmp5_;
	_tmp7__length1 = _tmp5__length1;
	{
		gchar** tag_name_collection = NULL;
		gint tag_name_collection_length1 = 0;
		gint _tag_name_collection_size_ = 0;
		gint tag_name_it = 0;
		tag_name_collection = _tmp7_;
		tag_name_collection_length1 = _tmp7__length1;
		for (tag_name_it = 0; tag_name_it < tag_name_collection_length1; tag_name_it = tag_name_it + 1) {
			gchar* _tmp8_;
			gchar* tag_name = NULL;
			_tmp8_ = g_strdup (tag_name_collection[tag_name_it]);
			tag_name = _tmp8_;
			{
				const gchar* _tmp9_;
				gchar* _tmp10_;
				gchar* _tmp11_;
				const gchar* _tmp12_;
				gboolean _tmp13_;
				_tmp9_ = tag_name;
				_tmp10_ = g_utf8_strdown (_tmp9_, (gssize) -1);
				_tmp11_ = _tmp10_;
				_tmp12_ = down_name;
				_tmp13_ = g_strcmp0 (_tmp11_, _tmp12_) != 0;
				_g_free0 (_tmp11_);
				if (_tmp13_) {
					const gchar* _tmp14_;
					gchar* _tmp15_;
					_tmp14_ = tag_name;
					_tmp15_ = g_strdup (_tmp14_);
					_vala_array_add61 (&res, &res_length1, &_res_size_, _tmp15_);
				}
				_g_free0 (tag_name);
			}
		}
	}
	_tmp16_ = tuba_api_tag_get_name ((TubaAPITag*) self);
	_tmp17_ = _tmp16_;
	_tmp18_ = g_strdup (_tmp17_);
	_vala_array_add62 (&res, &res_length1, &_res_size_, _tmp18_);
	_tmp19_ = tuba_settings;
	_tmp20_ = res;
	_tmp20__length1 = res_length1;
	tuba_settings_set_favorite_tags_ids (_tmp19_, _tmp20_, _tmp20__length1);
	_tmp21_ = tuba_accounts;
	_tmp22_ = tuba_account_store_get_active (_tmp21_);
	_tmp23_ = _tmp22_;
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _tuba_instance_account_gather_fav_tags_gsource_func, g_object_ref (_tmp23_), g_object_unref);
	_g_free0 (down_name);
	res = (_vala_array_free (res, res_length1, (GDestroyNotify) g_free), NULL);
}

static void
_vala_array_add63 (gchar** * array,
                   gint* length,
                   gint* size,
                   gchar* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
tuba_views_hashtags_favorite_tag_remove_from_favs (TubaViewsHashtagsFavoriteTag* self)
{
	gchar** new_ids = NULL;
	gchar** _tmp0_;
	gint new_ids_length1;
	gint _new_ids_size_;
	gchar* down_name = NULL;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	TubaSettings* _tmp4_;
	gchar** _tmp5_;
	gint _tmp5__length1;
	gint _tmp6_ = 0;
	gchar** _tmp7_;
	gint _tmp7__length1;
	TubaSettings* _tmp16_;
	gchar** _tmp17_;
	gint _tmp17__length1;
	TubaAccountStore* _tmp18_;
	TubaInstanceAccount* _tmp19_;
	TubaInstanceAccount* _tmp20_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_new0 (gchar*, 0 + 1);
	new_ids = _tmp0_;
	new_ids_length1 = 0;
	_new_ids_size_ = new_ids_length1;
	_tmp1_ = tuba_api_tag_get_name ((TubaAPITag*) self);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_utf8_strdown (_tmp2_, (gssize) -1);
	down_name = _tmp3_;
	_tmp4_ = tuba_settings;
	_tmp5_ = tuba_settings_get_favorite_tags_ids (_tmp4_, &_tmp6_);
	_tmp5__length1 = _tmp6_;
	_tmp7_ = _tmp5_;
	_tmp7__length1 = _tmp5__length1;
	{
		gchar** tag_name_collection = NULL;
		gint tag_name_collection_length1 = 0;
		gint _tag_name_collection_size_ = 0;
		gint tag_name_it = 0;
		tag_name_collection = _tmp7_;
		tag_name_collection_length1 = _tmp7__length1;
		for (tag_name_it = 0; tag_name_it < tag_name_collection_length1; tag_name_it = tag_name_it + 1) {
			gchar* _tmp8_;
			gchar* tag_name = NULL;
			_tmp8_ = g_strdup (tag_name_collection[tag_name_it]);
			tag_name = _tmp8_;
			{
				const gchar* _tmp9_;
				const gchar* _tmp10_;
				gchar* _tmp11_;
				gchar* _tmp12_;
				gboolean _tmp13_;
				_tmp9_ = down_name;
				_tmp10_ = tag_name;
				_tmp11_ = g_utf8_strdown (_tmp10_, (gssize) -1);
				_tmp12_ = _tmp11_;
				_tmp13_ = g_strcmp0 (_tmp9_, _tmp12_) != 0;
				_g_free0 (_tmp12_);
				if (_tmp13_) {
					const gchar* _tmp14_;
					gchar* _tmp15_;
					_tmp14_ = tag_name;
					_tmp15_ = g_strdup (_tmp14_);
					_vala_array_add63 (&new_ids, &new_ids_length1, &_new_ids_size_, _tmp15_);
				}
				_g_free0 (tag_name);
			}
		}
	}
	_tmp16_ = tuba_settings;
	_tmp17_ = new_ids;
	_tmp17__length1 = new_ids_length1;
	tuba_settings_set_favorite_tags_ids (_tmp16_, _tmp17_, _tmp17__length1);
	_tmp18_ = tuba_accounts;
	_tmp19_ = tuba_account_store_get_active (_tmp18_);
	_tmp20_ = _tmp19_;
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _tuba_instance_account_gather_fav_tags_gsource_func, g_object_ref (_tmp20_), g_object_unref);
	_g_free0 (down_name);
	new_ids = (_vala_array_free (new_ids, new_ids_length1, (GDestroyNotify) g_free), NULL);
}

TubaViewsHashtagsFavoriteTag*
tuba_views_hashtags_favorite_tag_construct (GType object_type)
{
	TubaViewsHashtagsFavoriteTag * self = NULL;
	self = (TubaViewsHashtagsFavoriteTag*) tuba_api_tag_construct (object_type);
	return self;
}

TubaViewsHashtagsFavoriteTag*
tuba_views_hashtags_favorite_tag_new (void)
{
	return tuba_views_hashtags_favorite_tag_construct (TUBA_VIEWS_HASHTAGS_TYPE_FAVORITE_TAG);
}

static void
tuba_views_hashtags_favorite_tag_class_init (TubaViewsHashtagsFavoriteTagClass * klass,
                                             gpointer klass_data)
{
	tuba_views_hashtags_favorite_tag_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaViewsHashtagsFavoriteTag_private_offset);
	G_OBJECT_CLASS (klass)->finalize = tuba_views_hashtags_favorite_tag_finalize;
}

static void
tuba_views_hashtags_favorite_tag_tuba_widgetizable_interface_init (TubaWidgetizableIface * iface,
                                                                   gpointer iface_data)
{
	tuba_views_hashtags_favorite_tag_tuba_widgetizable_parent_iface = g_type_interface_peek_parent (iface);
	iface->to_widget = (GtkWidget* (*) (TubaWidgetizable*)) tuba_views_hashtags_favorite_tag_real_to_widget;
}

static void
tuba_views_hashtags_favorite_tag_instance_init (TubaViewsHashtagsFavoriteTag * self,
                                                gpointer klass)
{
	self->priv = tuba_views_hashtags_favorite_tag_get_instance_private (self);
}

static void
tuba_views_hashtags_favorite_tag_finalize (GObject * obj)
{
	TubaViewsHashtagsFavoriteTag * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_HASHTAGS_TYPE_FAVORITE_TAG, TubaViewsHashtagsFavoriteTag);
	_g_object_unref0 (self->priv->tuba_fav_button);
	G_OBJECT_CLASS (tuba_views_hashtags_favorite_tag_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_views_hashtags_favorite_tag_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaViewsHashtagsFavoriteTagClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_views_hashtags_favorite_tag_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaViewsHashtagsFavoriteTag), 0, (GInstanceInitFunc) tuba_views_hashtags_favorite_tag_instance_init, NULL };
	static const GInterfaceInfo tuba_widgetizable_info = { (GInterfaceInitFunc) tuba_views_hashtags_favorite_tag_tuba_widgetizable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType tuba_views_hashtags_favorite_tag_type_id;
	tuba_views_hashtags_favorite_tag_type_id = g_type_register_static (TUBA_API_TYPE_TAG, "TubaViewsHashtagsFavoriteTag", &g_define_type_info, 0);
	g_type_add_interface_static (tuba_views_hashtags_favorite_tag_type_id, TUBA_TYPE_WIDGETIZABLE, &tuba_widgetizable_info);
	TubaViewsHashtagsFavoriteTag_private_offset = g_type_add_instance_private (tuba_views_hashtags_favorite_tag_type_id, sizeof (TubaViewsHashtagsFavoriteTagPrivate));
	return tuba_views_hashtags_favorite_tag_type_id;
}

GType
tuba_views_hashtags_favorite_tag_get_type (void)
{
	static gsize tuba_views_hashtags_favorite_tag_type_id__once = 0;
	if (g_once_init_enter (&tuba_views_hashtags_favorite_tag_type_id__once)) {
		GType tuba_views_hashtags_favorite_tag_type_id;
		tuba_views_hashtags_favorite_tag_type_id = tuba_views_hashtags_favorite_tag_get_type_once ();
		g_once_init_leave (&tuba_views_hashtags_favorite_tag_type_id__once, tuba_views_hashtags_favorite_tag_type_id);
	}
	return tuba_views_hashtags_favorite_tag_type_id__once;
}

static GObject *
tuba_views_hashtags_constructor (GType type,
                                 guint n_construct_properties,
                                 GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TubaViewsHashtags * self;
	parent_class = G_OBJECT_CLASS (tuba_views_hashtags_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_TYPE_HASHTAGS, TubaViewsHashtags);
	tuba_views_timeline_set_url ((TubaViewsTimeline*) self, "/api/v1/followed_tags");
	tuba_views_base_set_label ((TubaViewsBase*) self, _ ("Hashtags"));
	tuba_views_base_set_icon ((TubaViewsBase*) self, "tuba-hashtag-symbolic");
	tuba_views_timeline_set_accepts ((TubaViewsTimeline*) self, TUBA_VIEWS_HASHTAGS_TYPE_FAVORITE_TAG);
	tuba_views_base_set_empty_state_title ((TubaViewsBase*) self, _ ("No Hashtags"));
	tuba_views_timeline_set_batch_size_min ((TubaViewsTimeline*) self, 20);
	return obj;
}

static void
tuba_views_hashtags_class_init (TubaViewsHashtagsClass * klass,
                                gpointer klass_data)
{
	tuba_views_hashtags_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->constructor = tuba_views_hashtags_constructor;
}

static void
tuba_views_hashtags_instance_init (TubaViewsHashtags * self,
                                   gpointer klass)
{
}

 G_GNUC_NO_INLINE static GType
tuba_views_hashtags_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaViewsHashtagsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_views_hashtags_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaViewsHashtags), 0, (GInstanceInitFunc) tuba_views_hashtags_instance_init, NULL };
	GType tuba_views_hashtags_type_id;
	tuba_views_hashtags_type_id = g_type_register_static (TUBA_VIEWS_TYPE_TIMELINE, "TubaViewsHashtags", &g_define_type_info, 0);
	return tuba_views_hashtags_type_id;
}

GType
tuba_views_hashtags_get_type (void)
{
	static gsize tuba_views_hashtags_type_id__once = 0;
	if (g_once_init_enter (&tuba_views_hashtags_type_id__once)) {
		GType tuba_views_hashtags_type_id;
		tuba_views_hashtags_type_id = tuba_views_hashtags_get_type_once ();
		g_once_init_leave (&tuba_views_hashtags_type_id__once, tuba_views_hashtags_type_id);
	}
	return tuba_views_hashtags_type_id__once;
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

