/* Timeline.c generated by valac 0.56.19, the Vala compiler
 * generated from Timeline.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 <float.h>
#include <math.h>
#include <libsoup/soup.h>
#include <glib/gi18n-lib.h>

#define TUBA_INSTANCE_ACCOUNT_EVENT_NEW_POST "update"
#define TUBA_INSTANCE_ACCOUNT_EVENT_EDIT_POST "status.update"
#define TUBA_INSTANCE_ACCOUNT_EVENT_DELETE_POST "delete"
#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_V2 (tuba_request_v2_get_type ())
#define TUBA_REQUEST_V2(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_REQUEST_V2, TubaRequestV2))
#define TUBA_REQUEST_V2_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_REQUEST_V2, TubaRequestV2Class))
#define TUBA_IS_REQUEST_V2(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_REQUEST_V2))
#define TUBA_IS_REQUEST_V2_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_REQUEST_V2))
#define TUBA_REQUEST_V2_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_REQUEST_V2, TubaRequestV2Class))

typedef struct _TubaRequestV2 TubaRequestV2;
typedef struct _TubaRequestV2Class TubaRequestV2Class;

#define TUBA_STREAMABLE_TYPE_EVENT (tuba_streamable_event_get_type ())
typedef struct _TubaStreamableEvent TubaStreamableEvent;
enum  {
	TUBA_VIEWS_TIMELINE_0_PROPERTY,
	TUBA_VIEWS_TIMELINE_URL_PROPERTY,
	TUBA_VIEWS_TIMELINE_IS_PUBLIC_PROPERTY,
	TUBA_VIEWS_TIMELINE_ACCEPTS_PROPERTY,
	TUBA_VIEWS_TIMELINE_USE_QUEUE_PROPERTY,
	TUBA_VIEWS_TIMELINE_BATCH_SIZE_MIN_PROPERTY,
	TUBA_VIEWS_TIMELINE_ACCOUNT_PROPERTY,
	TUBA_VIEWS_TIMELINE_FORCE_AT_LEAST_MIN_PROPERTY,
	TUBA_VIEWS_TIMELINE_IS_LAST_PAGE_PROPERTY,
	TUBA_VIEWS_TIMELINE_PAGE_NEXT_PROPERTY,
	TUBA_VIEWS_TIMELINE_PAGE_PREV_PROPERTY,
	TUBA_VIEWS_TIMELINE_ENTITY_QUEUE_SIZE_PROPERTY,
	TUBA_VIEWS_TIMELINE_HAS_FINISHED_REQUEST_PROPERTY,
	TUBA_VIEWS_TIMELINE_REQUEST_CANCELLABLE_PROPERTY,
	TUBA_VIEWS_TIMELINE_T_CONNECTION_URL_PROPERTY,
	TUBA_VIEWS_TIMELINE_SUBSCRIBED_PROPERTY,
	TUBA_VIEWS_TIMELINE_NUM_PROPERTIES
};
static GParamSpec* tuba_views_timeline_properties[TUBA_VIEWS_TIMELINE_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))

#define TUBA_API_TYPE_STATUS (tuba_api_status_get_type ())
#define TUBA_API_STATUS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_STATUS, TubaAPIStatus))
#define TUBA_API_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_STATUS, TubaAPIStatusClass))
#define TUBA_API_IS_STATUS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_STATUS))
#define TUBA_API_IS_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_STATUS))
#define TUBA_API_STATUS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_STATUS, TubaAPIStatusClass))

typedef struct _TubaAPIStatus TubaAPIStatus;
typedef struct _TubaAPIStatusClass TubaAPIStatusClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define TUBA_API_TYPE_CONVERSATION (tuba_api_conversation_get_type ())
#define TUBA_API_CONVERSATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_CONVERSATION, TubaAPIConversation))
#define TUBA_API_CONVERSATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_CONVERSATION, TubaAPIConversationClass))
#define TUBA_API_IS_CONVERSATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_CONVERSATION))
#define TUBA_API_IS_CONVERSATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_CONVERSATION))
#define TUBA_API_CONVERSATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_CONVERSATION, TubaAPIConversationClass))

typedef struct _TubaAPIConversation TubaAPIConversation;
typedef struct _TubaAPIConversationClass TubaAPIConversationClass;

#define TUBA_API_TYPE_ANNOUNCEMENT (tuba_api_announcement_get_type ())
#define TUBA_API_ANNOUNCEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_ANNOUNCEMENT, TubaAPIAnnouncement))
#define TUBA_API_ANNOUNCEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_ANNOUNCEMENT, TubaAPIAnnouncementClass))
#define TUBA_API_IS_ANNOUNCEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_ANNOUNCEMENT))
#define TUBA_API_IS_ANNOUNCEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_ANNOUNCEMENT))
#define TUBA_API_ANNOUNCEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_ANNOUNCEMENT, TubaAPIAnnouncementClass))

typedef struct _TubaAPIAnnouncement TubaAPIAnnouncement;
typedef struct _TubaAPIAnnouncementClass TubaAPIAnnouncementClass;

#define TUBA_API_TYPE_NOTIFICATION (tuba_api_notification_get_type ())
#define TUBA_API_NOTIFICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_NOTIFICATION, TubaAPINotification))
#define TUBA_API_NOTIFICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_NOTIFICATION, TubaAPINotificationClass))
#define TUBA_API_IS_NOTIFICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_NOTIFICATION))
#define TUBA_API_IS_NOTIFICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_NOTIFICATION))
#define TUBA_API_NOTIFICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_NOTIFICATION, TubaAPINotificationClass))

typedef struct _TubaAPINotification TubaAPINotification;
typedef struct _TubaAPINotificationClass TubaAPINotificationClass;

#define TUBA_API_GROUPED_NOTIFICATIONS_RESULTS_TYPE_NOTIFICATION_GROUP (tuba_api_grouped_notifications_results_notification_group_get_type ())
#define TUBA_API_GROUPED_NOTIFICATIONS_RESULTS_NOTIFICATION_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_GROUPED_NOTIFICATIONS_RESULTS_TYPE_NOTIFICATION_GROUP, TubaAPIGroupedNotificationsResultsNotificationGroup))
#define TUBA_API_GROUPED_NOTIFICATIONS_RESULTS_NOTIFICATION_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_GROUPED_NOTIFICATIONS_RESULTS_TYPE_NOTIFICATION_GROUP, TubaAPIGroupedNotificationsResultsNotificationGroupClass))
#define TUBA_API_GROUPED_NOTIFICATIONS_RESULTS_IS_NOTIFICATION_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_GROUPED_NOTIFICATIONS_RESULTS_TYPE_NOTIFICATION_GROUP))
#define TUBA_API_GROUPED_NOTIFICATIONS_RESULTS_IS_NOTIFICATION_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_GROUPED_NOTIFICATIONS_RESULTS_TYPE_NOTIFICATION_GROUP))
#define TUBA_API_GROUPED_NOTIFICATIONS_RESULTS_NOTIFICATION_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_GROUPED_NOTIFICATIONS_RESULTS_TYPE_NOTIFICATION_GROUP, TubaAPIGroupedNotificationsResultsNotificationGroupClass))

typedef struct _TubaAPIGroupedNotificationsResultsNotificationGroup TubaAPIGroupedNotificationsResultsNotificationGroup;
typedef struct _TubaAPIGroupedNotificationsResultsNotificationGroupClass TubaAPIGroupedNotificationsResultsNotificationGroupClass;

#define TUBA_TYPE_APPLICATION (tuba_application_get_type ())
#define TUBA_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_APPLICATION, TubaApplication))
#define TUBA_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_APPLICATION, TubaApplicationClass))
#define TUBA_IS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_APPLICATION))
#define TUBA_IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_APPLICATION))
#define TUBA_APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_APPLICATION, TubaApplicationClass))

typedef struct _TubaApplication TubaApplication;
typedef struct _TubaApplicationClass TubaApplicationClass;

#define TUBA_WIDGETS_TYPE_STATUS (tuba_widgets_status_get_type ())
#define TUBA_WIDGETS_STATUS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_STATUS, TubaWidgetsStatus))
#define TUBA_WIDGETS_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_STATUS, TubaWidgetsStatusClass))
#define TUBA_WIDGETS_IS_STATUS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_STATUS))
#define TUBA_WIDGETS_IS_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_STATUS))
#define TUBA_WIDGETS_STATUS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_STATUS, TubaWidgetsStatusClass))

typedef struct _TubaWidgetsStatus TubaWidgetsStatus;
typedef struct _TubaWidgetsStatusClass TubaWidgetsStatusClass;
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (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;
typedef enum  {
	TUBA_REQUEST_V2_METHOD_GET,
	TUBA_REQUEST_V2_METHOD_POST,
	TUBA_REQUEST_V2_METHOD_PUT,
	TUBA_REQUEST_V2_METHOD_DELETE,
	TUBA_REQUEST_V2_METHOD_PATCH
} TubaRequestV2Method;

#define TUBA_REQUEST_V2_TYPE_METHOD (tuba_request_v2_method_get_type ())
typedef struct _Block83Data Block83Data;

#define TUBA_TYPE_OOPSIE (tuba_oopsie_get_type ())
#define _soup_message_headers_unref0(var) ((var == NULL) ? NULL : (var = (soup_message_headers_unref (var), NULL)))
typedef void (*TubaNetworkNodeCallback) (JsonNode* node, gpointer user_data, GError** error);
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _TubaViewsTimelineRequestData TubaViewsTimelineRequestData;

#define TUBA_VIEWS_BASE_TYPE_STATUS_MESSAGE (tuba_views_base_status_message_get_type ())
#define TUBA_VIEWS_BASE_STATUS_MESSAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_BASE_TYPE_STATUS_MESSAGE, TubaViewsBaseStatusMessage))
#define TUBA_VIEWS_BASE_STATUS_MESSAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_BASE_TYPE_STATUS_MESSAGE, TubaViewsBaseStatusMessageClass))
#define TUBA_VIEWS_BASE_IS_STATUS_MESSAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_BASE_TYPE_STATUS_MESSAGE))
#define TUBA_VIEWS_BASE_IS_STATUS_MESSAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_BASE_TYPE_STATUS_MESSAGE))
#define TUBA_VIEWS_BASE_STATUS_MESSAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_BASE_TYPE_STATUS_MESSAGE, TubaViewsBaseStatusMessageClass))

typedef struct _TubaViewsBaseStatusMessage TubaViewsBaseStatusMessage;
typedef struct _TubaViewsBaseStatusMessageClass TubaViewsBaseStatusMessageClass;
typedef struct _TubaViewsBaseStatusMessagePrivate TubaViewsBaseStatusMessagePrivate;
#define __vala_JsonNode_free0(var) ((var == NULL) ? NULL : (var = (_vala_JsonNode_free (var), NULL)))

#define TUBA_DIALOGS_TYPE_MAIN_WINDOW (tuba_dialogs_main_window_get_type ())
#define TUBA_DIALOGS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_TYPE_MAIN_WINDOW, TubaDialogsMainWindow))
#define TUBA_DIALOGS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_TYPE_MAIN_WINDOW, TubaDialogsMainWindowClass))
#define TUBA_DIALOGS_IS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_TYPE_MAIN_WINDOW))
#define TUBA_DIALOGS_IS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_TYPE_MAIN_WINDOW))
#define TUBA_DIALOGS_MAIN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_TYPE_MAIN_WINDOW, TubaDialogsMainWindowClass))

typedef struct _TubaDialogsMainWindow TubaDialogsMainWindow;
typedef struct _TubaDialogsMainWindowClass TubaDialogsMainWindowClass;

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);
	void (*attempt_focus_grab) (TubaViewsContentBase* self);
	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);
	void (*append_params_v2) (TubaViewsTimeline* self, TubaRequestV2* req);
	void (*on_request_finish) (TubaViewsTimeline* self);
	void (*request) (TubaViewsTimeline* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*request_finish) (TubaViewsTimeline* self, GAsyncResult* _res_);
	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 _TubaViewsTimelinePrivate {
	gchar* _url;
	gboolean _is_public;
	GType _accepts;
	gboolean _use_queue;
	gint _batch_size_min;
	TubaInstanceAccount* _account;
	gboolean _force_at_least_min;
	gboolean _is_last_page;
	gchar* _page_next;
	gchar* _page_prev;
	TubaEntity** entity_queue;
	gint entity_queue_length1;
	gint _entity_queue_size_;
	gint _entity_queue_size;
	AdwSpinner* pull_to_refresh_spinner;
	gboolean _is_pulling;
	gboolean _has_finished_request;
	GCancellable* _request_cancellable;
	gchar* _t_connection_url;
	gboolean _subscribed;
};

struct _Block83Data {
	int _ref_count_;
	TubaViewsTimeline* self;
	GObject** to_add;
	gint to_add_length1;
	gint _to_add_size_;
};

typedef enum  {
	TUBA_OOPSIE_USER,
	TUBA_OOPSIE_PARSING,
	TUBA_OOPSIE_INSTANCE,
	TUBA_OOPSIE_INTERNAL,
	TUBA_OOPSIE_HTTP_401 = 401,
	TUBA_OOPSIE_HTTP_403 = 403,
	TUBA_OOPSIE_HTTP_404 = 404,
	TUBA_OOPSIE_HTTP_410 = 410,
	TUBA_OOPSIE_HTTP_422 = 422,
	TUBA_OOPSIE_HTTP_429 = 429,
	TUBA_OOPSIE_HTTP_500 = 500,
	TUBA_OOPSIE_HTTP_503 = 503
} TubaOopsie;
#define TUBA_OOPSIE tuba_oopsie_quark ()

struct _TubaViewsTimelineRequestData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaViewsTimeline* self;
	GCancellable* _tmp0_;
	GCancellable* _tmp1_;
	TubaRequestV2* req;
	gchar* _tmp2_;
	gchar* _tmp3_;
	TubaInstanceAccount* _tmp4_;
	TubaInstanceAccount* _tmp5_;
	TubaInstanceAccount* _tmp6_;
	TubaRequestV2* _tmp7_;
	TubaRequestV2* _tmp8_;
	TubaRequestV2* _tmp9_;
	GCancellable* _tmp10_;
	GCancellable* _tmp11_;
	TubaRequestV2* _tmp12_;
	GInputStream* in_stream;
	SoupMessageHeaders* response_headers;
	Block83Data* _data83_;
	GInputStream* _tmp13_;
	TubaRequestV2* _tmp14_;
	SoupMessageHeaders* _tmp15_;
	GInputStream* _tmp16_;
	GInputStream* _tmp17_;
	JsonParser* parser;
	GInputStream* _tmp18_;
	JsonParser* _tmp19_;
	GCancellable* _tmp20_;
	GObject** _tmp21_;
	JsonParser* _tmp22_;
	GListStore* _tmp23_;
	GListStore* _tmp24_;
	GObject** _tmp25_;
	gint _tmp25__length1;
	SoupMessageHeaders* _tmp26_;
	SoupMessageHeaders* _tmp27_;
	const gchar* _tmp28_;
	GObject** _tmp29_;
	gint _tmp29__length1;
	gboolean _tmp30_;
	gboolean _tmp31_;
	gboolean _tmp32_;
	GListStore* _tmp33_;
	gint _tmp34_;
	gint _tmp35_;
	GObject** _tmp36_;
	gint _tmp36__length1;
	GError* e;
	GError* _tmp37_;
	GError* _tmp38_;
	const gchar* _tmp39_;
	GError* _inner_error0_;
};

struct _TubaViewsBaseStatusMessage {
	GObject parent_instance;
	TubaViewsBaseStatusMessagePrivate * priv;
	gchar* title;
	gchar* message;
	gboolean loading;
};

struct _TubaViewsBaseStatusMessageClass {
	GObjectClass parent_class;
};

static gint TubaViewsTimeline_private_offset;
static gpointer tuba_views_timeline_parent_class = NULL;
static GType* tuba_views_timeline_acceptable_time_types;
static gint tuba_views_timeline_acceptable_time_types_length1;
static GType* tuba_views_timeline_acceptable_time_types = NULL;
static gint tuba_views_timeline_acceptable_time_types_length1 = 0;
static gint _tuba_views_timeline_acceptable_time_types_size_ = 0;
VALA_EXTERN TubaApplication* tuba_app;
VALA_EXTERN TubaSettings* tuba_settings;
static TubaAccountHolderIface * tuba_views_timeline_tuba_account_holder_parent_iface = NULL;
static TubaStreamableIface * tuba_views_timeline_tuba_streamable_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_v2_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaRequestV2, 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 void tuba_views_base_unbind_listboxes (TubaViewsBase* self);
VALA_EXTERN void tuba_views_base_clear (TubaViewsBase* self);
VALA_EXTERN void tuba_views_content_base_clear_all_but_first (TubaViewsContentBase* self,
                                                  gint i);
VALA_EXTERN gchar* tuba_views_timeline_get_req_url (TubaViewsTimeline* self);
VALA_EXTERN void tuba_views_timeline_append_params_v2 (TubaViewsTimeline* self,
                                           TubaRequestV2* req);
VALA_EXTERN void tuba_views_timeline_on_request_finish (TubaViewsTimeline* self);
VALA_EXTERN void tuba_views_timeline_request (TubaViewsTimeline* self,
                                  GAsyncReadyCallback _callback_,
                                  gpointer _user_data_);
VALA_EXTERN void tuba_views_timeline_request_finish (TubaViewsTimeline* self,
                                         GAsyncResult* _res_);
VALA_EXTERN void tuba_views_base_on_error (TubaViewsBase* self,
                               gint32 code,
                               const gchar* reason);
VALA_EXTERN void tuba_views_timeline_on_refresh (TubaViewsTimeline* self);
VALA_EXTERN void tuba_views_timeline_on_manual_refresh (TubaViewsTimeline* self);
VALA_EXTERN void tuba_views_timeline_on_account_changed (TubaViewsTimeline* self,
                                             TubaInstanceAccount* acc);
VALA_EXTERN void tuba_views_content_base_on_bottom_reached (TubaViewsContentBase* self);
VALA_EXTERN gchar* tuba_views_timeline_get_stream_url (TubaViewsTimeline* self);
VALA_EXTERN gboolean tuba_views_timeline_should_hide (TubaViewsTimeline* self,
                                          TubaEntity* entity);
VALA_EXTERN void tuba_views_timeline_on_new_post (TubaViewsTimeline* self,
                                      TubaStreamableEvent* ev);
VALA_EXTERN void tuba_views_timeline_on_edit_post (TubaViewsTimeline* self,
                                       TubaStreamableEvent* ev);
VALA_EXTERN void tuba_views_timeline_on_delete_post (TubaViewsTimeline* self,
                                         TubaStreamableEvent* ev);
VALA_EXTERN void tuba_views_timeline_on_remove_user (TubaViewsTimeline* self,
                                         const gchar* user_id);
VALA_EXTERN const gchar* tuba_views_base_get_label (TubaViewsBase* self);
VALA_EXTERN void tuba_account_holder_destruct_account_holder (TubaAccountHolder* self);
VALA_EXTERN void tuba_streamable_destruct_streamable (TubaStreamable* self);
VALA_EXTERN void tuba_views_timeline_set_entity_queue_size (TubaViewsTimeline* self,
                                                gint value);
VALA_EXTERN GType tuba_api_status_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIStatus, g_object_unref)
VALA_EXTERN GType tuba_api_conversation_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIConversation, g_object_unref)
VALA_EXTERN GType tuba_api_announcement_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIAnnouncement, g_object_unref)
VALA_EXTERN GType tuba_api_notification_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPINotification, g_object_unref)
VALA_EXTERN GType tuba_api_grouped_notifications_results_notification_group_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIGroupedNotificationsResultsNotificationGroup, g_object_unref)
static void tuba_views_timeline_on_drag_update (TubaViewsTimeline* self,
                                         gdouble x,
                                         gdouble y);
static gboolean tuba_views_timeline_get_is_pulling (TubaViewsTimeline* self);
static void tuba_views_timeline_set_is_pulling (TubaViewsTimeline* self,
                                         gboolean value);
static void tuba_views_timeline_on_drag_end (TubaViewsTimeline* self,
                                      gdouble x,
                                      gdouble y);
VALA_EXTERN void tuba_views_timeline_refresh_if_mapped (TubaViewsTimeline* self);
static void tuba_views_timeline_update_time_signal (TubaViewsTimeline* self);
VALA_EXTERN GType tuba_views_timeline_get_accepts (TubaViewsTimeline* self);
static gboolean _vala_g_type_array_contains (GType * stack,
                                      gssize stack_length,
                                      const GType needle);
VALA_EXTERN gboolean tuba_views_timeline_get_is_public (TubaViewsTimeline* self);
VALA_EXTERN GType tuba_application_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaApplication, g_object_unref)
static void tuba_views_timeline_on_time_update (TubaViewsTimeline* self);
static void _tuba_views_timeline_on_time_update_tuba_application_time_update (TubaApplication* _sender,
                                                                       gpointer self);
VALA_EXTERN GType tuba_widgets_status_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsStatus, g_object_unref)
VALA_EXTERN void tuba_widgets_status_update_time (TubaWidgetsStatus* self);
static void tuba_views_timeline_real_unbind_listboxes (TubaViewsBase* base);
static void tuba_views_timeline_real_dispose (GObject* base);
static void tuba_views_timeline_cleanup_timeline_api (TubaViewsTimeline* self);
VALA_EXTERN void tuba_views_timeline_set_page_prev (TubaViewsTimeline* self,
                                        const gchar* value);
VALA_EXTERN void tuba_views_timeline_set_page_next (TubaViewsTimeline* self,
                                        const gchar* value);
VALA_EXTERN void tuba_views_timeline_set_is_last_page (TubaViewsTimeline* self,
                                           gboolean value);
VALA_EXTERN void tuba_views_base_set_needs_attention (TubaViewsBase* self,
                                          gboolean value);
VALA_EXTERN void tuba_views_base_set_badge_number (TubaViewsBase* self,
                                       gint value);
static void tuba_views_timeline_real_clear (TubaViewsBase* base);
VALA_EXTERN GCancellable* tuba_views_timeline_get_request_cancellable (TubaViewsTimeline* self);
static void tuba_views_timeline_real_clear_all_but_first (TubaViewsContentBase* base,
                                                   gint i);
VALA_EXTERN void tuba_views_timeline_get_pages (TubaViewsTimeline* self,
                                    const gchar* header);
VALA_EXTERN const gchar* tuba_views_timeline_get_page_prev (TubaViewsTimeline* self);
VALA_EXTERN const gchar* tuba_views_timeline_get_page_next (TubaViewsTimeline* self);
static gchar* tuba_views_timeline_real_get_req_url (TubaViewsTimeline* self);
VALA_EXTERN const gchar* tuba_views_timeline_get_url (TubaViewsTimeline* self);
static void tuba_views_timeline_real_append_params_v2 (TubaViewsTimeline* self,
                                                TubaRequestV2* req);
VALA_EXTERN void tuba_request_v2_add_parameter (TubaRequestV2* self,
                                    const gchar* key,
                                    const gchar* value);
VALA_EXTERN GType tuba_settings_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaSettings, g_object_unref)
VALA_EXTERN gint tuba_settings_get_timeline_page_size (TubaSettings* self);
VALA_EXTERN gint tuba_views_timeline_get_batch_size_min (TubaViewsTimeline* self);
static void tuba_views_timeline_real_on_request_finish (TubaViewsTimeline* self);
static void tuba_views_timeline_set_has_finished_request (TubaViewsTimeline* self,
                                                   gboolean value);
static void tuba_views_timeline_real_request_data_free (gpointer _data);
static void tuba_views_timeline_real_request (TubaViewsTimeline* self,
                                       GAsyncReadyCallback _callback_,
                                       gpointer _user_data_);
static gboolean tuba_views_timeline_real_request_co (TubaViewsTimelineRequestData* _data_);
VALA_EXTERN GType tuba_request_v2_method_get_type (void) G_GNUC_CONST ;
VALA_EXTERN TubaInstanceAccount* tuba_account_holder_get_account (TubaAccountHolder* self);
VALA_EXTERN TubaRequestV2* tuba_request_v2_new (const gchar* url,
                                    TubaRequestV2Method method);
VALA_EXTERN TubaRequestV2* tuba_request_v2_construct (GType object_type,
                                          const gchar* url,
                                          TubaRequestV2Method method);
VALA_EXTERN void tuba_request_v2_set_account (TubaRequestV2* self,
                                  TubaInstanceAccount* value);
VALA_EXTERN void tuba_request_v2_set_ctx (TubaRequestV2* self,
                              GtkWidget* value);
VALA_EXTERN GCancellable* tuba_request_v2_get_cancellable (TubaRequestV2* self);
VALA_EXTERN void tuba_views_timeline_set_request_cancellable (TubaViewsTimeline* self,
                                                  GCancellable* value);
static Block83Data* block83_data_ref (Block83Data* _data83_);
static void block83_data_unref (void * _userdata_);
VALA_EXTERN void tuba_request_v2_exec (TubaRequestV2* self,
                           GAsyncReadyCallback _callback_,
                           gpointer _user_data_);
VALA_EXTERN GQuark tuba_oopsie_quark (void);
VALA_EXTERN GType tuba_oopsie_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GInputStream* tuba_request_v2_exec_finish (TubaRequestV2* self,
                                           GAsyncResult* _res_,
                                           SoupMessageHeaders** response_headers,
                                           GError** error);
static void tuba_views_timeline_request_ready (GObject* source_object,
                                        GAsyncResult* _res_,
                                        gpointer _user_data_);
VALA_EXTERN void tuba_network_get_parser_from_inputstream_async (GInputStream* in_stream,
                                                     GCancellable* cancellable,
                                                     GAsyncReadyCallback _callback_,
                                                     gpointer _user_data_);
VALA_EXTERN JsonParser* tuba_network_get_parser_from_inputstream_finish (GAsyncResult* _res_,
                                                             GError** error);
VALA_EXTERN void tuba_network_parse_array (JsonParser* parser,
                               TubaNetworkNodeCallback cb,
                               gpointer cb_target,
                               GDestroyNotify cb_target_destroy_notify,
                               GError** error);
static void ___lambda140_ (Block83Data* _data83_,
                    JsonNode* node,
                    GError** error);
VALA_EXTERN TubaEntity* tuba_helper_entity_from_json (JsonNode* node,
                                          GType type,
                                          gboolean force);
static JsonNode* _vala_JsonNode_copy (JsonNode* self);
static void _vala_array_add120 (GObject** * array,
                         gint* length,
                         gint* size,
                         GObject* value);
static void ____lambda140__tuba_network_node_callback (JsonNode* node,
                                                gpointer self,
                                                GError** error);
VALA_EXTERN void tuba_views_base_on_content_changed (TubaViewsBase* self);
VALA_EXTERN gboolean tuba_views_timeline_get_force_at_least_min (TubaViewsTimeline* self);
static void tuba_views_timeline_real_on_error (TubaViewsBase* base,
                                        gint32 code,
                                        const gchar* reason);
VALA_EXTERN GType tuba_views_base_status_message_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsBaseStatusMessage, g_object_unref)
VALA_EXTERN TubaViewsBaseStatusMessage* tuba_views_base_get_base_status (TubaViewsBase* self);
static void tuba_views_timeline_real_on_refresh (TubaViewsTimeline* self);
VALA_EXTERN TubaViewsBaseStatusMessage* tuba_views_base_status_message_new (void);
VALA_EXTERN TubaViewsBaseStatusMessage* tuba_views_base_status_message_construct (GType object_type);
VALA_EXTERN void tuba_views_base_set_base_status (TubaViewsBase* self,
                                      TubaViewsBaseStatusMessage* value);
static void tuba_views_timeline_real_on_manual_refresh (TubaViewsTimeline* self);
static void tuba_views_timeline_real_on_account_changed (TubaViewsTimeline* self,
                                                  TubaInstanceAccount* acc);
VALA_EXTERN void tuba_account_holder_set_account (TubaAccountHolder* self,
                                      TubaInstanceAccount* value);
VALA_EXTERN void tuba_streamable_update_stream (TubaStreamable* self);
static void tuba_views_timeline_real_on_bottom_reached (TubaViewsContentBase* base);
VALA_EXTERN gboolean tuba_views_timeline_get_is_last_page (TubaViewsTimeline* self);
static void tuba_views_timeline_real_on_streaming_policy_changed (TubaStreamable* base);
VALA_EXTERN gboolean tuba_settings_get_live_updates (TubaSettings* self);
VALA_EXTERN gboolean tuba_settings_get_public_live_updates (TubaSettings* self);
VALA_EXTERN void tuba_streamable_set_subscribed (TubaStreamable* self,
                                     gboolean value);
static gchar* tuba_views_timeline_real_get_stream_url (TubaViewsTimeline* self);
static gboolean tuba_views_timeline_real_should_hide (TubaViewsTimeline* self,
                                               TubaEntity* entity);
VALA_EXTERN TubaAPIStatus* tuba_api_status_get_formal (TubaAPIStatus* self);
VALA_EXTERN gboolean tuba_api_status_get_tuba_filter_hidden (TubaAPIStatus* self);
static void tuba_views_timeline_real_on_new_post (TubaViewsTimeline* self,
                                           TubaStreamableEvent* ev);
VALA_EXTERN gboolean tuba_views_timeline_get_has_finished_request (TubaViewsTimeline* self);
VALA_EXTERN JsonNode* tuba_streamable_event_get_node (TubaStreamableEvent *self,
                                          GError** error);
VALA_EXTERN TubaEntity* tuba_entity_from_json (GType type,
                                   JsonNode* node,
                                   GError** error);
static void _vala_JsonNode_free (JsonNode* self);
VALA_EXTERN void tuba_views_timeline_on_new_post_entity (TubaViewsTimeline* self,
                                             TubaEntity* entity);
VALA_EXTERN gboolean tuba_views_timeline_get_use_queue (TubaViewsTimeline* self);
static void _vala_array_add121 (TubaEntity** * array,
                         gint* length,
                         gint* size,
                         TubaEntity* value);
VALA_EXTERN gint tuba_views_timeline_get_entity_queue_size (TubaViewsTimeline* self);
VALA_EXTERN const gchar* tuba_api_status_get_id (TubaAPIStatus* self);
VALA_EXTERN void tuba_views_timeline_safely_remove (TubaViewsTimeline* self,
                                        gint i);
static void tuba_views_timeline_finish_queue (TubaViewsTimeline* self);
static void tuba_views_timeline_real_on_edit_post (TubaViewsTimeline* self,
                                            TubaStreamableEvent* ev);
VALA_EXTERN gboolean tuba_views_timeline_was_focused (TubaViewsTimeline* self,
                                          gint i);
VALA_EXTERN gboolean tuba_views_timeline_focus_recover_actual (TubaViewsTimeline* self,
                                                   gint i);
static void tuba_views_timeline_real_on_delete_post (TubaViewsTimeline* self,
                                              TubaStreamableEvent* ev);
VALA_EXTERN gchar* tuba_streamable_event_get_string (TubaStreamableEvent *self,
                                         GError** error);
static void tuba_views_timeline_real_on_remove_user (TubaViewsTimeline* self,
                                              const gchar* user_id);
VALA_EXTERN TubaAPIAccount* tuba_api_status_get_account (TubaAPIStatus* self);
VALA_EXTERN const gchar* tuba_api_account_get_id (TubaAPIAccount* self);
VALA_EXTERN void tuba_views_timeline_focus_recover (TubaViewsTimeline* self,
                                        gint i);
VALA_EXTERN GType tuba_dialogs_main_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsMainWindow, g_object_unref)
VALA_EXTERN TubaDialogsMainWindow* tuba_application_get_main_window (TubaApplication* self);
VALA_EXTERN TubaViewsTimeline* tuba_views_timeline_new (void);
VALA_EXTERN TubaViewsTimeline* tuba_views_timeline_construct (GType object_type);
VALA_EXTERN TubaViewsContentBase* tuba_views_content_base_new (void);
VALA_EXTERN TubaViewsContentBase* tuba_views_content_base_construct (GType object_type);
VALA_EXTERN void tuba_views_timeline_set_url (TubaViewsTimeline* self,
                                  const gchar* value);
VALA_EXTERN void tuba_views_timeline_set_is_public (TubaViewsTimeline* self,
                                        gboolean value);
VALA_EXTERN void tuba_views_timeline_set_accepts (TubaViewsTimeline* self,
                                      GType value);
VALA_EXTERN void tuba_views_timeline_set_use_queue (TubaViewsTimeline* self,
                                        gboolean value);
VALA_EXTERN void tuba_views_timeline_set_batch_size_min (TubaViewsTimeline* self,
                                             gint value);
VALA_EXTERN void tuba_views_timeline_set_force_at_least_min (TubaViewsTimeline* self,
                                                 gboolean value);
static GObject * tuba_views_timeline_constructor (GType type,
                                           guint n_construct_properties,
                                           GObjectConstructParam * construct_properties);
VALA_EXTERN void tuba_views_base_set_empty_state_title (TubaViewsBase* self,
                                            const gchar* value);
static void _tuba_views_timeline_finish_queue_tuba_views_content_base_reached_close_to_top (TubaViewsContentBase* _sender,
                                                                                     gpointer self);
static void _tuba_views_timeline_refresh_if_mapped_tuba_application_refresh (TubaApplication* _sender,
                                                                      gpointer self);
static void _tuba_views_timeline_on_manual_refresh_gtk_button_clicked (GtkButton* _sender,
                                                                gpointer self);
VALA_EXTERN void tuba_account_holder_construct_account_holder (TubaAccountHolder* self);
VALA_EXTERN void tuba_streamable_construct_streamable (TubaStreamable* self);
static void _tuba_views_timeline_on_new_post_tuba_streamable_stream_event (TubaStreamable* _sender,
                                                                    TubaStreamableEvent* ev,
                                                                    gpointer self);
static void _tuba_views_timeline_on_edit_post_tuba_streamable_stream_event (TubaStreamable* _sender,
                                                                     TubaStreamableEvent* ev,
                                                                     gpointer self);
static void _tuba_views_timeline_on_delete_post_tuba_streamable_stream_event (TubaStreamable* _sender,
                                                                       TubaStreamableEvent* ev,
                                                                       gpointer self);
static void _tuba_views_timeline_on_refresh_g_object_notify (GObject* _sender,
                                                      GParamSpec* pspec,
                                                      gpointer self);
VALA_EXTERN GtkWidget* tuba_views_content_base_on_create_model_widget (TubaViewsContentBase* self,
                                                           GObject* obj);
static GtkWidget* _tuba_views_content_base_on_create_model_widget_gtk_list_box_create_widget_func (GObject* item,
                                                                                            gpointer self);
static void _tuba_views_timeline_on_drag_update_gtk_gesture_drag_drag_update (GtkGestureDrag* _sender,
                                                                       gdouble offset_x,
                                                                       gdouble offset_y,
                                                                       gpointer self);
static void _tuba_views_timeline_on_drag_end_gtk_gesture_drag_drag_end (GtkGestureDrag* _sender,
                                                                 gdouble offset_x,
                                                                 gdouble offset_y,
                                                                 gpointer self);
VALA_EXTERN void tuba_account_holder_on_account_changed (TubaAccountHolder* self,
                                             TubaInstanceAccount* acc);
VALA_EXTERN void tuba_streamable_on_streaming_policy_changed (TubaStreamable* self);
VALA_EXTERN gchar* tuba_streamable_get_stream_url (TubaStreamable* self);
VALA_EXTERN const gchar* tuba_streamable_get_t_connection_url (TubaStreamable* self);
VALA_EXTERN void tuba_streamable_set_t_connection_url (TubaStreamable* self,
                                           const gchar* value);
VALA_EXTERN gboolean tuba_streamable_get_subscribed (TubaStreamable* self);
static void tuba_views_timeline_finalize (GObject * obj);
static GType tuba_views_timeline_get_type_once (void);
static void _vala_tuba_views_timeline_get_property (GObject * object,
                                             guint property_id,
                                             GValue * value,
                                             GParamSpec * pspec);
static void _vala_tuba_views_timeline_set_property (GObject * object,
                                             guint property_id,
                                             const GValue * value,
                                             GParamSpec * pspec);
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);
static gssize _vala_array_length (gpointer array);

static inline gpointer
tuba_views_timeline_get_instance_private (TubaViewsTimeline* self)
{
	return G_STRUCT_MEMBER_P (self, TubaViewsTimeline_private_offset);
}

static const gchar*
string_to_string (const gchar* self)
{
	const gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	result = self;
	return result;
}

static void
tuba_views_timeline_on_drag_update (TubaViewsTimeline* self,
                                    gdouble x,
                                    gdouble y)
{
	gboolean _tmp0_ = FALSE;
	GtkScrolledWindow* _tmp1_;
	GtkAdjustment* _tmp2_;
	GtkAdjustment* _tmp3_;
	gdouble _tmp4_;
	gdouble _tmp5_;
	gdouble clean_y = 0.0;
	g_return_if_fail (self != NULL);
	_tmp1_ = ((TubaViewsBase*) self)->scrolled;
	_tmp2_ = gtk_scrolled_window_get_vadjustment (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = gtk_adjustment_get_value (_tmp3_);
	_tmp5_ = _tmp4_;
	if (_tmp5_ != 0.0) {
		_tmp0_ = TRUE;
	} else {
		gboolean _tmp6_ = FALSE;
		if (y <= ((gdouble) 15)) {
			gboolean _tmp7_;
			gboolean _tmp8_;
			_tmp7_ = tuba_views_timeline_get_is_pulling (self);
			_tmp8_ = _tmp7_;
			_tmp6_ = !_tmp8_;
		} else {
			_tmp6_ = FALSE;
		}
		_tmp0_ = _tmp6_;
	}
	if (_tmp0_) {
		return;
	}
	tuba_views_timeline_set_is_pulling (self, TRUE);
	clean_y = y;
	if (y > ((gdouble) 150)) {
		clean_y = (gdouble) 150;
	} else {
		if (y < ((gdouble) -32)) {
			clean_y = (gdouble) -32;
		}
	}
	if (clean_y > ((gdouble) 32)) {
		AdwSpinner* _tmp9_;
		AdwSpinner* _tmp10_;
		AdwSpinner* _tmp11_;
		_tmp9_ = self->priv->pull_to_refresh_spinner;
		gtk_widget_set_margin_top ((GtkWidget*) _tmp9_, (gint) clean_y);
		_tmp10_ = self->priv->pull_to_refresh_spinner;
		_tmp11_ = self->priv->pull_to_refresh_spinner;
		g_object_set ((GtkWidget*) _tmp11_, "width-request", 32, NULL);
		g_object_set ((GtkWidget*) _tmp10_, "height-request", 32, NULL);
	} else {
		if (clean_y > ((gdouble) 0)) {
			AdwSpinner* _tmp12_;
			AdwSpinner* _tmp13_;
			_tmp12_ = self->priv->pull_to_refresh_spinner;
			_tmp13_ = self->priv->pull_to_refresh_spinner;
			g_object_set ((GtkWidget*) _tmp13_, "width-request", (gint) clean_y, NULL);
			g_object_set ((GtkWidget*) _tmp12_, "height-request", (gint) clean_y, NULL);
		} else {
			AdwSpinner* _tmp14_;
			AdwSpinner* _tmp15_;
			AdwSpinner* _tmp16_;
			_tmp14_ = self->priv->pull_to_refresh_spinner;
			gtk_widget_set_margin_top ((GtkWidget*) _tmp14_, 32);
			_tmp15_ = self->priv->pull_to_refresh_spinner;
			_tmp16_ = self->priv->pull_to_refresh_spinner;
			g_object_set ((GtkWidget*) _tmp16_, "width-request", 0, NULL);
			g_object_set ((GtkWidget*) _tmp15_, "height-request", 0, NULL);
		}
	}
}

static void
tuba_views_timeline_on_drag_end (TubaViewsTimeline* self,
                                 gdouble x,
                                 gdouble y)
{
	gboolean _tmp0_ = FALSE;
	GtkScrolledWindow* _tmp1_;
	GtkAdjustment* _tmp2_;
	GtkAdjustment* _tmp3_;
	gdouble _tmp4_;
	gdouble _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp1_ = ((TubaViewsBase*) self)->scrolled;
	_tmp2_ = gtk_scrolled_window_get_vadjustment (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = gtk_adjustment_get_value (_tmp3_);
	_tmp5_ = _tmp4_;
	if (_tmp5_ == 0.0) {
		AdwSpinner* _tmp6_;
		gint _tmp7_;
		gint _tmp8_;
		_tmp6_ = self->priv->pull_to_refresh_spinner;
		_tmp7_ = gtk_widget_get_margin_top ((GtkWidget*) _tmp6_);
		_tmp8_ = _tmp7_;
		_tmp0_ = _tmp8_ >= 125;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		tuba_views_timeline_on_manual_refresh (self);
	}
	tuba_views_timeline_set_is_pulling (self, FALSE);
}

void
tuba_views_timeline_refresh_if_mapped (TubaViewsTimeline* self)
{
	g_return_if_fail (self != NULL);
	if (!gtk_widget_get_mapped ((GtkWidget*) self)) {
		return;
	}
	tuba_views_timeline_on_manual_refresh (self);
}

static gboolean
_vala_g_type_array_contains (GType * stack,
                             gssize stack_length,
                             const GType needle)
{
	gssize i;
	for (i = 0; i < stack_length; i++) {
		if (needle == stack[i]) {
			return TRUE;
		}
	}
	return FALSE;
}

static void
_tuba_views_timeline_on_time_update_tuba_application_time_update (TubaApplication* _sender,
                                                                  gpointer self)
{
	tuba_views_timeline_on_time_update ((TubaViewsTimeline*) self);
}

static void
tuba_views_timeline_update_time_signal (TubaViewsTimeline* self)
{
	GType _tmp0_;
	GType _tmp1_;
	GType* _tmp2_;
	gint _tmp2__length1;
	g_return_if_fail (self != NULL);
	_tmp0_ = tuba_views_timeline_get_accepts (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = tuba_views_timeline_acceptable_time_types;
	_tmp2__length1 = tuba_views_timeline_acceptable_time_types_length1;
	if (_vala_g_type_array_contains (_tmp2_, _tmp2__length1, _tmp1_)) {
		gboolean _tmp3_;
		_tmp3_ = self->priv->_is_public;
		if (!_tmp3_) {
			TubaApplication* _tmp4_;
			_tmp4_ = tuba_app;
			g_signal_connect_object (_tmp4_, "time-update", (GCallback) _tuba_views_timeline_on_time_update_tuba_application_time_update, self, 0);
		}
	} else {
		TubaApplication* _tmp5_;
		guint _tmp6_;
		_tmp5_ = tuba_app;
		g_signal_parse_name ("time-update", TUBA_TYPE_APPLICATION, &_tmp6_, NULL, FALSE);
		g_signal_handlers_disconnect_matched (_tmp5_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp6_, 0, NULL, (GCallback) _tuba_views_timeline_on_time_update_tuba_application_time_update, self);
	}
}

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

static void
tuba_views_timeline_on_time_update (TubaViewsTimeline* self)
{
	gboolean _tmp0_ = FALSE;
	g_return_if_fail (self != NULL);
	if (!gtk_widget_get_mapped ((GtkWidget*) self)) {
		_tmp0_ = TRUE;
	} else {
		gboolean _tmp1_;
		_tmp1_ = self->priv->_is_public;
		_tmp0_ = _tmp1_;
	}
	if (_tmp0_) {
		return;
	}
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp2_ = FALSE;
			_tmp2_ = TRUE;
			while (TRUE) {
				GListStore* _tmp4_;
				guint _tmp5_;
				guint _tmp6_;
				TubaWidgetsStatus* status_widget = NULL;
				GtkListBox* _tmp7_;
				GtkListBoxRow* _tmp8_;
				TubaWidgetsStatus* _tmp9_;
				TubaWidgetsStatus* _tmp10_;
				if (!_tmp2_) {
					gint _tmp3_;
					_tmp3_ = i;
					i = _tmp3_ + 1;
				}
				_tmp2_ = FALSE;
				_tmp4_ = ((TubaViewsContentBase*) self)->model;
				g_object_get (_tmp4_, "n-items", &_tmp5_, NULL);
				_tmp6_ = _tmp5_;
				if (!(((guint) i) < MIN (_tmp6_, (guint) 250))) {
					break;
				}
				_tmp7_ = ((TubaViewsContentBase*) self)->content;
				_tmp8_ = gtk_list_box_get_row_at_index (_tmp7_, i);
				_tmp9_ = _g_object_ref0 (TUBA_WIDGETS_IS_STATUS (_tmp8_) ? ((TubaWidgetsStatus*) _tmp8_) : NULL);
				status_widget = _tmp9_;
				_tmp10_ = status_widget;
				if (_tmp10_ != NULL) {
					TubaWidgetsStatus* _tmp11_;
					_tmp11_ = status_widget;
					tuba_widgets_status_update_time (_tmp11_);
				}
				_g_object_unref0 (status_widget);
			}
		}
	}
}

static void
tuba_views_timeline_real_unbind_listboxes (TubaViewsBase* base)
{
	TubaViewsTimeline * self;
	self = (TubaViewsTimeline*) base;
	tuba_account_holder_destruct_account_holder ((TubaAccountHolder*) self);
	tuba_streamable_destruct_streamable ((TubaStreamable*) self);
	TUBA_VIEWS_BASE_CLASS (tuba_views_timeline_parent_class)->unbind_listboxes ((TubaViewsBase*) G_TYPE_CHECK_INSTANCE_CAST (self, TUBA_VIEWS_TYPE_CONTENT_BASE, TubaViewsContentBase));
}

static void
tuba_views_timeline_real_dispose (GObject* base)
{
	TubaViewsTimeline * self;
	self = (TubaViewsTimeline*) base;
	tuba_streamable_destruct_streamable ((TubaStreamable*) self);
	G_OBJECT_CLASS (tuba_views_timeline_parent_class)->dispose ((GObject*) G_TYPE_CHECK_INSTANCE_CAST (self, TUBA_VIEWS_TYPE_CONTENT_BASE, TubaViewsContentBase));
}

static void
tuba_views_timeline_cleanup_timeline_api (TubaViewsTimeline* self)
{
	g_return_if_fail (self != NULL);
	tuba_views_timeline_set_page_prev (self, NULL);
	tuba_views_timeline_set_page_next (self, NULL);
	tuba_views_timeline_set_is_last_page (self, FALSE);
	tuba_views_base_set_needs_attention ((TubaViewsBase*) self, FALSE);
	tuba_views_base_set_badge_number ((TubaViewsBase*) self, 0);
}

static void
tuba_views_timeline_real_clear (TubaViewsBase* base)
{
	TubaViewsTimeline * self;
	GCancellable* _tmp0_;
	self = (TubaViewsTimeline*) base;
	_tmp0_ = self->priv->_request_cancellable;
	if (_tmp0_ != NULL) {
		GCancellable* _tmp1_;
		_tmp1_ = self->priv->_request_cancellable;
		g_cancellable_cancel (_tmp1_);
	}
	tuba_views_timeline_cleanup_timeline_api (self);
	TUBA_VIEWS_BASE_CLASS (tuba_views_timeline_parent_class)->clear ((TubaViewsBase*) G_TYPE_CHECK_INSTANCE_CAST (self, TUBA_VIEWS_TYPE_CONTENT_BASE, TubaViewsContentBase));
}

static void
tuba_views_timeline_real_clear_all_but_first (TubaViewsContentBase* base,
                                              gint i)
{
	TubaViewsTimeline * self;
	self = (TubaViewsTimeline*) base;
	tuba_views_timeline_cleanup_timeline_api (self);
	TUBA_VIEWS_CONTENT_BASE_CLASS (tuba_views_timeline_parent_class)->clear_all_but_first (G_TYPE_CHECK_INSTANCE_CAST (self, TUBA_VIEWS_TYPE_CONTENT_BASE, TubaViewsContentBase), i);
}

static gchar*
string_replace (const gchar* self,
                const gchar* old,
                const gchar* replacement)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GError* _inner_error0_ = NULL;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (old != NULL, NULL);
	g_return_val_if_fail (replacement != NULL, NULL);
	if ((*((gchar*) self)) == '\0') {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = (*((gchar*) old)) == '\0';
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = g_strcmp0 (old, replacement) == 0;
	}
	if (_tmp0_) {
		gchar* _tmp2_;
		_tmp2_ = g_strdup (self);
		result = _tmp2_;
		return result;
	}
	{
		GRegex* regex = NULL;
		gchar* _tmp3_;
		gchar* _tmp4_;
		GRegex* _tmp5_;
		GRegex* _tmp6_;
		gchar* _tmp7_ = NULL;
		GRegex* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		_tmp3_ = g_regex_escape_string (old, -1);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_regex_new (_tmp4_, 0, 0, &_inner_error0_);
		_tmp6_ = _tmp5_;
		_g_free0 (_tmp4_);
		regex = _tmp6_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
		_tmp8_ = regex;
		_tmp9_ = g_regex_replace_literal (_tmp8_, self, (gssize) -1, 0, replacement, 0, &_inner_error0_);
		_tmp7_ = _tmp9_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_regex_unref0 (regex);
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
		_tmp10_ = _tmp7_;
		_tmp7_ = NULL;
		result = _tmp10_;
		_g_free0 (_tmp7_);
		_g_regex_unref0 (regex);
		return result;
	}
	goto __finally0;
	__catch0_g_regex_error:
	{
		g_clear_error (&_inner_error0_);
		g_assert_not_reached ();
	}
	__finally0:
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
	g_clear_error (&_inner_error0_);
	return NULL;
}

static gboolean
string_contains (const gchar* self,
                 const gchar* needle)
{
	gchar* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (needle != NULL, FALSE);
	_tmp0_ = strstr ((gchar*) self, (gchar*) needle);
	result = _tmp0_ != NULL;
	return result;
}

void
tuba_views_timeline_get_pages (TubaViewsTimeline* self,
                               const gchar* header)
{
	gchar** pages = NULL;
	gchar** _tmp0_;
	gchar** _tmp1_;
	gint pages_length1;
	gint _pages_size_;
	gchar** _tmp2_;
	gint _tmp2__length1;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	g_return_if_fail (self != NULL);
	tuba_views_timeline_set_page_prev (self, NULL);
	tuba_views_timeline_set_page_next (self, NULL);
	if (header == NULL) {
		tuba_views_timeline_set_is_last_page (self, TRUE);
		return;
	}
	_tmp1_ = _tmp0_ = g_strsplit (header, ",", 0);
	pages = _tmp1_;
	pages_length1 = _vala_array_length (_tmp0_);
	_pages_size_ = pages_length1;
	_tmp2_ = pages;
	_tmp2__length1 = pages_length1;
	{
		gchar** page_collection = NULL;
		gint page_collection_length1 = 0;
		gint _page_collection_size_ = 0;
		gint page_it = 0;
		page_collection = _tmp2_;
		page_collection_length1 = _tmp2__length1;
		for (page_it = 0; page_it < page_collection_length1; page_it = page_it + 1) {
			gchar* _tmp3_;
			gchar* page = NULL;
			_tmp3_ = g_strdup (page_collection[page_it]);
			page = _tmp3_;
			{
				gchar* sanitized = NULL;
				const gchar* _tmp4_;
				gchar* _tmp5_;
				gchar* _tmp6_;
				gchar* _tmp7_;
				gchar* _tmp8_;
				gchar** _tmp9_;
				gchar** _tmp10_;
				gchar** _tmp11_;
				gint _tmp11__length1;
				const gchar* _tmp12_;
				gchar* _tmp13_;
				gchar* _tmp14_;
				const gchar* _tmp15_;
				_tmp4_ = page;
				_tmp5_ = string_replace (_tmp4_, "<", "");
				_tmp6_ = _tmp5_;
				_tmp7_ = string_replace (_tmp6_, ">", "");
				_tmp8_ = _tmp7_;
				_tmp10_ = _tmp9_ = g_strsplit (_tmp8_, ";", 0);
				_tmp11_ = _tmp10_;
				_tmp11__length1 = _vala_array_length (_tmp9_);
				_tmp12_ = _tmp11_[0];
				_tmp13_ = g_strdup (_tmp12_);
				_tmp14_ = _tmp13_;
				_tmp11_ = (_vala_array_free (_tmp11_, _tmp11__length1, (GDestroyNotify) g_free), NULL);
				_g_free0 (_tmp8_);
				_g_free0 (_tmp6_);
				sanitized = _tmp14_;
				_tmp15_ = page;
				if (string_contains (_tmp15_, "rel=\"prev\"")) {
					const gchar* _tmp16_;
					_tmp16_ = sanitized;
					tuba_views_timeline_set_page_prev (self, _tmp16_);
				} else {
					const gchar* _tmp17_;
					_tmp17_ = sanitized;
					tuba_views_timeline_set_page_next (self, _tmp17_);
				}
				_g_free0 (sanitized);
				_g_free0 (page);
			}
		}
	}
	_tmp18_ = self->priv->_page_prev;
	_tmp19_ = self->priv->_page_next;
	tuba_views_timeline_set_is_last_page (self, (_tmp18_ != NULL) & (_tmp19_ == NULL));
	pages = (_vala_array_free (pages, pages_length1, (GDestroyNotify) g_free), NULL);
}

static gchar*
tuba_views_timeline_real_get_req_url (TubaViewsTimeline* self)
{
	const gchar* _tmp0_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* result;
	_tmp0_ = self->priv->_page_next;
	if (_tmp0_ != NULL) {
		const gchar* _tmp1_;
		gchar* _tmp2_;
		_tmp1_ = self->priv->_page_next;
		_tmp2_ = g_strdup (_tmp1_);
		result = _tmp2_;
		return result;
	}
	_tmp3_ = self->priv->_url;
	_tmp4_ = g_strdup (_tmp3_);
	result = _tmp4_;
	return result;
}

gchar*
tuba_views_timeline_get_req_url (TubaViewsTimeline* self)
{
	TubaViewsTimelineClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = TUBA_VIEWS_TIMELINE_GET_CLASS (self);
	if (_klass_->get_req_url) {
		return _klass_->get_req_url (self);
	}
	return NULL;
}

static void
tuba_views_timeline_real_append_params_v2 (TubaViewsTimeline* self,
                                           TubaRequestV2* req)
{
	const gchar* _tmp0_;
	g_return_if_fail (req != NULL);
	_tmp0_ = self->priv->_page_next;
	if (_tmp0_ == NULL) {
		TubaSettings* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp1_ = tuba_settings;
		_tmp2_ = tuba_settings_get_timeline_page_size (_tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = tuba_views_timeline_get_batch_size_min (self);
		_tmp5_ = _tmp4_;
		_tmp6_ = g_strdup_printf ("%i", CLAMP (_tmp3_, _tmp5_, 40));
		_tmp7_ = _tmp6_;
		tuba_request_v2_add_parameter (req, "limit", _tmp7_);
		_g_free0 (_tmp7_);
	}
}

void
tuba_views_timeline_append_params_v2 (TubaViewsTimeline* self,
                                      TubaRequestV2* req)
{
	TubaViewsTimelineClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = TUBA_VIEWS_TIMELINE_GET_CLASS (self);
	if (_klass_->append_params_v2) {
		_klass_->append_params_v2 (self, req);
	}
}

static void
tuba_views_timeline_real_on_request_finish (TubaViewsTimeline* self)
{
	tuba_views_timeline_set_has_finished_request (self, TRUE);
	TUBA_VIEWS_CONTENT_BASE_CLASS (tuba_views_timeline_parent_class)->on_bottom_reached (G_TYPE_CHECK_INSTANCE_CAST (self, TUBA_VIEWS_TYPE_CONTENT_BASE, TubaViewsContentBase));
}

void
tuba_views_timeline_on_request_finish (TubaViewsTimeline* self)
{
	TubaViewsTimelineClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = TUBA_VIEWS_TIMELINE_GET_CLASS (self);
	if (_klass_->on_request_finish) {
		_klass_->on_request_finish (self);
	}
}

static void
tuba_views_timeline_real_request_data_free (gpointer _data)
{
	TubaViewsTimelineRequestData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (TubaViewsTimelineRequestData, _data_);
}

static void
tuba_views_timeline_real_request (TubaViewsTimeline* self,
                                  GAsyncReadyCallback _callback_,
                                  gpointer _user_data_)
{
	TubaViewsTimelineRequestData* _data_;
	TubaViewsTimeline* _tmp0_;
	_data_ = g_slice_new0 (TubaViewsTimelineRequestData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_views_timeline_real_request_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	tuba_views_timeline_real_request_co (_data_);
}

static void
tuba_views_timeline_real_request_finish (TubaViewsTimeline* self,
                                         GAsyncResult* _res_)
{
	TubaViewsTimelineRequestData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static Block83Data*
block83_data_ref (Block83Data* _data83_)
{
	g_atomic_int_inc (&_data83_->_ref_count_);
	return _data83_;
}

static void
block83_data_unref (void * _userdata_)
{
	Block83Data* _data83_;
	_data83_ = (Block83Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data83_->_ref_count_)) {
		TubaViewsTimeline* self;
		self = _data83_->self;
		_data83_->to_add = (_vala_array_free (_data83_->to_add, _data83_->to_add_length1, (GDestroyNotify) g_object_unref), NULL);
		_g_object_unref0 (self);
		g_slice_free (Block83Data, _data83_);
	}
}

static void
tuba_views_timeline_request_ready (GObject* source_object,
                                   GAsyncResult* _res_,
                                   gpointer _user_data_)
{
	TubaViewsTimelineRequestData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_views_timeline_real_request_co (_data_);
}

static JsonNode*
_vala_JsonNode_copy (JsonNode* self)
{
	return g_boxed_copy (json_node_get_type (), self);
}

static gpointer
__vala_JsonNode_copy0 (gpointer self)
{
	return self ? _vala_JsonNode_copy (self) : NULL;
}

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

static void
___lambda140_ (Block83Data* _data83_,
               JsonNode* node,
               GError** error)
{
	TubaViewsTimeline* self;
	TubaEntity* e = NULL;
	JsonNode* _tmp0_;
	GType _tmp1_;
	GType _tmp2_;
	TubaEntity* _tmp3_;
	TubaEntity* _tmp4_;
	self = _data83_->self;
	g_return_if_fail (node != NULL);
	_tmp0_ = __vala_JsonNode_copy0 (node);
	_tmp1_ = tuba_views_timeline_get_accepts (self);
	_tmp2_ = _tmp1_;
	_tmp3_ = tuba_helper_entity_from_json (_tmp0_, _tmp2_, FALSE);
	e = _tmp3_;
	_tmp4_ = e;
	if (!tuba_views_timeline_should_hide (self, _tmp4_)) {
		TubaEntity* _tmp5_;
		GObject* _tmp6_;
		_tmp5_ = e;
		_tmp6_ = _g_object_ref0 ((GObject*) _tmp5_);
		_vala_array_add120 (&_data83_->to_add, &_data83_->to_add_length1, &_data83_->_to_add_size_, _tmp6_);
	}
	_g_object_unref0 (e);
}

static void
____lambda140__tuba_network_node_callback (JsonNode* node,
                                           gpointer self,
                                           GError** error)
{
	___lambda140_ (self, node, error);
}

static gboolean
tuba_views_timeline_real_request_co (TubaViewsTimelineRequestData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->_request_cancellable;
	if (_data_->_tmp0_ != NULL) {
		_data_->_tmp1_ = _data_->self->priv->_request_cancellable;
		g_cancellable_cancel (_data_->_tmp1_);
	}
	_data_->_tmp2_ = tuba_views_timeline_get_req_url (_data_->self);
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->_tmp4_ = tuba_account_holder_get_account ((TubaAccountHolder*) _data_->self);
	_data_->_tmp5_ = _data_->_tmp4_;
	_data_->_tmp6_ = _g_object_ref0 (_data_->_tmp5_);
	_data_->_tmp7_ = NULL;
	_data_->_tmp7_ = tuba_request_v2_new (_data_->_tmp3_, TUBA_REQUEST_V2_METHOD_GET);
	tuba_request_v2_set_account (_data_->_tmp7_, _data_->_tmp6_);
	_g_object_unref0 (_data_->_tmp6_);
	tuba_request_v2_set_ctx (_data_->_tmp7_, (GtkWidget*) _data_->self);
	_data_->_tmp8_ = _data_->_tmp7_;
	_g_free0 (_data_->_tmp3_);
	_data_->req = _data_->_tmp8_;
	_data_->_tmp9_ = _data_->req;
	_data_->_tmp10_ = tuba_request_v2_get_cancellable (_data_->_tmp9_);
	_data_->_tmp11_ = _data_->_tmp10_;
	tuba_views_timeline_set_request_cancellable (_data_->self, _data_->_tmp11_);
	_data_->_tmp12_ = _data_->req;
	tuba_views_timeline_append_params_v2 (_data_->self, _data_->_tmp12_);
	{
		_data_->_data83_ = g_slice_new0 (Block83Data);
		_data_->_data83_->_ref_count_ = 1;
		_data_->_data83_->self = g_object_ref (_data_->self);
		_data_->_tmp14_ = _data_->req;
		_data_->_tmp15_ = NULL;
		_data_->_state_ = 1;
		tuba_request_v2_exec (_data_->_tmp14_, tuba_views_timeline_request_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp16_ = tuba_request_v2_exec_finish (_data_->_tmp14_, _data_->_res_, &_data_->_tmp15_, &_data_->_inner_error0_);
		_soup_message_headers_unref0 (_data_->response_headers);
		_data_->response_headers = _data_->_tmp15_;
		_data_->_tmp13_ = _data_->_tmp16_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			block83_data_unref (_data_->_data83_);
			_data_->_data83_ = NULL;
			if (g_error_matches (_data_->_inner_error0_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
				goto __catch0_g_io_error_cancelled;
			}
			goto __catch0_g_error;
		}
		_data_->_tmp17_ = _data_->_tmp13_;
		_data_->_tmp13_ = NULL;
		_g_object_unref0 (_data_->in_stream);
		_data_->in_stream = _data_->_tmp17_;
		_data_->_tmp18_ = _data_->in_stream;
		_data_->_state_ = 2;
		tuba_network_get_parser_from_inputstream_async (_data_->_tmp18_, NULL, tuba_views_timeline_request_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp19_ = tuba_network_get_parser_from_inputstream_finish (_data_->_res_, &_data_->_inner_error0_);
		_data_->parser = _data_->_tmp19_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->_tmp13_);
			block83_data_unref (_data_->_data83_);
			_data_->_data83_ = NULL;
			if (g_error_matches (_data_->_inner_error0_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
				goto __catch0_g_io_error_cancelled;
			}
			goto __catch0_g_error;
		}
		_data_->_tmp20_ = _data_->self->priv->_request_cancellable;
		if (g_cancellable_is_cancelled (_data_->_tmp20_)) {
			_g_object_unref0 (_data_->parser);
			_g_object_unref0 (_data_->_tmp13_);
			block83_data_unref (_data_->_data83_);
			_data_->_data83_ = NULL;
			_soup_message_headers_unref0 (_data_->response_headers);
			_g_object_unref0 (_data_->in_stream);
			_g_object_unref0 (_data_->req);
			g_task_return_pointer (_data_->_async_result, _data_, NULL);
			if (_data_->_state_ != 0) {
				while (!g_task_get_completed (_data_->_async_result)) {
					g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
				}
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp21_ = g_new0 (GObject*, 0 + 1);
		_data_->_data83_->to_add = _data_->_tmp21_;
		_data_->_data83_->to_add_length1 = 0;
		_data_->_data83_->_to_add_size_ = _data_->_data83_->to_add_length1;
		_data_->_tmp22_ = _data_->parser;
		tuba_network_parse_array (_data_->_tmp22_, ____lambda140__tuba_network_node_callback, block83_data_ref (_data_->_data83_), block83_data_unref, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->parser);
			_g_object_unref0 (_data_->_tmp13_);
			block83_data_unref (_data_->_data83_);
			_data_->_data83_ = NULL;
			if (g_error_matches (_data_->_inner_error0_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
				goto __catch0_g_io_error_cancelled;
			}
			goto __catch0_g_error;
		}
		_data_->_tmp23_ = ((TubaViewsContentBase*) _data_->self)->model;
		_data_->_tmp24_ = ((TubaViewsContentBase*) _data_->self)->model;
		_data_->_tmp25_ = _data_->_data83_->to_add;
		_data_->_tmp25__length1 = _data_->_data83_->to_add_length1;
		g_list_store_splice (_data_->_tmp23_, g_list_model_get_n_items ((GListModel*) _data_->_tmp24_), (guint) 0, _data_->_tmp25_, (guint) _data_->_tmp25__length1);
		_data_->_tmp26_ = _data_->response_headers;
		if (_data_->_tmp26_ != NULL) {
			_data_->_tmp27_ = _data_->response_headers;
			_data_->_tmp28_ = soup_message_headers_get_one (_data_->_tmp27_, "Link");
			tuba_views_timeline_get_pages (_data_->self, _data_->_tmp28_);
		}
		_data_->_tmp29_ = _data_->_data83_->to_add;
		_data_->_tmp29__length1 = _data_->_data83_->to_add_length1;
		if (_data_->_tmp29__length1 == 0) {
			tuba_views_base_on_content_changed ((TubaViewsBase*) _data_->self);
		}
		tuba_views_timeline_on_request_finish (_data_->self);
		_data_->_tmp31_ = _data_->self->priv->_force_at_least_min;
		if (_data_->_tmp31_) {
			_data_->_tmp33_ = ((TubaViewsContentBase*) _data_->self)->model;
			_data_->_tmp34_ = tuba_views_timeline_get_batch_size_min (_data_->self);
			_data_->_tmp35_ = _data_->_tmp34_;
			if (g_list_model_get_n_items ((GListModel*) _data_->_tmp33_) < ((guint) _data_->_tmp35_)) {
				_data_->_tmp32_ = TRUE;
			} else {
				_data_->_tmp36_ = _data_->_data83_->to_add;
				_data_->_tmp36__length1 = _data_->_data83_->to_add_length1;
				_data_->_tmp32_ = _data_->_tmp36__length1 == 0;
			}
			_data_->_tmp30_ = _data_->_tmp32_;
		} else {
			_data_->_tmp30_ = FALSE;
		}
		if (_data_->_tmp30_) {
			tuba_views_content_base_on_bottom_reached ((TubaViewsContentBase*) _data_->self);
		}
		_g_object_unref0 (_data_->parser);
		_g_object_unref0 (_data_->_tmp13_);
		block83_data_unref (_data_->_data83_);
		_data_->_data83_ = NULL;
	}
	goto __finally0;
	__catch0_g_io_error_cancelled:
	{
		g_clear_error (&_data_->_inner_error0_);
		g_debug ("Timeline.vala:359: Message is cancelled.");
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp37_ = _data_->e;
		_data_->_tmp38_ = _data_->e;
		_data_->_tmp39_ = _data_->_tmp38_->message;
		tuba_views_base_on_error ((TubaViewsBase*) _data_->self, (gint32) _data_->_tmp37_->code, _data_->_tmp39_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_soup_message_headers_unref0 (_data_->response_headers);
		_g_object_unref0 (_data_->in_stream);
		_g_object_unref0 (_data_->req);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_soup_message_headers_unref0 (_data_->response_headers);
	_g_object_unref0 (_data_->in_stream);
	_g_object_unref0 (_data_->req);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

void
tuba_views_timeline_request (TubaViewsTimeline* self,
                             GAsyncReadyCallback _callback_,
                             gpointer _user_data_)
{
	TubaViewsTimelineClass* _klass_;
	_klass_ = TUBA_VIEWS_TIMELINE_GET_CLASS (self);
	if (_klass_->request) {
		_klass_->request (self, _callback_, _user_data_);
	}
}

void
tuba_views_timeline_request_finish (TubaViewsTimeline* self,
                                    GAsyncResult* _res_)
{
	TubaViewsTimelineClass* _klass_;
	_klass_ = TUBA_VIEWS_TIMELINE_GET_CLASS (self);
	if (_klass_->request_finish) {
		_klass_->request_finish (self, _res_);
	}
}

static void
tuba_views_timeline_real_on_error (TubaViewsBase* base,
                                   gint32 code,
                                   const gchar* reason)
{
	TubaViewsTimeline * self;
	TubaViewsBaseStatusMessage* _tmp0_;
	TubaViewsBaseStatusMessage* _tmp1_;
	self = (TubaViewsTimeline*) base;
	g_return_if_fail (reason != NULL);
	_tmp0_ = tuba_views_base_get_base_status ((TubaViewsBase*) self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ == NULL) {
		const gchar* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		gchar* _tmp5_;
		gchar* _tmp6_;
		const gchar* _tmp7_;
		gchar* _tmp8_;
		gchar* _tmp9_;
		TubaApplication* _tmp10_;
		gchar* _tmp11_;
		gchar* _tmp12_;
		_tmp2_ = tuba_views_base_get_label ((TubaViewsBase*) self);
		_tmp3_ = _tmp2_;
		_tmp4_ = string_to_string (_tmp3_);
		_tmp5_ = g_strdup_printf ("%i", code);
		_tmp6_ = _tmp5_;
		_tmp7_ = string_to_string (reason);
		_tmp8_ = g_strconcat ("Error while refreshing ", _tmp4_, ": ", _tmp6_, " ", _tmp7_, NULL);
		_tmp9_ = _tmp8_;
		g_warning ("Timeline.vala:367: %s", _tmp9_);
		_g_free0 (_tmp9_);
		_g_free0 (_tmp6_);
		_tmp10_ = tuba_app;
		_tmp11_ = g_strdup_printf ("%s: %s", _ ("Network Error"), reason);
		_tmp12_ = _tmp11_;
		g_signal_emit_by_name (_tmp10_, "toast", _tmp12_, (guint) 5, NULL, NULL, NULL);
		_g_free0 (_tmp12_);
	} else {
		TUBA_VIEWS_BASE_CLASS (tuba_views_timeline_parent_class)->on_error ((TubaViewsBase*) G_TYPE_CHECK_INSTANCE_CAST (self, TUBA_VIEWS_TYPE_CONTENT_BASE, TubaViewsContentBase), code, reason);
	}
}

static void
tuba_views_timeline_real_on_refresh (TubaViewsTimeline* self)
{
	TubaEntity** _tmp0_;
	GtkScrolledWindow* _tmp1_;
	GtkAdjustment* _tmp2_;
	GtkAdjustment* _tmp3_;
	GtkButton* _tmp4_;
	TubaViewsBaseStatusMessage* _tmp5_ = NULL;
	TubaViewsBaseStatusMessage* _tmp6_;
	_tmp0_ = g_new0 (TubaEntity*, 0 + 1);
	self->priv->entity_queue = (_vala_array_free (self->priv->entity_queue, self->priv->entity_queue_length1, (GDestroyNotify) g_object_unref), NULL);
	self->priv->entity_queue = _tmp0_;
	self->priv->entity_queue_length1 = 0;
	self->priv->_entity_queue_size_ = self->priv->entity_queue_length1;
	tuba_views_timeline_set_entity_queue_size (self, 0);
	_tmp1_ = ((TubaViewsBase*) self)->scrolled;
	_tmp2_ = gtk_scrolled_window_get_vadjustment (_tmp1_);
	_tmp3_ = _tmp2_;
	gtk_adjustment_set_value (_tmp3_, (gdouble) 0);
	_tmp4_ = ((TubaViewsBase*) self)->status_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp4_, FALSE);
	tuba_views_base_clear ((TubaViewsBase*) self);
	_tmp5_ = tuba_views_base_status_message_new ();
	_tmp5_->loading = TRUE;
	_tmp6_ = _tmp5_;
	tuba_views_base_set_base_status ((TubaViewsBase*) self, _tmp6_);
	_g_object_unref0 (_tmp6_);
	tuba_views_timeline_set_has_finished_request (self, FALSE);
	tuba_views_timeline_request (self, NULL, NULL);
}

void
tuba_views_timeline_on_refresh (TubaViewsTimeline* self)
{
	TubaViewsTimelineClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = TUBA_VIEWS_TIMELINE_GET_CLASS (self);
	if (_klass_->on_refresh) {
		_klass_->on_refresh (self);
	}
}

static void
tuba_views_timeline_real_on_manual_refresh (TubaViewsTimeline* self)
{
	tuba_views_timeline_on_refresh (self);
}

void
tuba_views_timeline_on_manual_refresh (TubaViewsTimeline* self)
{
	TubaViewsTimelineClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = TUBA_VIEWS_TIMELINE_GET_CLASS (self);
	if (_klass_->on_manual_refresh) {
		_klass_->on_manual_refresh (self);
	}
}

static void
tuba_views_timeline_real_on_account_changed (TubaViewsTimeline* self,
                                             TubaInstanceAccount* acc)
{
	tuba_account_holder_set_account ((TubaAccountHolder*) self, acc);
	tuba_streamable_update_stream ((TubaStreamable*) self);
	tuba_views_timeline_on_refresh (self);
}

void
tuba_views_timeline_on_account_changed (TubaViewsTimeline* self,
                                        TubaInstanceAccount* acc)
{
	TubaViewsTimelineClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = TUBA_VIEWS_TIMELINE_GET_CLASS (self);
	if (_klass_->on_account_changed) {
		_klass_->on_account_changed (self, acc);
	}
}

static void
tuba_views_timeline_real_on_bottom_reached (TubaViewsContentBase* base)
{
	TubaViewsTimeline * self;
	gboolean _tmp0_;
	self = (TubaViewsTimeline*) base;
	_tmp0_ = self->priv->_is_last_page;
	if (_tmp0_) {
		g_debug ("Timeline.vala:400: Last page reached");
		return;
	}
	tuba_views_timeline_request (self, NULL, NULL);
}

static void
tuba_views_timeline_real_on_streaming_policy_changed (TubaStreamable* base)
{
	TubaViewsTimeline * self;
	gboolean allow_streaming = FALSE;
	TubaSettings* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	self = (TubaViewsTimeline*) base;
	_tmp0_ = tuba_settings;
	_tmp1_ = tuba_settings_get_live_updates (_tmp0_);
	_tmp2_ = _tmp1_;
	allow_streaming = _tmp2_;
	_tmp3_ = self->priv->_is_public;
	if (_tmp3_) {
		gboolean _tmp4_ = FALSE;
		if (allow_streaming) {
			TubaSettings* _tmp5_;
			gboolean _tmp6_;
			gboolean _tmp7_;
			_tmp5_ = tuba_settings;
			_tmp6_ = tuba_settings_get_public_live_updates (_tmp5_);
			_tmp7_ = _tmp6_;
			_tmp4_ = _tmp7_;
		} else {
			_tmp4_ = FALSE;
		}
		allow_streaming = _tmp4_;
	}
	tuba_streamable_set_subscribed ((TubaStreamable*) self, allow_streaming);
}

static gchar*
tuba_views_timeline_real_get_stream_url (TubaViewsTimeline* self)
{
	gchar* result;
	result = NULL;
	return result;
}

gchar*
tuba_views_timeline_get_stream_url (TubaViewsTimeline* self)
{
	TubaViewsTimelineClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = TUBA_VIEWS_TIMELINE_GET_CLASS (self);
	if (_klass_->get_stream_url) {
		return _klass_->get_stream_url (self);
	}
	return NULL;
}

static gboolean
tuba_views_timeline_real_should_hide (TubaViewsTimeline* self,
                                      TubaEntity* entity)
{
	TubaAPIStatus* status_entity = NULL;
	TubaAPIStatus* _tmp0_;
	TubaAPIStatus* _tmp1_;
	gboolean result;
	g_return_val_if_fail (entity != NULL, FALSE);
	_tmp0_ = _g_object_ref0 (TUBA_API_IS_STATUS (entity) ? ((TubaAPIStatus*) entity) : NULL);
	status_entity = _tmp0_;
	_tmp1_ = status_entity;
	if (_tmp1_ != NULL) {
		TubaAPIStatus* _tmp2_;
		TubaAPIStatus* _tmp3_;
		TubaAPIStatus* _tmp4_;
		gboolean _tmp5_;
		gboolean _tmp6_;
		_tmp2_ = status_entity;
		_tmp3_ = tuba_api_status_get_formal (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp5_ = tuba_api_status_get_tuba_filter_hidden (_tmp4_);
		_tmp6_ = _tmp5_;
		result = _tmp6_;
		_g_object_unref0 (status_entity);
		return result;
	}
	result = FALSE;
	_g_object_unref0 (status_entity);
	return result;
}

gboolean
tuba_views_timeline_should_hide (TubaViewsTimeline* self,
                                 TubaEntity* entity)
{
	TubaViewsTimelineClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = TUBA_VIEWS_TIMELINE_GET_CLASS (self);
	if (_klass_->should_hide) {
		return _klass_->should_hide (self, entity);
	}
	return FALSE;
}

static void
_vala_JsonNode_free (JsonNode* self)
{
	g_boxed_free (json_node_get_type (), self);
}

static void
tuba_views_timeline_real_on_new_post (TubaViewsTimeline* self,
                                      TubaStreamableEvent* ev)
{
	gboolean _tmp0_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (ev != NULL);
	_tmp0_ = self->priv->_has_finished_request;
	if (!_tmp0_) {
		return;
	}
	{
		JsonNode* _tmp1_ = NULL;
		JsonNode* _tmp2_;
		TubaEntity* entity = NULL;
		GType _tmp3_;
		GType _tmp4_;
		TubaEntity* _tmp5_;
		TubaEntity* _tmp6_;
		_tmp2_ = tuba_streamable_event_get_node (ev, &_inner_error0_);
		_tmp1_ = _tmp2_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp3_ = tuba_views_timeline_get_accepts (self);
		_tmp4_ = _tmp3_;
		_tmp5_ = tuba_entity_from_json (_tmp4_, _tmp1_, &_inner_error0_);
		entity = _tmp5_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			__vala_JsonNode_free0 (_tmp1_);
			goto __catch0_g_error;
		}
		_tmp6_ = entity;
		tuba_views_timeline_on_new_post_entity (self, _tmp6_);
		_g_object_unref0 (entity);
		__vala_JsonNode_free0 (_tmp1_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp7_;
		const gchar* _tmp8_;
		const gchar* _tmp9_;
		gchar* _tmp10_;
		gchar* _tmp11_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp7_ = e;
		_tmp8_ = _tmp7_->message;
		_tmp9_ = string_to_string (_tmp8_);
		_tmp10_ = g_strconcat ("Error getting Entity from json: ", _tmp9_, NULL);
		_tmp11_ = _tmp10_;
		g_warning ("Timeline.vala:445: %s", _tmp11_);
		_g_free0 (_tmp11_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

void
tuba_views_timeline_on_new_post (TubaViewsTimeline* self,
                                 TubaStreamableEvent* ev)
{
	TubaViewsTimelineClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = TUBA_VIEWS_TIMELINE_GET_CLASS (self);
	if (_klass_->on_new_post) {
		_klass_->on_new_post (self, ev);
	}
}

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

void
tuba_views_timeline_on_new_post_entity (TubaViewsTimeline* self,
                                        TubaEntity* entity)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	GType _tmp9_;
	GType _tmp10_;
	GListStore* _tmp31_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (entity != NULL);
	if (tuba_views_timeline_should_hide (self, entity)) {
		return;
	}
	_tmp1_ = self->priv->_use_queue;
	if (_tmp1_) {
		GtkScrolledWindow* _tmp2_;
		GtkAdjustment* _tmp3_;
		GtkAdjustment* _tmp4_;
		gdouble _tmp5_;
		gdouble _tmp6_;
		_tmp2_ = ((TubaViewsBase*) self)->scrolled;
		_tmp3_ = gtk_scrolled_window_get_vadjustment (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp5_ = gtk_adjustment_get_value (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp0_ = _tmp6_ > ((gdouble) 100);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		TubaEntity* _tmp7_;
		gint _tmp8_;
		_tmp7_ = _g_object_ref0 (entity);
		_vala_array_add121 (&self->priv->entity_queue, &self->priv->entity_queue_length1, &self->priv->_entity_queue_size_, _tmp7_);
		_tmp8_ = self->priv->_entity_queue_size;
		tuba_views_timeline_set_entity_queue_size (self, _tmp8_ + 1);
		return;
	}
	_tmp9_ = tuba_views_timeline_get_accepts (self);
	_tmp10_ = _tmp9_;
	if (_tmp10_ == TUBA_API_TYPE_STATUS) {
		gchar* e_id = NULL;
		const gchar* _tmp11_;
		const gchar* _tmp12_;
		gchar* _tmp13_;
		_tmp11_ = tuba_api_status_get_id (G_TYPE_CHECK_INSTANCE_CAST (entity, TUBA_API_TYPE_STATUS, TubaAPIStatus));
		_tmp12_ = _tmp11_;
		_tmp13_ = g_strdup (_tmp12_);
		e_id = _tmp13_;
		{
			guint i = 0U;
			i = (guint) 0;
			{
				gboolean _tmp14_ = FALSE;
				_tmp14_ = TRUE;
				while (TRUE) {
					GListStore* _tmp16_;
					guint _tmp17_;
					guint _tmp18_;
					TubaSettings* _tmp19_;
					gint _tmp20_;
					gint _tmp21_;
					TubaAPIStatus* status_obj = NULL;
					GListStore* _tmp22_;
					GObject* _tmp23_;
					TubaAPIStatus* _tmp24_;
					gboolean _tmp25_ = FALSE;
					TubaAPIStatus* _tmp26_;
					if (!_tmp14_) {
						guint _tmp15_;
						_tmp15_ = i;
						i = _tmp15_ + 1;
					}
					_tmp14_ = FALSE;
					_tmp16_ = ((TubaViewsContentBase*) self)->model;
					g_object_get (_tmp16_, "n-items", &_tmp17_, NULL);
					_tmp18_ = _tmp17_;
					_tmp19_ = tuba_settings;
					_tmp20_ = tuba_settings_get_timeline_page_size (_tmp19_);
					_tmp21_ = _tmp20_;
					if (!(i < MIN (_tmp18_, (guint) CLAMP (_tmp21_, 10, 40)))) {
						break;
					}
					_tmp22_ = ((TubaViewsContentBase*) self)->model;
					_tmp23_ = g_list_model_get_item ((GListModel*) _tmp22_, i);
					_tmp24_ = TUBA_API_IS_STATUS (_tmp23_) ? ((TubaAPIStatus*) _tmp23_) : NULL;
					if (_tmp24_ == NULL) {
						_g_object_unref0 (_tmp23_);
					}
					status_obj = _tmp24_;
					_tmp26_ = status_obj;
					if (_tmp26_ != NULL) {
						TubaAPIStatus* _tmp27_;
						const gchar* _tmp28_;
						const gchar* _tmp29_;
						const gchar* _tmp30_;
						_tmp27_ = status_obj;
						_tmp28_ = tuba_api_status_get_id (_tmp27_);
						_tmp29_ = _tmp28_;
						_tmp30_ = e_id;
						_tmp25_ = g_strcmp0 (_tmp29_, _tmp30_) == 0;
					} else {
						_tmp25_ = FALSE;
					}
					if (_tmp25_) {
						tuba_views_timeline_safely_remove (self, (gint) i);
					}
					_g_object_unref0 (status_obj);
				}
			}
		}
		_g_free0 (e_id);
	}
	_tmp31_ = ((TubaViewsContentBase*) self)->model;
	g_list_store_insert (_tmp31_, (guint) 0, (GObject*) entity);
}

static void
tuba_views_timeline_finish_queue (TubaViewsTimeline* self)
{
	TubaEntity** _tmp0_;
	gint _tmp0__length1;
	GListStore* _tmp1_;
	TubaEntity** _tmp2_;
	gint _tmp2__length1;
	TubaEntity** _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->entity_queue;
	_tmp0__length1 = self->priv->entity_queue_length1;
	if (_tmp0__length1 == 0) {
		return;
	}
	_tmp1_ = ((TubaViewsContentBase*) self)->model;
	_tmp2_ = self->priv->entity_queue;
	_tmp2__length1 = self->priv->entity_queue_length1;
	g_list_store_splice (_tmp1_, (guint) 0, (guint) 0, (GObject**) _tmp2_, (guint) ((_tmp2__length1 * sizeof (TubaEntity*)) / sizeof (GObject*)));
	_tmp3_ = g_new0 (TubaEntity*, 0 + 1);
	self->priv->entity_queue = (_vala_array_free (self->priv->entity_queue, self->priv->entity_queue_length1, (GDestroyNotify) g_object_unref), NULL);
	self->priv->entity_queue = _tmp3_;
	self->priv->entity_queue_length1 = 0;
	self->priv->_entity_queue_size_ = self->priv->entity_queue_length1;
	tuba_views_timeline_set_entity_queue_size (self, 0);
}

static void
tuba_views_timeline_real_on_edit_post (TubaViewsTimeline* self,
                                       TubaStreamableEvent* ev)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (ev != NULL);
	{
		JsonNode* _tmp0_ = NULL;
		JsonNode* _tmp1_;
		TubaEntity* entity = NULL;
		GType _tmp2_;
		GType _tmp3_;
		TubaEntity* _tmp4_;
		gchar* entity_id = NULL;
		TubaEntity* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		gchar* _tmp8_;
		_tmp1_ = tuba_streamable_event_get_node (ev, &_inner_error0_);
		_tmp0_ = _tmp1_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp2_ = tuba_views_timeline_get_accepts (self);
		_tmp3_ = _tmp2_;
		_tmp4_ = tuba_entity_from_json (_tmp3_, _tmp0_, &_inner_error0_);
		entity = _tmp4_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			__vala_JsonNode_free0 (_tmp0_);
			goto __catch0_g_error;
		}
		_tmp5_ = entity;
		_tmp6_ = tuba_api_status_get_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TUBA_API_TYPE_STATUS, TubaAPIStatus));
		_tmp7_ = _tmp6_;
		_tmp8_ = g_strdup (_tmp7_);
		entity_id = _tmp8_;
		{
			guint i = 0U;
			i = (guint) 0;
			{
				gboolean _tmp9_ = FALSE;
				_tmp9_ = TRUE;
				while (TRUE) {
					GListStore* _tmp11_;
					TubaAPIStatus* status_obj = NULL;
					GListStore* _tmp12_;
					GObject* _tmp13_;
					TubaAPIStatus* _tmp14_;
					gboolean _tmp15_ = FALSE;
					TubaAPIStatus* _tmp16_;
					if (!_tmp9_) {
						guint _tmp10_;
						_tmp10_ = i;
						i = _tmp10_ + 1;
					}
					_tmp9_ = FALSE;
					_tmp11_ = ((TubaViewsContentBase*) self)->model;
					if (!(i < g_list_model_get_n_items ((GListModel*) _tmp11_))) {
						break;
					}
					_tmp12_ = ((TubaViewsContentBase*) self)->model;
					_tmp13_ = g_list_model_get_item ((GListModel*) _tmp12_, i);
					_tmp14_ = TUBA_API_IS_STATUS (_tmp13_) ? ((TubaAPIStatus*) _tmp13_) : NULL;
					if (_tmp14_ == NULL) {
						_g_object_unref0 (_tmp13_);
					}
					status_obj = _tmp14_;
					_tmp16_ = status_obj;
					if (_tmp16_ != NULL) {
						TubaAPIStatus* _tmp17_;
						const gchar* _tmp18_;
						const gchar* _tmp19_;
						const gchar* _tmp20_;
						_tmp17_ = status_obj;
						_tmp18_ = tuba_api_status_get_id (_tmp17_);
						_tmp19_ = _tmp18_;
						_tmp20_ = entity_id;
						_tmp15_ = g_strcmp0 (_tmp19_, _tmp20_) == 0;
					} else {
						_tmp15_ = FALSE;
					}
					if (_tmp15_) {
						gboolean had_focus = FALSE;
						GListStore* _tmp21_;
						GListStore* _tmp22_;
						TubaEntity* _tmp23_;
						had_focus = tuba_views_timeline_was_focused (self, (gint) i);
						_tmp21_ = ((TubaViewsContentBase*) self)->model;
						g_list_store_remove (_tmp21_, i);
						_tmp22_ = ((TubaViewsContentBase*) self)->model;
						_tmp23_ = entity;
						g_list_store_insert (_tmp22_, i, (GObject*) _tmp23_);
						if (had_focus) {
							tuba_views_timeline_focus_recover_actual (self, (gint) i);
						}
						_g_object_unref0 (status_obj);
						break;
					}
					_g_object_unref0 (status_obj);
				}
			}
		}
		_g_free0 (entity_id);
		_g_object_unref0 (entity);
		__vala_JsonNode_free0 (_tmp0_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp24_;
		const gchar* _tmp25_;
		const gchar* _tmp26_;
		gchar* _tmp27_;
		gchar* _tmp28_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp24_ = e;
		_tmp25_ = _tmp24_->message;
		_tmp26_ = string_to_string (_tmp25_);
		_tmp27_ = g_strconcat ("Error getting Entity from json: ", _tmp26_, NULL);
		_tmp28_ = _tmp27_;
		g_warning ("Timeline.vala:500: %s", _tmp28_);
		_g_free0 (_tmp28_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

void
tuba_views_timeline_on_edit_post (TubaViewsTimeline* self,
                                  TubaStreamableEvent* ev)
{
	TubaViewsTimelineClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = TUBA_VIEWS_TIMELINE_GET_CLASS (self);
	if (_klass_->on_edit_post) {
		_klass_->on_edit_post (self, ev);
	}
}

static void
tuba_views_timeline_real_on_delete_post (TubaViewsTimeline* self,
                                         TubaStreamableEvent* ev)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (ev != NULL);
	{
		gchar* status_id = NULL;
		gchar* _tmp0_;
		_tmp0_ = tuba_streamable_event_get_string (ev, &_inner_error0_);
		status_id = _tmp0_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		{
			guint i = 0U;
			i = (guint) 0;
			{
				gboolean _tmp1_ = FALSE;
				_tmp1_ = TRUE;
				while (TRUE) {
					GListStore* _tmp3_;
					TubaAPIStatus* status_obj = NULL;
					GListStore* _tmp4_;
					GObject* _tmp5_;
					TubaAPIStatus* _tmp6_;
					gboolean _tmp7_ = FALSE;
					TubaAPIStatus* _tmp8_;
					if (!_tmp1_) {
						guint _tmp2_;
						_tmp2_ = i;
						i = _tmp2_ + 1;
					}
					_tmp1_ = FALSE;
					_tmp3_ = ((TubaViewsContentBase*) self)->model;
					if (!(i < g_list_model_get_n_items ((GListModel*) _tmp3_))) {
						break;
					}
					_tmp4_ = ((TubaViewsContentBase*) self)->model;
					_tmp5_ = g_list_model_get_item ((GListModel*) _tmp4_, i);
					_tmp6_ = TUBA_API_IS_STATUS (_tmp5_) ? ((TubaAPIStatus*) _tmp5_) : NULL;
					if (_tmp6_ == NULL) {
						_g_object_unref0 (_tmp5_);
					}
					status_obj = _tmp6_;
					_tmp8_ = status_obj;
					if (_tmp8_ != NULL) {
						gboolean _tmp9_ = FALSE;
						TubaAPIStatus* _tmp10_;
						const gchar* _tmp11_;
						const gchar* _tmp12_;
						_tmp10_ = status_obj;
						_tmp11_ = tuba_api_status_get_id (_tmp10_);
						_tmp12_ = _tmp11_;
						if (g_strcmp0 (_tmp12_, status_id) == 0) {
							_tmp9_ = TRUE;
						} else {
							TubaAPIStatus* _tmp13_;
							TubaAPIStatus* _tmp14_;
							TubaAPIStatus* _tmp15_;
							const gchar* _tmp16_;
							const gchar* _tmp17_;
							_tmp13_ = status_obj;
							_tmp14_ = tuba_api_status_get_formal (_tmp13_);
							_tmp15_ = _tmp14_;
							_tmp16_ = tuba_api_status_get_id (_tmp15_);
							_tmp17_ = _tmp16_;
							_tmp9_ = g_strcmp0 (_tmp17_, status_id) == 0;
						}
						_tmp7_ = _tmp9_;
					} else {
						_tmp7_ = FALSE;
					}
					if (_tmp7_) {
						tuba_views_timeline_safely_remove (self, (gint) i);
						_g_object_unref0 (status_obj);
						break;
					}
					_g_object_unref0 (status_obj);
				}
			}
		}
		_g_free0 (status_id);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp18_;
		const gchar* _tmp19_;
		const gchar* _tmp20_;
		gchar* _tmp21_;
		gchar* _tmp22_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp18_ = e;
		_tmp19_ = _tmp18_->message;
		_tmp20_ = string_to_string (_tmp19_);
		_tmp21_ = g_strconcat ("Error getting String from json: ", _tmp20_, NULL);
		_tmp22_ = _tmp21_;
		g_warning ("Timeline.vala:521: %s", _tmp22_);
		_g_free0 (_tmp22_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

void
tuba_views_timeline_on_delete_post (TubaViewsTimeline* self,
                                    TubaStreamableEvent* ev)
{
	TubaViewsTimelineClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = TUBA_VIEWS_TIMELINE_GET_CLASS (self);
	if (_klass_->on_delete_post) {
		_klass_->on_delete_post (self, ev);
	}
}

static void
tuba_views_timeline_real_on_remove_user (TubaViewsTimeline* self,
                                         const gchar* user_id)
{
	GType _tmp0_;
	GType _tmp1_;
	gint should_refocus = 0;
	g_return_if_fail (user_id != NULL);
	_tmp0_ = tuba_views_timeline_get_accepts (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != TUBA_API_TYPE_STATUS) {
		return;
	}
	should_refocus = -1;
	{
		guint i = 0U;
		i = (guint) 0;
		{
			gboolean _tmp2_ = FALSE;
			_tmp2_ = TRUE;
			while (TRUE) {
				GListStore* _tmp4_;
				TubaAPIStatus* status_obj = NULL;
				GListStore* _tmp5_;
				GObject* _tmp6_;
				TubaAPIStatus* _tmp7_;
				gboolean _tmp8_ = FALSE;
				TubaAPIStatus* _tmp9_;
				if (!_tmp2_) {
					guint _tmp3_;
					_tmp3_ = i;
					i = _tmp3_ + 1;
				}
				_tmp2_ = FALSE;
				_tmp4_ = ((TubaViewsContentBase*) self)->model;
				if (!(i < g_list_model_get_n_items ((GListModel*) _tmp4_))) {
					break;
				}
				_tmp5_ = ((TubaViewsContentBase*) self)->model;
				_tmp6_ = g_list_model_get_item ((GListModel*) _tmp5_, i);
				_tmp7_ = TUBA_API_IS_STATUS (_tmp6_) ? ((TubaAPIStatus*) _tmp6_) : NULL;
				if (_tmp7_ == NULL) {
					_g_object_unref0 (_tmp6_);
				}
				status_obj = _tmp7_;
				_tmp9_ = status_obj;
				if (_tmp9_ != NULL) {
					gboolean _tmp10_ = FALSE;
					gboolean _tmp11_ = FALSE;
					TubaAPIStatus* _tmp12_;
					TubaAPIStatus* _tmp13_;
					TubaAPIStatus* _tmp14_;
					TubaAPIAccount* _tmp15_;
					TubaAPIAccount* _tmp16_;
					_tmp12_ = status_obj;
					_tmp13_ = tuba_api_status_get_formal (_tmp12_);
					_tmp14_ = _tmp13_;
					_tmp15_ = tuba_api_status_get_account (_tmp14_);
					_tmp16_ = _tmp15_;
					if (_tmp16_ != NULL) {
						TubaAPIStatus* _tmp17_;
						TubaAPIStatus* _tmp18_;
						TubaAPIStatus* _tmp19_;
						TubaAPIAccount* _tmp20_;
						TubaAPIAccount* _tmp21_;
						const gchar* _tmp22_;
						const gchar* _tmp23_;
						_tmp17_ = status_obj;
						_tmp18_ = tuba_api_status_get_formal (_tmp17_);
						_tmp19_ = _tmp18_;
						_tmp20_ = tuba_api_status_get_account (_tmp19_);
						_tmp21_ = _tmp20_;
						_tmp22_ = tuba_api_account_get_id (_tmp21_);
						_tmp23_ = _tmp22_;
						_tmp11_ = g_strcmp0 (_tmp23_, user_id) == 0;
					} else {
						_tmp11_ = FALSE;
					}
					if (_tmp11_) {
						_tmp10_ = TRUE;
					} else {
						gboolean _tmp24_ = FALSE;
						TubaAPIStatus* _tmp25_;
						TubaAPIAccount* _tmp26_;
						TubaAPIAccount* _tmp27_;
						_tmp25_ = status_obj;
						_tmp26_ = tuba_api_status_get_account (_tmp25_);
						_tmp27_ = _tmp26_;
						if (_tmp27_ != NULL) {
							TubaAPIStatus* _tmp28_;
							TubaAPIAccount* _tmp29_;
							TubaAPIAccount* _tmp30_;
							const gchar* _tmp31_;
							const gchar* _tmp32_;
							_tmp28_ = status_obj;
							_tmp29_ = tuba_api_status_get_account (_tmp28_);
							_tmp30_ = _tmp29_;
							_tmp31_ = tuba_api_account_get_id (_tmp30_);
							_tmp32_ = _tmp31_;
							_tmp24_ = g_strcmp0 (_tmp32_, user_id) == 0;
						} else {
							_tmp24_ = FALSE;
						}
						_tmp10_ = _tmp24_;
					}
					_tmp8_ = _tmp10_;
				} else {
					_tmp8_ = FALSE;
				}
				if (_tmp8_) {
					GListStore* _tmp33_;
					if (tuba_views_timeline_was_focused (self, (gint) i)) {
						should_refocus = (gint) i;
					}
					_tmp33_ = ((TubaViewsContentBase*) self)->model;
					g_list_store_remove (_tmp33_, i);
				}
				_g_object_unref0 (status_obj);
			}
		}
	}
	if (should_refocus > 0) {
		tuba_views_timeline_focus_recover (self, should_refocus);
	}
}

void
tuba_views_timeline_on_remove_user (TubaViewsTimeline* self,
                                    const gchar* user_id)
{
	TubaViewsTimelineClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = TUBA_VIEWS_TIMELINE_GET_CLASS (self);
	if (_klass_->on_remove_user) {
		_klass_->on_remove_user (self, user_id);
	}
}

void
tuba_views_timeline_safely_remove (TubaViewsTimeline* self,
                                   gint i)
{
	gboolean refocus = FALSE;
	GListStore* _tmp0_;
	g_return_if_fail (self != NULL);
	refocus = tuba_views_timeline_was_focused (self, i);
	_tmp0_ = ((TubaViewsContentBase*) self)->model;
	g_list_store_remove (_tmp0_, (guint) i);
	if (refocus) {
		tuba_views_timeline_focus_recover (self, i);
	}
}

gboolean
tuba_views_timeline_was_focused (TubaViewsTimeline* self,
                                 gint i)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	if (gtk_widget_get_mapped ((GtkWidget*) self)) {
		GtkListBoxRow* w = NULL;
		GtkListBox* _tmp0_;
		GtkListBoxRow* _tmp1_;
		GtkListBoxRow* _tmp2_;
		gboolean _tmp3_ = FALSE;
		GtkListBoxRow* _tmp4_;
		_tmp0_ = ((TubaViewsContentBase*) self)->content;
		_tmp1_ = gtk_list_box_get_row_at_index (_tmp0_, i);
		_tmp2_ = _g_object_ref0 (_tmp1_);
		w = _tmp2_;
		_tmp4_ = w;
		if (_tmp4_ != NULL) {
			GtkListBoxRow* _tmp5_;
			_tmp5_ = w;
			_tmp3_ = gtk_widget_get_mapped ((GtkWidget*) _tmp5_);
		} else {
			_tmp3_ = FALSE;
		}
		if (_tmp3_) {
			GtkListBoxRow* _tmp6_;
			gboolean _tmp7_;
			gboolean _tmp8_;
			_tmp6_ = w;
			g_object_get ((GtkWidget*) _tmp6_, "has-focus", &_tmp7_, NULL);
			_tmp8_ = _tmp7_;
			if (_tmp8_) {
				result = TRUE;
				_g_object_unref0 (w);
				return result;
			} else {
				GtkWidget* last_focus = NULL;
				TubaApplication* _tmp9_;
				TubaDialogsMainWindow* _tmp10_;
				TubaDialogsMainWindow* _tmp11_;
				GtkWidget* _tmp12_;
				gboolean _tmp13_ = FALSE;
				gboolean _tmp14_ = FALSE;
				GtkWidget* _tmp15_;
				_tmp9_ = tuba_app;
				_tmp10_ = tuba_application_get_main_window (_tmp9_);
				_tmp11_ = _tmp10_;
				_tmp12_ = gtk_root_get_focus ((GtkRoot*) _tmp11_);
				last_focus = _tmp12_;
				_tmp15_ = last_focus;
				if (_tmp15_ != NULL) {
					GtkWidget* _tmp16_;
					_tmp16_ = last_focus;
					_tmp14_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp16_, gtk_widget_get_type ());
				} else {
					_tmp14_ = FALSE;
				}
				if (_tmp14_) {
					GtkWidget* _tmp17_;
					GtkListBoxRow* _tmp18_;
					_tmp17_ = last_focus;
					_tmp18_ = w;
					_tmp13_ = gtk_widget_is_ancestor (_tmp17_, (GtkWidget*) _tmp18_);
				} else {
					_tmp13_ = FALSE;
				}
				result = _tmp13_;
				_g_object_unref0 (w);
				return result;
			}
		}
		_g_object_unref0 (w);
	}
	result = FALSE;
	return result;
}

void
tuba_views_timeline_focus_recover (TubaViewsTimeline* self,
                                   gint i)
{
	gboolean _tmp0_ = FALSE;
	g_return_if_fail (self != NULL);
	if (gtk_widget_get_mapped ((GtkWidget*) self)) {
		_tmp0_ = !tuba_views_timeline_focus_recover_actual (self, i);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		tuba_views_timeline_focus_recover_actual (self, i - 1);
	}
}

gboolean
tuba_views_timeline_focus_recover_actual (TubaViewsTimeline* self,
                                          gint i)
{
	GtkListBoxRow* w = NULL;
	GtkListBox* _tmp0_;
	GtkListBoxRow* _tmp1_;
	GtkListBoxRow* _tmp2_;
	gboolean _tmp3_ = FALSE;
	GtkListBoxRow* _tmp4_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = ((TubaViewsContentBase*) self)->content;
	_tmp1_ = gtk_list_box_get_row_at_index (_tmp0_, i);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	w = _tmp2_;
	_tmp4_ = w;
	if (_tmp4_ != NULL) {
		GtkListBoxRow* _tmp5_;
		_tmp5_ = w;
		_tmp3_ = gtk_widget_get_mapped ((GtkWidget*) _tmp5_);
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		GtkListBoxRow* _tmp6_;
		_tmp6_ = w;
		gtk_widget_grab_focus ((GtkWidget*) _tmp6_);
		result = TRUE;
		_g_object_unref0 (w);
		return result;
	}
	result = FALSE;
	_g_object_unref0 (w);
	return result;
}

TubaViewsTimeline*
tuba_views_timeline_construct (GType object_type)
{
	TubaViewsTimeline * self = NULL;
	self = (TubaViewsTimeline*) tuba_views_content_base_construct (object_type);
	return self;
}

TubaViewsTimeline*
tuba_views_timeline_new (void)
{
	return tuba_views_timeline_construct (TUBA_VIEWS_TYPE_TIMELINE);
}

const gchar*
tuba_views_timeline_get_url (TubaViewsTimeline* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_url;
	result = _tmp0_;
	return result;
}

void
tuba_views_timeline_set_url (TubaViewsTimeline* self,
                             const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_views_timeline_get_url (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_url);
		self->priv->_url = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_views_timeline_properties[TUBA_VIEWS_TIMELINE_URL_PROPERTY]);
	}
}

gboolean
tuba_views_timeline_get_is_public (TubaViewsTimeline* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_is_public;
	return result;
}

void
tuba_views_timeline_set_is_public (TubaViewsTimeline* self,
                                   gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_views_timeline_get_is_public (self);
	if (old_value != value) {
		self->priv->_is_public = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_views_timeline_properties[TUBA_VIEWS_TIMELINE_IS_PUBLIC_PROPERTY]);
	}
}

GType
tuba_views_timeline_get_accepts (TubaViewsTimeline* self)
{
	GType result;
	g_return_val_if_fail (self != NULL, G_TYPE_INVALID);
	result = self->priv->_accepts;
	return result;
}

void
tuba_views_timeline_set_accepts (TubaViewsTimeline* self,
                                 GType value)
{
	g_return_if_fail (self != NULL);
	self->priv->_accepts = value;
	tuba_views_timeline_update_time_signal (self);
	g_object_notify_by_pspec ((GObject *) self, tuba_views_timeline_properties[TUBA_VIEWS_TIMELINE_ACCEPTS_PROPERTY]);
}

gboolean
tuba_views_timeline_get_use_queue (TubaViewsTimeline* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_use_queue;
	return result;
}

void
tuba_views_timeline_set_use_queue (TubaViewsTimeline* self,
                                   gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_views_timeline_get_use_queue (self);
	if (old_value != value) {
		self->priv->_use_queue = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_views_timeline_properties[TUBA_VIEWS_TIMELINE_USE_QUEUE_PROPERTY]);
	}
}

gint
tuba_views_timeline_get_batch_size_min (TubaViewsTimeline* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_batch_size_min;
	return result;
}

void
tuba_views_timeline_set_batch_size_min (TubaViewsTimeline* self,
                                        gint value)
{
	g_return_if_fail (self != NULL);
	self->priv->_batch_size_min = MAX (10, value);
	g_object_notify_by_pspec ((GObject *) self, tuba_views_timeline_properties[TUBA_VIEWS_TIMELINE_BATCH_SIZE_MIN_PROPERTY]);
}

static TubaInstanceAccount*
tuba_views_timeline_real_get_account (TubaAccountHolder* base)
{
	TubaInstanceAccount* result;
	TubaViewsTimeline* self;
	TubaInstanceAccount* _tmp0_;
	self = (TubaViewsTimeline*) base;
	_tmp0_ = self->priv->_account;
	result = _tmp0_;
	return result;
}

static void
tuba_views_timeline_real_set_account (TubaAccountHolder* base,
                                      TubaInstanceAccount* value)
{
	TubaViewsTimeline* self;
	TubaInstanceAccount* old_value;
	self = (TubaViewsTimeline*) base;
	old_value = tuba_views_timeline_real_get_account (base);
	if (old_value != value) {
		TubaInstanceAccount* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_account);
		self->priv->_account = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_views_timeline_properties[TUBA_VIEWS_TIMELINE_ACCOUNT_PROPERTY]);
	}
}

gboolean
tuba_views_timeline_get_force_at_least_min (TubaViewsTimeline* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_force_at_least_min;
	return result;
}

void
tuba_views_timeline_set_force_at_least_min (TubaViewsTimeline* self,
                                            gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_views_timeline_get_force_at_least_min (self);
	if (old_value != value) {
		self->priv->_force_at_least_min = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_views_timeline_properties[TUBA_VIEWS_TIMELINE_FORCE_AT_LEAST_MIN_PROPERTY]);
	}
}

gboolean
tuba_views_timeline_get_is_last_page (TubaViewsTimeline* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_is_last_page;
	return result;
}

void
tuba_views_timeline_set_is_last_page (TubaViewsTimeline* self,
                                      gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_views_timeline_get_is_last_page (self);
	if (old_value != value) {
		self->priv->_is_last_page = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_views_timeline_properties[TUBA_VIEWS_TIMELINE_IS_LAST_PAGE_PROPERTY]);
	}
}

const gchar*
tuba_views_timeline_get_page_next (TubaViewsTimeline* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_page_next;
	result = _tmp0_;
	return result;
}

void
tuba_views_timeline_set_page_next (TubaViewsTimeline* self,
                                   const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_views_timeline_get_page_next (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_page_next);
		self->priv->_page_next = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_views_timeline_properties[TUBA_VIEWS_TIMELINE_PAGE_NEXT_PROPERTY]);
	}
}

const gchar*
tuba_views_timeline_get_page_prev (TubaViewsTimeline* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_page_prev;
	result = _tmp0_;
	return result;
}

void
tuba_views_timeline_set_page_prev (TubaViewsTimeline* self,
                                   const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_views_timeline_get_page_prev (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_page_prev);
		self->priv->_page_prev = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_views_timeline_properties[TUBA_VIEWS_TIMELINE_PAGE_PREV_PROPERTY]);
	}
}

gint
tuba_views_timeline_get_entity_queue_size (TubaViewsTimeline* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_entity_queue_size;
	return result;
}

void
tuba_views_timeline_set_entity_queue_size (TubaViewsTimeline* self,
                                           gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_views_timeline_get_entity_queue_size (self);
	if (old_value != value) {
		self->priv->_entity_queue_size = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_views_timeline_properties[TUBA_VIEWS_TIMELINE_ENTITY_QUEUE_SIZE_PROPERTY]);
	}
}

static gboolean
tuba_views_timeline_get_is_pulling (TubaViewsTimeline* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_is_pulling;
	return result;
}

static void
tuba_views_timeline_set_is_pulling (TubaViewsTimeline* self,
                                    gboolean value)
{
	g_return_if_fail (self != NULL);
	if (self->priv->_is_pulling != value) {
		if (value) {
			GtkOverlay* _tmp0_;
			AdwSpinner* _tmp1_;
			GtkScrolledWindow* _tmp2_;
			_tmp0_ = ((TubaViewsBase*) self)->scrolled_overlay;
			_tmp1_ = self->priv->pull_to_refresh_spinner;
			gtk_overlay_add_overlay (_tmp0_, (GtkWidget*) _tmp1_);
			_tmp2_ = ((TubaViewsBase*) self)->scrolled;
			gtk_widget_set_sensitive ((GtkWidget*) _tmp2_, FALSE);
		} else {
			GtkOverlay* _tmp3_;
			AdwSpinner* _tmp4_;
			GtkScrolledWindow* _tmp5_;
			AdwSpinner* _tmp6_;
			AdwSpinner* _tmp7_;
			_tmp3_ = ((TubaViewsBase*) self)->scrolled_overlay;
			_tmp4_ = self->priv->pull_to_refresh_spinner;
			gtk_overlay_remove_overlay (_tmp3_, (GtkWidget*) _tmp4_);
			_tmp5_ = ((TubaViewsBase*) self)->scrolled;
			gtk_widget_set_sensitive ((GtkWidget*) _tmp5_, TRUE);
			_tmp6_ = self->priv->pull_to_refresh_spinner;
			gtk_widget_set_margin_top ((GtkWidget*) _tmp6_, 32);
			_tmp7_ = self->priv->pull_to_refresh_spinner;
			g_object_set ((GtkWidget*) _tmp7_, "height-request", 32, NULL);
		}
		self->priv->_is_pulling = value;
	}
}

gboolean
tuba_views_timeline_get_has_finished_request (TubaViewsTimeline* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_has_finished_request;
	return result;
}

static void
tuba_views_timeline_set_has_finished_request (TubaViewsTimeline* self,
                                              gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_views_timeline_get_has_finished_request (self);
	if (old_value != value) {
		self->priv->_has_finished_request = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_views_timeline_properties[TUBA_VIEWS_TIMELINE_HAS_FINISHED_REQUEST_PROPERTY]);
	}
}

GCancellable*
tuba_views_timeline_get_request_cancellable (TubaViewsTimeline* self)
{
	GCancellable* result;
	GCancellable* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_request_cancellable;
	result = _tmp0_;
	return result;
}

void
tuba_views_timeline_set_request_cancellable (TubaViewsTimeline* self,
                                             GCancellable* value)
{
	GCancellable* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_views_timeline_get_request_cancellable (self);
	if (old_value != value) {
		GCancellable* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_request_cancellable);
		self->priv->_request_cancellable = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_views_timeline_properties[TUBA_VIEWS_TIMELINE_REQUEST_CANCELLABLE_PROPERTY]);
	}
}

static const gchar*
tuba_views_timeline_real_get_t_connection_url (TubaStreamable* base)
{
	const gchar* result;
	TubaViewsTimeline* self;
	const gchar* _tmp0_;
	self = (TubaViewsTimeline*) base;
	_tmp0_ = self->priv->_t_connection_url;
	result = _tmp0_;
	return result;
}

static void
tuba_views_timeline_real_set_t_connection_url (TubaStreamable* base,
                                               const gchar* value)
{
	TubaViewsTimeline* self;
	gchar* old_value;
	self = (TubaViewsTimeline*) base;
	old_value = tuba_views_timeline_real_get_t_connection_url (base);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_t_connection_url);
		self->priv->_t_connection_url = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_views_timeline_properties[TUBA_VIEWS_TIMELINE_T_CONNECTION_URL_PROPERTY]);
	}
}

static gboolean
tuba_views_timeline_real_get_subscribed (TubaStreamable* base)
{
	gboolean result;
	TubaViewsTimeline* self;
	self = (TubaViewsTimeline*) base;
	result = self->priv->_subscribed;
	return result;
}

static void
tuba_views_timeline_real_set_subscribed (TubaStreamable* base,
                                         gboolean value)
{
	TubaViewsTimeline* self;
	gboolean old_value;
	self = (TubaViewsTimeline*) base;
	old_value = tuba_views_timeline_real_get_subscribed (base);
	if (old_value != value) {
		self->priv->_subscribed = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_views_timeline_properties[TUBA_VIEWS_TIMELINE_SUBSCRIBED_PROPERTY]);
	}
}

static void
_tuba_views_timeline_finish_queue_tuba_views_content_base_reached_close_to_top (TubaViewsContentBase* _sender,
                                                                                gpointer self)
{
	tuba_views_timeline_finish_queue ((TubaViewsTimeline*) self);
}

static void
_tuba_views_timeline_refresh_if_mapped_tuba_application_refresh (TubaApplication* _sender,
                                                                 gpointer self)
{
	tuba_views_timeline_refresh_if_mapped ((TubaViewsTimeline*) self);
}

static void
_tuba_views_timeline_on_manual_refresh_gtk_button_clicked (GtkButton* _sender,
                                                           gpointer self)
{
	tuba_views_timeline_on_manual_refresh ((TubaViewsTimeline*) self);
}

static void
_tuba_views_timeline_on_new_post_tuba_streamable_stream_event (TubaStreamable* _sender,
                                                               TubaStreamableEvent* ev,
                                                               gpointer self)
{
	tuba_views_timeline_on_new_post ((TubaViewsTimeline*) self, ev);
}

static void
_tuba_views_timeline_on_edit_post_tuba_streamable_stream_event (TubaStreamable* _sender,
                                                                TubaStreamableEvent* ev,
                                                                gpointer self)
{
	tuba_views_timeline_on_edit_post ((TubaViewsTimeline*) self, ev);
}

static void
_tuba_views_timeline_on_delete_post_tuba_streamable_stream_event (TubaStreamable* _sender,
                                                                  TubaStreamableEvent* ev,
                                                                  gpointer self)
{
	tuba_views_timeline_on_delete_post ((TubaViewsTimeline*) self, ev);
}

static void
_tuba_views_timeline_on_refresh_g_object_notify (GObject* _sender,
                                                 GParamSpec* pspec,
                                                 gpointer self)
{
	tuba_views_timeline_on_refresh ((TubaViewsTimeline*) self);
}

static GtkWidget*
_tuba_views_content_base_on_create_model_widget_gtk_list_box_create_widget_func (GObject* item,
                                                                                 gpointer self)
{
	GtkWidget* result;
	result = tuba_views_content_base_on_create_model_widget ((TubaViewsContentBase*) self, item);
	return result;
}

static void
_tuba_views_timeline_on_drag_update_gtk_gesture_drag_drag_update (GtkGestureDrag* _sender,
                                                                  gdouble offset_x,
                                                                  gdouble offset_y,
                                                                  gpointer self)
{
	tuba_views_timeline_on_drag_update ((TubaViewsTimeline*) self, offset_x, offset_y);
}

static void
_tuba_views_timeline_on_drag_end_gtk_gesture_drag_drag_end (GtkGestureDrag* _sender,
                                                            gdouble offset_x,
                                                            gdouble offset_y,
                                                            gpointer self)
{
	tuba_views_timeline_on_drag_end ((TubaViewsTimeline*) self, offset_x, offset_y);
}

static GObject *
tuba_views_timeline_constructor (GType type,
                                 guint n_construct_properties,
                                 GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TubaViewsTimeline * self;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar** _tmp2_;
	AdwSpinner* _tmp3_ = NULL;
	TubaApplication* _tmp4_;
	GtkButton* _tmp5_;
	gchar* _tmp6_;
	GType _tmp7_;
	GType _tmp8_;
	TubaSettings* _tmp11_;
	TubaSettings* _tmp12_;
	TubaSettings* _tmp13_;
	GtkListBox* _tmp14_;
	GListStore* _tmp15_;
	GtkGestureDrag* drag = NULL;
	GtkGestureDrag* _tmp16_;
	GtkGestureDrag* _tmp17_;
	GtkGestureDrag* _tmp18_;
	GtkGestureDrag* _tmp19_;
	GtkEventController* _tmp20_;
	GtkShortcutController* shortcutscontroller = NULL;
	GtkShortcutController* _tmp21_;
	GtkShortcutController* _tmp22_;
	GtkShortcutTrigger* _tmp23_;
	GtkNamedAction* _tmp24_;
	GtkShortcut* _tmp25_;
	GtkShortcutController* _tmp26_;
	GtkShortcutTrigger* _tmp27_;
	GtkNamedAction* _tmp28_;
	GtkShortcut* _tmp29_;
	GtkShortcutController* _tmp30_;
	GtkShortcutTrigger* _tmp31_;
	GtkNamedAction* _tmp32_;
	GtkShortcut* _tmp33_;
	GtkShortcutController* _tmp34_;
	GtkShortcutTrigger* _tmp35_;
	GtkNamedAction* _tmp36_;
	GtkShortcut* _tmp37_;
	GtkShortcutController* _tmp38_;
	GtkShortcutTrigger* _tmp39_;
	GtkNamedAction* _tmp40_;
	GtkShortcut* _tmp41_;
	GtkShortcutController* _tmp42_;
	GtkShortcutTrigger* _tmp43_;
	GtkNamedAction* _tmp44_;
	GtkShortcut* _tmp45_;
	GtkShortcutController* _tmp46_;
	GtkShortcutTrigger* _tmp47_;
	GtkNamedAction* _tmp48_;
	GtkShortcut* _tmp49_;
	GtkShortcutController* _tmp50_;
	GtkShortcutTrigger* _tmp51_;
	GtkNamedAction* _tmp52_;
	GtkShortcut* _tmp53_;
	GtkShortcutController* _tmp54_;
	GtkShortcutTrigger* _tmp55_;
	GtkNamedAction* _tmp56_;
	GtkShortcut* _tmp57_;
	GtkShortcutController* _tmp58_;
	GtkShortcutTrigger* _tmp59_;
	GtkNamedAction* _tmp60_;
	GtkShortcut* _tmp61_;
	GtkShortcutController* _tmp62_;
	GtkShortcutTrigger* _tmp63_;
	GtkNamedAction* _tmp64_;
	GtkShortcut* _tmp65_;
	GtkShortcutController* _tmp66_;
	GtkShortcutTrigger* _tmp67_;
	GtkNamedAction* _tmp68_;
	GtkShortcut* _tmp69_;
	GtkShortcutController* _tmp70_;
	GtkShortcutTrigger* _tmp71_;
	GtkNamedAction* _tmp72_;
	GtkShortcut* _tmp73_;
	GtkShortcutController* _tmp74_;
	GtkShortcutTrigger* _tmp75_;
	GtkNamedAction* _tmp76_;
	GtkShortcut* _tmp77_;
	GtkShortcutController* _tmp78_;
	GtkEventController* _tmp79_;
	parent_class = G_OBJECT_CLASS (tuba_views_timeline_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_TYPE_TIMELINE, TubaViewsTimeline);
	tuba_views_base_set_empty_state_title ((TubaViewsBase*) self, _ ("No Posts"));
	_tmp0_ = g_strdup ("osd");
	_tmp1_ = g_strdup ("circular-spinner");
	_tmp2_ = g_new0 (gchar*, 2 + 1);
	_tmp2_[0] = _tmp0_;
	_tmp2_[1] = _tmp1_;
	_tmp3_ = (AdwSpinner*) adw_spinner_new ();
	g_object_set ((GtkWidget*) _tmp3_, "height-request", 32, NULL);
	g_object_set ((GtkWidget*) _tmp3_, "width-request", 32, NULL);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp3_, 32);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp3_, 32);
	gtk_widget_set_halign ((GtkWidget*) _tmp3_, GTK_ALIGN_CENTER);
	gtk_widget_set_valign ((GtkWidget*) _tmp3_, GTK_ALIGN_START);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp3_, _tmp2_);
	_tmp2_ = (_vala_array_free (_tmp2_, 2, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->pull_to_refresh_spinner);
	self->priv->pull_to_refresh_spinner = _tmp3_;
	g_signal_connect_object ((TubaViewsContentBase*) self, "reached-close-to-top", (GCallback) _tuba_views_timeline_finish_queue_tuba_views_content_base_reached_close_to_top, self, 0);
	_tmp4_ = tuba_app;
	g_signal_connect_object (_tmp4_, "refresh", (GCallback) _tuba_views_timeline_refresh_if_mapped_tuba_application_refresh, self, 0);
	_tmp5_ = ((TubaViewsBase*) self)->status_button;
	g_signal_connect_object (_tmp5_, "clicked", (GCallback) _tuba_views_timeline_on_manual_refresh_gtk_button_clicked, self, 0);
	tuba_account_holder_construct_account_holder ((TubaAccountHolder*) self);
	tuba_streamable_construct_streamable ((TubaStreamable*) self);
	_tmp6_ = g_strconcat ("stream-event::", TUBA_INSTANCE_ACCOUNT_EVENT_NEW_POST, NULL);
	g_signal_connect_object ((TubaStreamable*) self, _tmp6_, (GCallback) _tuba_views_timeline_on_new_post_tuba_streamable_stream_event, self, 0);
	_g_free0 (_tmp6_);
	_tmp7_ = tuba_views_timeline_get_accepts (self);
	_tmp8_ = _tmp7_;
	if (_tmp8_ == TUBA_API_TYPE_STATUS) {
		gchar* _tmp9_;
		gchar* _tmp10_;
		_tmp9_ = g_strconcat ("stream-event::", TUBA_INSTANCE_ACCOUNT_EVENT_EDIT_POST, NULL);
		g_signal_connect_object ((TubaStreamable*) self, _tmp9_, (GCallback) _tuba_views_timeline_on_edit_post_tuba_streamable_stream_event, self, 0);
		_g_free0 (_tmp9_);
		_tmp10_ = g_strconcat ("stream-event::", TUBA_INSTANCE_ACCOUNT_EVENT_DELETE_POST, NULL);
		g_signal_connect_object ((TubaStreamable*) self, _tmp10_, (GCallback) _tuba_views_timeline_on_delete_post_tuba_streamable_stream_event, self, 0);
		_g_free0 (_tmp10_);
	}
	_tmp11_ = tuba_settings;
	g_signal_connect_object ((GObject*) _tmp11_, "notify::show-spoilers", (GCallback) _tuba_views_timeline_on_refresh_g_object_notify, self, 0);
	_tmp12_ = tuba_settings;
	g_signal_connect_object ((GObject*) _tmp12_, "notify::show-preview-cards", (GCallback) _tuba_views_timeline_on_refresh_g_object_notify, self, 0);
	_tmp13_ = tuba_settings;
	g_signal_connect_object ((GObject*) _tmp13_, "notify::enlarge-custom-emojis", (GCallback) _tuba_views_timeline_on_refresh_g_object_notify, self, 0);
	_tmp14_ = ((TubaViewsContentBase*) self)->content;
	_tmp15_ = ((TubaViewsContentBase*) self)->model;
	gtk_list_box_bind_model (_tmp14_, (GListModel*) _tmp15_, _tuba_views_content_base_on_create_model_widget_gtk_list_box_create_widget_func, g_object_ref ((TubaViewsContentBase*) self), g_object_unref);
	_tmp16_ = (GtkGestureDrag*) gtk_gesture_drag_new ();
	drag = _tmp16_;
	_tmp17_ = drag;
	g_signal_connect_object (_tmp17_, "drag-update", (GCallback) _tuba_views_timeline_on_drag_update_gtk_gesture_drag_drag_update, self, 0);
	_tmp18_ = drag;
	g_signal_connect_object (_tmp18_, "drag-end", (GCallback) _tuba_views_timeline_on_drag_end_gtk_gesture_drag_drag_end, self, 0);
	_tmp19_ = drag;
	_tmp20_ = _g_object_ref0 ((GtkEventController*) _tmp19_);
	gtk_widget_add_controller ((GtkWidget*) self, _tmp20_);
	_tmp21_ = (GtkShortcutController*) gtk_shortcut_controller_new ();
	shortcutscontroller = _tmp21_;
	_tmp22_ = shortcutscontroller;
	_tmp23_ = gtk_shortcut_trigger_parse_string ("<Ctrl>0");
	_tmp24_ = (GtkNamedAction*) gtk_named_action_new ("app.reset-font-size");
	_tmp25_ = gtk_shortcut_new (_tmp23_, (GtkShortcutAction*) _tmp24_);
	gtk_shortcut_controller_add_shortcut (_tmp22_, _tmp25_);
	_tmp26_ = shortcutscontroller;
	_tmp27_ = gtk_shortcut_trigger_parse_string ("<Ctrl>KP_0");
	_tmp28_ = (GtkNamedAction*) gtk_named_action_new ("app.reset-font-size");
	_tmp29_ = gtk_shortcut_new (_tmp27_, (GtkShortcutAction*) _tmp28_);
	gtk_shortcut_controller_add_shortcut (_tmp26_, _tmp29_);
	_tmp30_ = shortcutscontroller;
	_tmp31_ = gtk_shortcut_trigger_parse_string ("<Ctrl>plus");
	_tmp32_ = (GtkNamedAction*) gtk_named_action_new ("app.increase-font-size");
	_tmp33_ = gtk_shortcut_new (_tmp31_, (GtkShortcutAction*) _tmp32_);
	gtk_shortcut_controller_add_shortcut (_tmp30_, _tmp33_);
	_tmp34_ = shortcutscontroller;
	_tmp35_ = gtk_shortcut_trigger_parse_string ("<Ctrl><Shift>plus");
	_tmp36_ = (GtkNamedAction*) gtk_named_action_new ("app.increase-font-size");
	_tmp37_ = gtk_shortcut_new (_tmp35_, (GtkShortcutAction*) _tmp36_);
	gtk_shortcut_controller_add_shortcut (_tmp34_, _tmp37_);
	_tmp38_ = shortcutscontroller;
	_tmp39_ = gtk_shortcut_trigger_parse_string ("<Ctrl>equal");
	_tmp40_ = (GtkNamedAction*) gtk_named_action_new ("app.increase-font-size");
	_tmp41_ = gtk_shortcut_new (_tmp39_, (GtkShortcutAction*) _tmp40_);
	gtk_shortcut_controller_add_shortcut (_tmp38_, _tmp41_);
	_tmp42_ = shortcutscontroller;
	_tmp43_ = gtk_shortcut_trigger_parse_string ("<Ctrl><Shift>equal");
	_tmp44_ = (GtkNamedAction*) gtk_named_action_new ("app.increase-font-size");
	_tmp45_ = gtk_shortcut_new (_tmp43_, (GtkShortcutAction*) _tmp44_);
	gtk_shortcut_controller_add_shortcut (_tmp42_, _tmp45_);
	_tmp46_ = shortcutscontroller;
	_tmp47_ = gtk_shortcut_trigger_parse_string ("<Ctrl>KP_Add");
	_tmp48_ = (GtkNamedAction*) gtk_named_action_new ("app.increase-font-size");
	_tmp49_ = gtk_shortcut_new (_tmp47_, (GtkShortcutAction*) _tmp48_);
	gtk_shortcut_controller_add_shortcut (_tmp46_, _tmp49_);
	_tmp50_ = shortcutscontroller;
	_tmp51_ = gtk_shortcut_trigger_parse_string ("<Ctrl><Shift>KP_Add");
	_tmp52_ = (GtkNamedAction*) gtk_named_action_new ("app.increase-font-size");
	_tmp53_ = gtk_shortcut_new (_tmp51_, (GtkShortcutAction*) _tmp52_);
	gtk_shortcut_controller_add_shortcut (_tmp50_, _tmp53_);
	_tmp54_ = shortcutscontroller;
	_tmp55_ = gtk_shortcut_trigger_parse_string ("<Ctrl>minus");
	_tmp56_ = (GtkNamedAction*) gtk_named_action_new ("app.decrease-font-size");
	_tmp57_ = gtk_shortcut_new (_tmp55_, (GtkShortcutAction*) _tmp56_);
	gtk_shortcut_controller_add_shortcut (_tmp54_, _tmp57_);
	_tmp58_ = shortcutscontroller;
	_tmp59_ = gtk_shortcut_trigger_parse_string ("<Ctrl><Shift>minus");
	_tmp60_ = (GtkNamedAction*) gtk_named_action_new ("app.decrease-font-size");
	_tmp61_ = gtk_shortcut_new (_tmp59_, (GtkShortcutAction*) _tmp60_);
	gtk_shortcut_controller_add_shortcut (_tmp58_, _tmp61_);
	_tmp62_ = shortcutscontroller;
	_tmp63_ = gtk_shortcut_trigger_parse_string ("<Ctrl>underscore");
	_tmp64_ = (GtkNamedAction*) gtk_named_action_new ("app.decrease-font-size");
	_tmp65_ = gtk_shortcut_new (_tmp63_, (GtkShortcutAction*) _tmp64_);
	gtk_shortcut_controller_add_shortcut (_tmp62_, _tmp65_);
	_tmp66_ = shortcutscontroller;
	_tmp67_ = gtk_shortcut_trigger_parse_string ("<Ctrl><Shift>underscore");
	_tmp68_ = (GtkNamedAction*) gtk_named_action_new ("app.decrease-font-size");
	_tmp69_ = gtk_shortcut_new (_tmp67_, (GtkShortcutAction*) _tmp68_);
	gtk_shortcut_controller_add_shortcut (_tmp66_, _tmp69_);
	_tmp70_ = shortcutscontroller;
	_tmp71_ = gtk_shortcut_trigger_parse_string ("<Ctrl>KP_Subtract");
	_tmp72_ = (GtkNamedAction*) gtk_named_action_new ("app.decrease-font-size");
	_tmp73_ = gtk_shortcut_new (_tmp71_, (GtkShortcutAction*) _tmp72_);
	gtk_shortcut_controller_add_shortcut (_tmp70_, _tmp73_);
	_tmp74_ = shortcutscontroller;
	_tmp75_ = gtk_shortcut_trigger_parse_string ("<Ctrl><Shift>KP_Subtract");
	_tmp76_ = (GtkNamedAction*) gtk_named_action_new ("app.decrease-font-size");
	_tmp77_ = gtk_shortcut_new (_tmp75_, (GtkShortcutAction*) _tmp76_);
	gtk_shortcut_controller_add_shortcut (_tmp74_, _tmp77_);
	_tmp78_ = shortcutscontroller;
	_tmp79_ = _g_object_ref0 ((GtkEventController*) _tmp78_);
	gtk_widget_add_controller ((GtkWidget*) self, _tmp79_);
	tuba_views_timeline_update_time_signal (self);
	_g_object_unref0 (shortcutscontroller);
	_g_object_unref0 (drag);
	return obj;
}

static void
tuba_views_timeline_class_init (TubaViewsTimelineClass * klass,
                                gpointer klass_data)
{
	GType* _tmp0_;
	tuba_views_timeline_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaViewsTimeline_private_offset);
	((TubaViewsBaseClass *) klass)->unbind_listboxes = (void (*) (TubaViewsBase*)) tuba_views_timeline_real_unbind_listboxes;
	((GObjectClass *) klass)->dispose = (void (*) (GObject*)) tuba_views_timeline_real_dispose;
	((TubaViewsBaseClass *) klass)->clear = (void (*) (TubaViewsBase*)) tuba_views_timeline_real_clear;
	((TubaViewsContentBaseClass *) klass)->clear_all_but_first = (void (*) (TubaViewsContentBase*, gint)) tuba_views_timeline_real_clear_all_but_first;
	((TubaViewsTimelineClass *) klass)->get_req_url = (gchar* (*) (TubaViewsTimeline*)) tuba_views_timeline_real_get_req_url;
	((TubaViewsTimelineClass *) klass)->append_params_v2 = (void (*) (TubaViewsTimeline*, TubaRequestV2*)) tuba_views_timeline_real_append_params_v2;
	((TubaViewsTimelineClass *) klass)->on_request_finish = (void (*) (TubaViewsTimeline*)) tuba_views_timeline_real_on_request_finish;
	((TubaViewsTimelineClass *) klass)->request = (void (*) (TubaViewsTimeline*, GAsyncReadyCallback, gpointer)) tuba_views_timeline_real_request;
	((TubaViewsTimelineClass *) klass)->request_finish = (void (*) (TubaViewsTimeline*, GAsyncResult*)) tuba_views_timeline_real_request_finish;
	((TubaViewsBaseClass *) klass)->on_error = (void (*) (TubaViewsBase*, gint32, const gchar*)) tuba_views_timeline_real_on_error;
	((TubaViewsTimelineClass *) klass)->on_refresh = (void (*) (TubaViewsTimeline*)) tuba_views_timeline_real_on_refresh;
	((TubaViewsTimelineClass *) klass)->on_manual_refresh = (void (*) (TubaViewsTimeline*)) tuba_views_timeline_real_on_manual_refresh;
	((TubaViewsTimelineClass *) klass)->on_account_changed = (void (*) (TubaViewsTimeline*, TubaInstanceAccount*)) tuba_views_timeline_real_on_account_changed;
	((TubaViewsContentBaseClass *) klass)->on_bottom_reached = (void (*) (TubaViewsContentBase*)) tuba_views_timeline_real_on_bottom_reached;
	((TubaViewsTimelineClass *) klass)->get_stream_url = (gchar* (*) (TubaViewsTimeline*)) tuba_views_timeline_real_get_stream_url;
	((TubaViewsTimelineClass *) klass)->should_hide = (gboolean (*) (TubaViewsTimeline*, TubaEntity*)) tuba_views_timeline_real_should_hide;
	((TubaViewsTimelineClass *) klass)->on_new_post = (void (*) (TubaViewsTimeline*, TubaStreamableEvent*)) tuba_views_timeline_real_on_new_post;
	((TubaViewsTimelineClass *) klass)->on_edit_post = (void (*) (TubaViewsTimeline*, TubaStreamableEvent*)) tuba_views_timeline_real_on_edit_post;
	((TubaViewsTimelineClass *) klass)->on_delete_post = (void (*) (TubaViewsTimeline*, TubaStreamableEvent*)) tuba_views_timeline_real_on_delete_post;
	((TubaViewsTimelineClass *) klass)->on_remove_user = (void (*) (TubaViewsTimeline*, const gchar*)) tuba_views_timeline_real_on_remove_user;
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_views_timeline_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_views_timeline_set_property;
	G_OBJECT_CLASS (klass)->constructor = tuba_views_timeline_constructor;
	G_OBJECT_CLASS (klass)->finalize = tuba_views_timeline_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_TIMELINE_URL_PROPERTY, tuba_views_timeline_properties[TUBA_VIEWS_TIMELINE_URL_PROPERTY] = g_param_spec_string ("url", "url", "url", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_TIMELINE_IS_PUBLIC_PROPERTY, tuba_views_timeline_properties[TUBA_VIEWS_TIMELINE_IS_PUBLIC_PROPERTY] = g_param_spec_boolean ("is-public", "is-public", "is-public", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_TIMELINE_ACCEPTS_PROPERTY, tuba_views_timeline_properties[TUBA_VIEWS_TIMELINE_ACCEPTS_PROPERTY] = g_param_spec_gtype ("accepts", "accepts", "accepts", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_TIMELINE_USE_QUEUE_PROPERTY, tuba_views_timeline_properties[TUBA_VIEWS_TIMELINE_USE_QUEUE_PROPERTY] = g_param_spec_boolean ("use-queue", "use-queue", "use-queue", TRUE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_TIMELINE_BATCH_SIZE_MIN_PROPERTY, tuba_views_timeline_properties[TUBA_VIEWS_TIMELINE_BATCH_SIZE_MIN_PROPERTY] = g_param_spec_int ("batch-size-min", "batch-size-min", "batch-size-min", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_TIMELINE_ACCOUNT_PROPERTY, tuba_views_timeline_properties[TUBA_VIEWS_TIMELINE_ACCOUNT_PROPERTY] = g_param_spec_object ("account", "account", "account", TUBA_TYPE_INSTANCE_ACCOUNT, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_TIMELINE_FORCE_AT_LEAST_MIN_PROPERTY, tuba_views_timeline_properties[TUBA_VIEWS_TIMELINE_FORCE_AT_LEAST_MIN_PROPERTY] = g_param_spec_boolean ("force-at-least-min", "force-at-least-min", "force-at-least-min", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_TIMELINE_IS_LAST_PAGE_PROPERTY, tuba_views_timeline_properties[TUBA_VIEWS_TIMELINE_IS_LAST_PAGE_PROPERTY] = g_param_spec_boolean ("is-last-page", "is-last-page", "is-last-page", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_TIMELINE_PAGE_NEXT_PROPERTY, tuba_views_timeline_properties[TUBA_VIEWS_TIMELINE_PAGE_NEXT_PROPERTY] = g_param_spec_string ("page-next", "page-next", "page-next", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_TIMELINE_PAGE_PREV_PROPERTY, tuba_views_timeline_properties[TUBA_VIEWS_TIMELINE_PAGE_PREV_PROPERTY] = g_param_spec_string ("page-prev", "page-prev", "page-prev", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_TIMELINE_ENTITY_QUEUE_SIZE_PROPERTY, tuba_views_timeline_properties[TUBA_VIEWS_TIMELINE_ENTITY_QUEUE_SIZE_PROPERTY] = g_param_spec_int ("entity-queue-size", "entity-queue-size", "entity-queue-size", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_TIMELINE_HAS_FINISHED_REQUEST_PROPERTY, tuba_views_timeline_properties[TUBA_VIEWS_TIMELINE_HAS_FINISHED_REQUEST_PROPERTY] = g_param_spec_boolean ("has-finished-request", "has-finished-request", "has-finished-request", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_TIMELINE_REQUEST_CANCELLABLE_PROPERTY, tuba_views_timeline_properties[TUBA_VIEWS_TIMELINE_REQUEST_CANCELLABLE_PROPERTY] = g_param_spec_object ("request-cancellable", "request-cancellable", "request-cancellable", g_cancellable_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_TIMELINE_T_CONNECTION_URL_PROPERTY, tuba_views_timeline_properties[TUBA_VIEWS_TIMELINE_T_CONNECTION_URL_PROPERTY] = g_param_spec_string ("t-connection-url", "t-connection-url", "t-connection-url", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_TIMELINE_SUBSCRIBED_PROPERTY, tuba_views_timeline_properties[TUBA_VIEWS_TIMELINE_SUBSCRIBED_PROPERTY] = g_param_spec_boolean ("subscribed", "subscribed", "subscribed", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	_tmp0_ = g_new0 (GType, 5);
	_tmp0_[0] = TUBA_API_TYPE_STATUS;
	_tmp0_[1] = TUBA_API_TYPE_CONVERSATION;
	_tmp0_[2] = TUBA_API_TYPE_ANNOUNCEMENT;
	_tmp0_[3] = TUBA_API_GROUPED_NOTIFICATIONS_RESULTS_TYPE_NOTIFICATION_GROUP;
	_tmp0_[4] = TUBA_API_TYPE_NOTIFICATION;
	tuba_views_timeline_acceptable_time_types = _tmp0_;
	tuba_views_timeline_acceptable_time_types_length1 = 5;
	_tuba_views_timeline_acceptable_time_types_size_ = tuba_views_timeline_acceptable_time_types_length1;
}

static void
tuba_views_timeline_tuba_account_holder_interface_init (TubaAccountHolderIface * iface,
                                                        gpointer iface_data)
{
	tuba_views_timeline_tuba_account_holder_parent_iface = g_type_interface_peek_parent (iface);
	iface->on_account_changed = (void (*) (TubaAccountHolder*, TubaInstanceAccount*)) tuba_views_timeline_on_account_changed;
	iface->get_account = tuba_views_timeline_real_get_account;
	iface->set_account = tuba_views_timeline_real_set_account;
}

static void
tuba_views_timeline_tuba_streamable_interface_init (TubaStreamableIface * iface,
                                                    gpointer iface_data)
{
	tuba_views_timeline_tuba_streamable_parent_iface = g_type_interface_peek_parent (iface);
	iface->on_streaming_policy_changed = (void (*) (TubaStreamable*)) tuba_views_timeline_real_on_streaming_policy_changed;
	iface->get_stream_url = (gchar* (*) (TubaStreamable*)) tuba_views_timeline_get_stream_url;
	iface->get_t_connection_url = tuba_views_timeline_real_get_t_connection_url;
	iface->set_t_connection_url = tuba_views_timeline_real_set_t_connection_url;
	iface->get_subscribed = tuba_views_timeline_real_get_subscribed;
	iface->set_subscribed = tuba_views_timeline_real_set_subscribed;
}

static void
tuba_views_timeline_instance_init (TubaViewsTimeline * self,
                                   gpointer klass)
{
	TubaEntity** _tmp0_;
	self->priv = tuba_views_timeline_get_instance_private (self);
	self->priv->_is_public = FALSE;
	self->priv->_accepts = TUBA_API_TYPE_STATUS;
	self->priv->_use_queue = TRUE;
	self->priv->_batch_size_min = 10;
	self->priv->_account = NULL;
	self->priv->_force_at_least_min = FALSE;
	self->priv->_is_last_page = FALSE;
	_tmp0_ = g_new0 (TubaEntity*, 0 + 1);
	self->priv->entity_queue = _tmp0_;
	self->priv->entity_queue_length1 = 0;
	self->priv->_entity_queue_size_ = self->priv->entity_queue_length1;
	self->priv->_entity_queue_size = 0;
	self->priv->_is_pulling = FALSE;
	self->priv->_has_finished_request = FALSE;
	self->priv->_request_cancellable = NULL;
}

static void
tuba_views_timeline_finalize (GObject * obj)
{
	TubaViewsTimeline * self;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	GtkListBox* _tmp5_;
	TubaEntity** _tmp6_;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_TYPE_TIMELINE, TubaViewsTimeline);
	_tmp0_ = tuba_views_base_get_label ((TubaViewsBase*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = string_to_string (_tmp1_);
	_tmp3_ = g_strconcat ("Destroying Timeline ", _tmp2_, NULL);
	_tmp4_ = _tmp3_;
	g_debug ("Timeline.vala:196: %s", _tmp4_);
	_g_free0 (_tmp4_);
	tuba_account_holder_destruct_account_holder ((TubaAccountHolder*) self);
	tuba_streamable_destruct_streamable ((TubaStreamable*) self);
	_tmp5_ = ((TubaViewsContentBase*) self)->content;
	gtk_list_box_bind_model (_tmp5_, NULL, NULL, NULL, NULL);
	_tmp6_ = g_new0 (TubaEntity*, 0 + 1);
	self->priv->entity_queue = (_vala_array_free (self->priv->entity_queue, self->priv->entity_queue_length1, (GDestroyNotify) g_object_unref), NULL);
	self->priv->entity_queue = _tmp6_;
	self->priv->entity_queue_length1 = 0;
	self->priv->_entity_queue_size_ = self->priv->entity_queue_length1;
	tuba_views_timeline_set_entity_queue_size (self, 0);
	_g_free0 (self->priv->_url);
	_g_object_unref0 (self->priv->_account);
	_g_free0 (self->priv->_page_next);
	_g_free0 (self->priv->_page_prev);
	self->priv->entity_queue = (_vala_array_free (self->priv->entity_queue, self->priv->entity_queue_length1, (GDestroyNotify) g_object_unref), NULL);
	_g_object_unref0 (self->priv->pull_to_refresh_spinner);
	_g_object_unref0 (self->priv->_request_cancellable);
	_g_free0 (self->priv->_t_connection_url);
	G_OBJECT_CLASS (tuba_views_timeline_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_views_timeline_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaViewsTimelineClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_views_timeline_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaViewsTimeline), 0, (GInstanceInitFunc) tuba_views_timeline_instance_init, NULL };
	static const GInterfaceInfo tuba_account_holder_info = { (GInterfaceInitFunc) tuba_views_timeline_tuba_account_holder_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo tuba_streamable_info = { (GInterfaceInitFunc) tuba_views_timeline_tuba_streamable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType tuba_views_timeline_type_id;
	tuba_views_timeline_type_id = g_type_register_static (TUBA_VIEWS_TYPE_CONTENT_BASE, "TubaViewsTimeline", &g_define_type_info, G_TYPE_FLAG_NONE);
	g_type_add_interface_static (tuba_views_timeline_type_id, TUBA_TYPE_ACCOUNT_HOLDER, &tuba_account_holder_info);
	g_type_add_interface_static (tuba_views_timeline_type_id, TUBA_TYPE_STREAMABLE, &tuba_streamable_info);
	TubaViewsTimeline_private_offset = g_type_add_instance_private (tuba_views_timeline_type_id, sizeof (TubaViewsTimelinePrivate));
	return tuba_views_timeline_type_id;
}

GType
tuba_views_timeline_get_type (void)
{
	static GType tuba_views_timeline_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_views_timeline_type_id__once)) {
		GType tuba_views_timeline_type_id;
		tuba_views_timeline_type_id = tuba_views_timeline_get_type_once ();
		g_once_init_leave_pointer (&tuba_views_timeline_type_id__once, tuba_views_timeline_type_id);
	}
	return tuba_views_timeline_type_id__once;
}

static void
_vala_tuba_views_timeline_get_property (GObject * object,
                                        guint property_id,
                                        GValue * value,
                                        GParamSpec * pspec)
{
	TubaViewsTimeline * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_VIEWS_TYPE_TIMELINE, TubaViewsTimeline);
	switch (property_id) {
		case TUBA_VIEWS_TIMELINE_URL_PROPERTY:
		g_value_set_string (value, tuba_views_timeline_get_url (self));
		break;
		case TUBA_VIEWS_TIMELINE_IS_PUBLIC_PROPERTY:
		g_value_set_boolean (value, tuba_views_timeline_get_is_public (self));
		break;
		case TUBA_VIEWS_TIMELINE_ACCEPTS_PROPERTY:
		g_value_set_gtype (value, tuba_views_timeline_get_accepts (self));
		break;
		case TUBA_VIEWS_TIMELINE_USE_QUEUE_PROPERTY:
		g_value_set_boolean (value, tuba_views_timeline_get_use_queue (self));
		break;
		case TUBA_VIEWS_TIMELINE_BATCH_SIZE_MIN_PROPERTY:
		g_value_set_int (value, tuba_views_timeline_get_batch_size_min (self));
		break;
		case TUBA_VIEWS_TIMELINE_ACCOUNT_PROPERTY:
		g_value_set_object (value, tuba_account_holder_get_account ((TubaAccountHolder*) self));
		break;
		case TUBA_VIEWS_TIMELINE_FORCE_AT_LEAST_MIN_PROPERTY:
		g_value_set_boolean (value, tuba_views_timeline_get_force_at_least_min (self));
		break;
		case TUBA_VIEWS_TIMELINE_IS_LAST_PAGE_PROPERTY:
		g_value_set_boolean (value, tuba_views_timeline_get_is_last_page (self));
		break;
		case TUBA_VIEWS_TIMELINE_PAGE_NEXT_PROPERTY:
		g_value_set_string (value, tuba_views_timeline_get_page_next (self));
		break;
		case TUBA_VIEWS_TIMELINE_PAGE_PREV_PROPERTY:
		g_value_set_string (value, tuba_views_timeline_get_page_prev (self));
		break;
		case TUBA_VIEWS_TIMELINE_ENTITY_QUEUE_SIZE_PROPERTY:
		g_value_set_int (value, tuba_views_timeline_get_entity_queue_size (self));
		break;
		case TUBA_VIEWS_TIMELINE_HAS_FINISHED_REQUEST_PROPERTY:
		g_value_set_boolean (value, tuba_views_timeline_get_has_finished_request (self));
		break;
		case TUBA_VIEWS_TIMELINE_REQUEST_CANCELLABLE_PROPERTY:
		g_value_set_object (value, tuba_views_timeline_get_request_cancellable (self));
		break;
		case TUBA_VIEWS_TIMELINE_T_CONNECTION_URL_PROPERTY:
		g_value_set_string (value, tuba_streamable_get_t_connection_url ((TubaStreamable*) self));
		break;
		case TUBA_VIEWS_TIMELINE_SUBSCRIBED_PROPERTY:
		g_value_set_boolean (value, tuba_streamable_get_subscribed ((TubaStreamable*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_views_timeline_set_property (GObject * object,
                                        guint property_id,
                                        const GValue * value,
                                        GParamSpec * pspec)
{
	TubaViewsTimeline * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_VIEWS_TYPE_TIMELINE, TubaViewsTimeline);
	switch (property_id) {
		case TUBA_VIEWS_TIMELINE_URL_PROPERTY:
		tuba_views_timeline_set_url (self, g_value_get_string (value));
		break;
		case TUBA_VIEWS_TIMELINE_IS_PUBLIC_PROPERTY:
		tuba_views_timeline_set_is_public (self, g_value_get_boolean (value));
		break;
		case TUBA_VIEWS_TIMELINE_ACCEPTS_PROPERTY:
		tuba_views_timeline_set_accepts (self, g_value_get_gtype (value));
		break;
		case TUBA_VIEWS_TIMELINE_USE_QUEUE_PROPERTY:
		tuba_views_timeline_set_use_queue (self, g_value_get_boolean (value));
		break;
		case TUBA_VIEWS_TIMELINE_BATCH_SIZE_MIN_PROPERTY:
		tuba_views_timeline_set_batch_size_min (self, g_value_get_int (value));
		break;
		case TUBA_VIEWS_TIMELINE_ACCOUNT_PROPERTY:
		tuba_account_holder_set_account ((TubaAccountHolder*) self, g_value_get_object (value));
		break;
		case TUBA_VIEWS_TIMELINE_FORCE_AT_LEAST_MIN_PROPERTY:
		tuba_views_timeline_set_force_at_least_min (self, g_value_get_boolean (value));
		break;
		case TUBA_VIEWS_TIMELINE_IS_LAST_PAGE_PROPERTY:
		tuba_views_timeline_set_is_last_page (self, g_value_get_boolean (value));
		break;
		case TUBA_VIEWS_TIMELINE_PAGE_NEXT_PROPERTY:
		tuba_views_timeline_set_page_next (self, g_value_get_string (value));
		break;
		case TUBA_VIEWS_TIMELINE_PAGE_PREV_PROPERTY:
		tuba_views_timeline_set_page_prev (self, g_value_get_string (value));
		break;
		case TUBA_VIEWS_TIMELINE_ENTITY_QUEUE_SIZE_PROPERTY:
		tuba_views_timeline_set_entity_queue_size (self, g_value_get_int (value));
		break;
		case TUBA_VIEWS_TIMELINE_HAS_FINISHED_REQUEST_PROPERTY:
		tuba_views_timeline_set_has_finished_request (self, g_value_get_boolean (value));
		break;
		case TUBA_VIEWS_TIMELINE_REQUEST_CANCELLABLE_PROPERTY:
		tuba_views_timeline_set_request_cancellable (self, g_value_get_object (value));
		break;
		case TUBA_VIEWS_TIMELINE_T_CONNECTION_URL_PROPERTY:
		tuba_streamable_set_t_connection_url ((TubaStreamable*) self, g_value_get_string (value));
		break;
		case TUBA_VIEWS_TIMELINE_SUBSCRIBED_PROPERTY:
		tuba_streamable_set_subscribed ((TubaStreamable*) self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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);
}

static gssize
_vala_array_length (gpointer array)
{
	gssize length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}

