/* Notifications.c generated by valac 0.56.19, the Vala compiler
 * generated from Notifications.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_NOTIFICATION "notification"
#define TUBA_INSTANCE_ACCOUNT_EVENT_NOTIFICATIONS_MERGED "notifications_merged"
#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;

#define TUBA_VIEWS_TYPE_NOTIFICATIONS (tuba_views_notifications_get_type ())
#define TUBA_VIEWS_NOTIFICATIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_NOTIFICATIONS, TubaViewsNotifications))
#define TUBA_VIEWS_NOTIFICATIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_NOTIFICATIONS, TubaViewsNotificationsClass))
#define TUBA_VIEWS_IS_NOTIFICATIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_NOTIFICATIONS))
#define TUBA_VIEWS_IS_NOTIFICATIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_NOTIFICATIONS))
#define TUBA_VIEWS_NOTIFICATIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_NOTIFICATIONS, TubaViewsNotificationsClass))

typedef struct _TubaViewsNotifications TubaViewsNotifications;
typedef struct _TubaViewsNotificationsClass TubaViewsNotificationsClass;
typedef struct _TubaViewsNotificationsPrivate TubaViewsNotificationsPrivate;
enum  {
	TUBA_VIEWS_NOTIFICATIONS_0_PROPERTY,
	TUBA_VIEWS_NOTIFICATIONS_FILTERED_NOTIFICATIONS_PROPERTY,
	TUBA_VIEWS_NOTIFICATIONS_NUM_PROPERTIES
};
static GParamSpec* tuba_views_notifications_properties[TUBA_VIEWS_NOTIFICATIONS_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#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_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;

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

typedef struct _TubaSettings TubaSettings;
typedef struct _TubaSettingsClass TubaSettingsClass;

#define TUBA_VIEWS_TYPE_NOTIFICATION_REQUESTS (tuba_views_notification_requests_get_type ())
#define TUBA_VIEWS_NOTIFICATION_REQUESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_NOTIFICATION_REQUESTS, TubaViewsNotificationRequests))
#define TUBA_VIEWS_NOTIFICATION_REQUESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_NOTIFICATION_REQUESTS, TubaViewsNotificationRequestsClass))
#define TUBA_VIEWS_IS_NOTIFICATION_REQUESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_NOTIFICATION_REQUESTS))
#define TUBA_VIEWS_IS_NOTIFICATION_REQUESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_NOTIFICATION_REQUESTS))
#define TUBA_VIEWS_NOTIFICATION_REQUESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_NOTIFICATION_REQUESTS, TubaViewsNotificationRequestsClass))

typedef struct _TubaViewsNotificationRequests TubaViewsNotificationRequests;
typedef struct _TubaViewsNotificationRequestsClass TubaViewsNotificationRequestsClass;

#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_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 TUBA_API_INSTANCE_V2_TYPE_API_VERSIONS (tuba_api_instance_v2_api_versions_get_type ())
#define TUBA_API_INSTANCE_V2_API_VERSIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_INSTANCE_V2_TYPE_API_VERSIONS, TubaAPIInstanceV2APIVersions))
#define TUBA_API_INSTANCE_V2_API_VERSIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_INSTANCE_V2_TYPE_API_VERSIONS, TubaAPIInstanceV2APIVersionsClass))
#define TUBA_API_INSTANCE_V2_IS_API_VERSIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_INSTANCE_V2_TYPE_API_VERSIONS))
#define TUBA_API_INSTANCE_V2_IS_API_VERSIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_INSTANCE_V2_TYPE_API_VERSIONS))
#define TUBA_API_INSTANCE_V2_API_VERSIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_INSTANCE_V2_TYPE_API_VERSIONS, TubaAPIInstanceV2APIVersionsClass))

typedef struct _TubaAPIInstanceV2APIVersions TubaAPIInstanceV2APIVersions;
typedef struct _TubaAPIInstanceV2APIVersionsClass TubaAPIInstanceV2APIVersionsClass;
typedef enum  {
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_NONE = 1 << 0,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_QUOTE = 1 << 1,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_EMOJI_REACTIONS = 1 << 2,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_BUBBLE = 1 << 3,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_GROUP_NOTIFICATIONS = 1 << 4,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_FEATURE_TAGS = 1 << 5,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_ENDORSE_USERS = 1 << 6,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_MUTUALS = 1 << 7,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_TRANSLATION = 1 << 8,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_ICESHRIMP = 1 << 9,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_GLITCH = 1 << 10,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_LOCAL_ONLY = 1 << 11,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_GOTOSOCIAL = 1 << 12
} TubaInstanceAccountInstanceFeatures;

#define TUBA_INSTANCE_ACCOUNT_TYPE_INSTANCE_FEATURES (tuba_instance_account_instance_features_get_type ())

#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_ACCOUNT_STORE (tuba_account_store_get_type ())
#define TUBA_ACCOUNT_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_ACCOUNT_STORE, TubaAccountStore))
#define TUBA_ACCOUNT_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_ACCOUNT_STORE, TubaAccountStoreClass))
#define TUBA_IS_ACCOUNT_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_ACCOUNT_STORE))
#define TUBA_IS_ACCOUNT_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_ACCOUNT_STORE))
#define TUBA_ACCOUNT_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_ACCOUNT_STORE, TubaAccountStoreClass))

typedef struct _TubaAccountStore TubaAccountStore;
typedef struct _TubaAccountStoreClass TubaAccountStoreClass;

#define TUBA_TYPE_PLACE (tuba_place_get_type ())
#define TUBA_PLACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_PLACE, TubaPlace))
#define TUBA_PLACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_PLACE, TubaPlaceClass))
#define TUBA_IS_PLACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_PLACE))
#define TUBA_IS_PLACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_PLACE))
#define TUBA_PLACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_PLACE, TubaPlaceClass))

typedef struct _TubaPlace TubaPlace;
typedef struct _TubaPlaceClass TubaPlaceClass;
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 ())

#define TUBA_TYPE_OOPSIE (tuba_oopsie_get_type ())
#define _soup_message_headers_unref0(var) ((var == NULL) ? NULL : (var = (soup_message_headers_unref (var), NULL)))

#define TUBA_TYPE_NETWORK (tuba_network_get_type ())
#define TUBA_NETWORK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_NETWORK, TubaNetwork))
#define TUBA_NETWORK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_NETWORK, TubaNetworkClass))
#define TUBA_IS_NETWORK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_NETWORK))
#define TUBA_IS_NETWORK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_NETWORK))
#define TUBA_NETWORK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_NETWORK, TubaNetworkClass))

typedef struct _TubaNetwork TubaNetwork;
typedef struct _TubaNetworkClass TubaNetworkClass;
#define __vala_JsonNode_free0(var) ((var == NULL) ? NULL : (var = (_vala_JsonNode_free (var), NULL)))

#define TUBA_API_TYPE_GROUPED_NOTIFICATIONS_RESULTS (tuba_api_grouped_notifications_results_get_type ())
#define TUBA_API_GROUPED_NOTIFICATIONS_RESULTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_GROUPED_NOTIFICATIONS_RESULTS, TubaAPIGroupedNotificationsResults))
#define TUBA_API_GROUPED_NOTIFICATIONS_RESULTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_GROUPED_NOTIFICATIONS_RESULTS, TubaAPIGroupedNotificationsResultsClass))
#define TUBA_API_IS_GROUPED_NOTIFICATIONS_RESULTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_GROUPED_NOTIFICATIONS_RESULTS))
#define TUBA_API_IS_GROUPED_NOTIFICATIONS_RESULTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_GROUPED_NOTIFICATIONS_RESULTS))
#define TUBA_API_GROUPED_NOTIFICATIONS_RESULTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_GROUPED_NOTIFICATIONS_RESULTS, TubaAPIGroupedNotificationsResultsClass))

typedef struct _TubaAPIGroupedNotificationsResults TubaAPIGroupedNotificationsResults;
typedef struct _TubaAPIGroupedNotificationsResultsClass TubaAPIGroupedNotificationsResultsClass;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _TubaViewsNotificationsRequestData TubaViewsNotificationsRequestData;

#define TUBA_API_NOTIFICATION_FILTER_TYPE_POLICY (tuba_api_notification_filter_policy_get_type ())
#define TUBA_API_NOTIFICATION_FILTER_POLICY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_NOTIFICATION_FILTER_TYPE_POLICY, TubaAPINotificationFilterPolicy))
#define TUBA_API_NOTIFICATION_FILTER_POLICY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_NOTIFICATION_FILTER_TYPE_POLICY, TubaAPINotificationFilterPolicyClass))
#define TUBA_API_NOTIFICATION_FILTER_IS_POLICY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_NOTIFICATION_FILTER_TYPE_POLICY))
#define TUBA_API_NOTIFICATION_FILTER_IS_POLICY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_NOTIFICATION_FILTER_TYPE_POLICY))
#define TUBA_API_NOTIFICATION_FILTER_POLICY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_NOTIFICATION_FILTER_TYPE_POLICY, TubaAPINotificationFilterPolicyClass))

typedef struct _TubaAPINotificationFilterPolicy TubaAPINotificationFilterPolicy;
typedef struct _TubaAPINotificationFilterPolicyClass TubaAPINotificationFilterPolicyClass;

#define TUBA_API_NOTIFICATION_FILTER_POLICY_TYPE_SUMMARY (tuba_api_notification_filter_policy_summary_get_type ())
#define TUBA_API_NOTIFICATION_FILTER_POLICY_SUMMARY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_NOTIFICATION_FILTER_POLICY_TYPE_SUMMARY, TubaAPINotificationFilterPolicySummary))
#define TUBA_API_NOTIFICATION_FILTER_POLICY_SUMMARY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_NOTIFICATION_FILTER_POLICY_TYPE_SUMMARY, TubaAPINotificationFilterPolicySummaryClass))
#define TUBA_API_NOTIFICATION_FILTER_POLICY_IS_SUMMARY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_NOTIFICATION_FILTER_POLICY_TYPE_SUMMARY))
#define TUBA_API_NOTIFICATION_FILTER_POLICY_IS_SUMMARY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_NOTIFICATION_FILTER_POLICY_TYPE_SUMMARY))
#define TUBA_API_NOTIFICATION_FILTER_POLICY_SUMMARY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_NOTIFICATION_FILTER_POLICY_TYPE_SUMMARY, TubaAPINotificationFilterPolicySummaryClass))

typedef struct _TubaAPINotificationFilterPolicySummary TubaAPINotificationFilterPolicySummary;
typedef struct _TubaAPINotificationFilterPolicySummaryClass TubaAPINotificationFilterPolicySummaryClass;
typedef struct _TubaViewsNotificationsUpdateFilteredNotificationsData TubaViewsNotificationsUpdateFilteredNotificationsData;

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 _TubaViewsNotifications {
	TubaViewsTimeline parent_instance;
	TubaViewsNotificationsPrivate * priv;
	TubaInstanceAccount* last_account;
};

struct _TubaViewsNotificationsClass {
	TubaViewsTimelineClass parent_class;
};

struct _TubaViewsNotificationsPrivate {
	GBinding* badge_number_binding;
	GBinding* filtered_notifications_count_binding;
	AdwBanner* notifications_filter_banner;
	gboolean enabled_group_notifications;
};

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 _TubaViewsNotificationsRequestData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaViewsNotifications* self;
	GCancellable* _tmp0_;
	GCancellable* _tmp1_;
	GCancellable* _tmp2_;
	GCancellable* _tmp3_;
	TubaRequestV2* req;
	gchar* _tmp4_;
	gchar* _tmp5_;
	TubaInstanceAccount* _tmp6_;
	TubaInstanceAccount* _tmp7_;
	TubaInstanceAccount* _tmp8_;
	TubaRequestV2* _tmp9_;
	TubaRequestV2* _tmp10_;
	TubaRequestV2* _tmp11_;
	GCancellable* _tmp12_;
	GCancellable* _tmp13_;
	TubaRequestV2* _tmp14_;
	GInputStream* in_stream;
	SoupMessageHeaders* response_headers;
	GInputStream* _tmp15_;
	TubaRequestV2* _tmp16_;
	SoupMessageHeaders* _tmp17_;
	GInputStream* _tmp18_;
	GInputStream* _tmp19_;
	JsonParser* parser;
	GInputStream* _tmp20_;
	JsonParser* _tmp21_;
	GCancellable* _tmp22_;
	GCancellable* _tmp23_;
	JsonNode* node;
	TubaNetwork* _tmp24_;
	JsonParser* _tmp25_;
	JsonNode* _tmp26_;
	JsonNode* _tmp27_;
	GObject** to_add;
	GObject** _tmp28_;
	gint to_add_length1;
	gint _to_add_size_;
	TubaAPIGroupedNotificationsResults* group_notifications;
	JsonNode* _tmp29_;
	TubaAPIGroupedNotificationsResults* _tmp30_;
	GeeArrayList* _group_list;
	TubaAPIGroupedNotificationsResults* _tmp31_;
	GeeArrayList* _tmp32_;
	GeeArrayList* _tmp33_;
	gint _group_size;
	GeeArrayList* _tmp34_;
	gint _tmp35_;
	gint _tmp36_;
	gint _group_index;
	gint _tmp37_;
	gint _tmp38_;
	TubaAPIGroupedNotificationsResultsNotificationGroup* group;
	GeeArrayList* _tmp39_;
	gpointer _tmp40_;
	GeeArrayList* group_accounts;
	GeeArrayList* _tmp41_;
	GeeArrayList* _account_list;
	TubaAPIGroupedNotificationsResults* _tmp42_;
	GeeArrayList* _tmp43_;
	GeeArrayList* _tmp44_;
	gint _account_size;
	GeeArrayList* _tmp45_;
	gint _tmp46_;
	gint _tmp47_;
	gint _account_index;
	gint _tmp48_;
	gint _tmp49_;
	TubaAPIAccount* account;
	GeeArrayList* _tmp50_;
	gpointer _tmp51_;
	TubaAPIGroupedNotificationsResultsNotificationGroup* _tmp52_;
	GeeArrayList* _tmp53_;
	GeeArrayList* _tmp54_;
	TubaAPIAccount* _tmp55_;
	const gchar* _tmp56_;
	const gchar* _tmp57_;
	GeeArrayList* _tmp58_;
	TubaAPIAccount* _tmp59_;
	TubaAPIGroupedNotificationsResultsNotificationGroup* _tmp60_;
	GeeArrayList* _tmp61_;
	TubaAPIGroupedNotificationsResultsNotificationGroup* _tmp62_;
	GeeArrayList* _tmp63_;
	GeeArrayList* _tmp64_;
	gint _tmp65_;
	gint _tmp66_;
	TubaAPIGroupedNotificationsResultsNotificationGroup* _tmp67_;
	TubaAPIGroupedNotificationsResultsNotificationGroup* _tmp68_;
	GeeArrayList* _tmp69_;
	GeeArrayList* _tmp70_;
	gpointer _tmp71_;
	TubaAPIAccount* _tmp72_;
	TubaAPIGroupedNotificationsResultsNotificationGroup* _tmp73_;
	const gchar* _tmp74_;
	const gchar* _tmp75_;
	GeeArrayList* _status_list;
	TubaAPIGroupedNotificationsResults* _tmp76_;
	GeeArrayList* _tmp77_;
	GeeArrayList* _tmp78_;
	gint _status_size;
	GeeArrayList* _tmp79_;
	gint _tmp80_;
	gint _tmp81_;
	gint _status_index;
	gint _tmp82_;
	gint _tmp83_;
	TubaAPIStatus* status;
	GeeArrayList* _tmp84_;
	gpointer _tmp85_;
	TubaAPIStatus* _tmp86_;
	const gchar* _tmp87_;
	const gchar* _tmp88_;
	TubaAPIGroupedNotificationsResultsNotificationGroup* _tmp89_;
	const gchar* _tmp90_;
	const gchar* _tmp91_;
	TubaAPIGroupedNotificationsResultsNotificationGroup* _tmp92_;
	TubaAPIStatus* _tmp93_;
	TubaAPIGroupedNotificationsResultsNotificationGroup* _tmp94_;
	TubaAPIGroupedNotificationsResultsNotificationGroup* _tmp95_;
	GObject* _tmp96_;
	GListStore* _tmp97_;
	GListStore* _tmp98_;
	GObject** _tmp99_;
	gint _tmp99__length1;
	SoupMessageHeaders* _tmp100_;
	SoupMessageHeaders* _tmp101_;
	const gchar* _tmp102_;
	GObject** _tmp103_;
	gint _tmp103__length1;
	GError* e;
	GError* _tmp104_;
	GError* _tmp105_;
	const gchar* _tmp106_;
	GError* _inner_error0_;
};

struct _TubaViewsNotificationsUpdateFilteredNotificationsData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaViewsNotifications* self;
	TubaRequestV2* req;
	TubaAccountStore* _tmp0_;
	TubaInstanceAccount* _tmp1_;
	TubaInstanceAccount* _tmp2_;
	TubaInstanceAccount* _tmp3_;
	TubaRequestV2* _tmp4_;
	GInputStream* in_stream;
	TubaRequestV2* _tmp5_;
	GInputStream* _tmp6_;
	JsonParser* parser;
	GInputStream* _tmp7_;
	JsonParser* _tmp8_;
	JsonNode* node;
	TubaNetwork* _tmp9_;
	JsonParser* _tmp10_;
	JsonNode* _tmp11_;
	JsonNode* _tmp12_;
	TubaAccountStore* _tmp13_;
	TubaInstanceAccount* _tmp14_;
	TubaInstanceAccount* _tmp15_;
	TubaAPINotificationFilterPolicy* policies;
	JsonNode* _tmp16_;
	TubaAPINotificationFilterPolicy* _tmp17_;
	TubaAPINotificationFilterPolicy* _tmp18_;
	TubaAPINotificationFilterPolicySummary* _tmp19_;
	TubaAPINotificationFilterPolicySummary* _tmp20_;
	TubaAccountStore* _tmp21_;
	TubaInstanceAccount* _tmp22_;
	TubaInstanceAccount* _tmp23_;
	TubaAPINotificationFilterPolicy* _tmp24_;
	TubaAPINotificationFilterPolicySummary* _tmp25_;
	TubaAPINotificationFilterPolicySummary* _tmp26_;
	gint32 _tmp27_;
	gint32 _tmp28_;
	GError* e;
	TubaAccountStore* _tmp29_;
	TubaInstanceAccount* _tmp30_;
	TubaInstanceAccount* _tmp31_;
	GError* _tmp32_;
	TubaAccountStore* _tmp33_;
	TubaInstanceAccount* _tmp34_;
	TubaInstanceAccount* _tmp35_;
	GError* _tmp36_;
	gchar* _tmp37_;
	gchar* _tmp38_;
	GError* _tmp39_;
	const gchar* _tmp40_;
	const gchar* _tmp41_;
	gchar* _tmp42_;
	gchar* _tmp43_;
	GError* _inner_error0_;
};

static gint TubaViewsNotifications_private_offset;
static gpointer tuba_views_notifications_parent_class = NULL;
VALA_EXTERN TubaApplication* tuba_app;
VALA_EXTERN TubaSettings* tuba_settings;
VALA_EXTERN TubaAccountStore* tuba_accounts;
VALA_EXTERN TubaPlace* tuba_mastodon_account_PLACE_NOTIFICATIONS;
VALA_EXTERN TubaNetwork* tuba_network;
static TubaAccountHolderIface * tuba_views_notifications_tuba_account_holder_parent_iface = NULL;
static TubaStreamableIface * tuba_views_notifications_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 GType tuba_views_notifications_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsNotifications, g_object_unref)
VALA_EXTERN void tuba_views_content_base_on_scrolled_vadjustment_value_change (TubaViewsContentBase* self);
VALA_EXTERN gboolean tuba_views_timeline_should_hide (TubaViewsTimeline* self,
                                          TubaEntity* entity);
VALA_EXTERN void tuba_views_timeline_on_account_changed (TubaViewsTimeline* self,
                                             TubaInstanceAccount* acc);
VALA_EXTERN void tuba_views_base_on_shown (TubaViewsBase* self);
VALA_EXTERN void tuba_views_base_on_hidden (TubaViewsBase* 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 gchar* tuba_views_timeline_get_stream_url (TubaViewsTimeline* self);
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);
static void _tuba_views_timeline_on_new_post_tuba_streamable_stream_event (TubaStreamable* _sender,
                                                                    TubaStreamableEvent* ev,
                                                                    gpointer self);
static void tuba_views_notifications_real_on_scrolled_vadjustment_value_change (TubaViewsContentBase* base);
VALA_EXTERN TubaInstanceAccount* tuba_account_holder_get_account (TubaAccountHolder* self);
VALA_EXTERN gint tuba_instance_account_get_unread_count (TubaInstanceAccount* self);
VALA_EXTERN gint tuba_instance_account_get_last_received_id (TubaInstanceAccount* self);
VALA_EXTERN gint tuba_instance_account_get_last_read_id (TubaInstanceAccount* self);
VALA_EXTERN void tuba_instance_account_read_notifications (TubaInstanceAccount* self,
                                               gint up_to_id,
                                               GAsyncReadyCallback _callback_,
                                               gpointer _user_data_);
VALA_EXTERN void tuba_instance_account_read_notifications_finish (TubaInstanceAccount* self,
                                                      GAsyncResult* _res_);
static void tuba_views_notifications_on_network_change (TubaViewsNotifications* self);
VALA_EXTERN GType tuba_application_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaApplication, g_object_unref)
VALA_EXTERN gboolean tuba_application_get_is_online (TubaApplication* self);
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 gboolean tuba_dialogs_main_window_get_is_home (TubaDialogsMainWindow* self);
VALA_EXTERN void tuba_views_timeline_on_refresh (TubaViewsTimeline* self);
static void tuba_views_notifications_settings_updated (TubaViewsNotifications* self);
VALA_EXTERN void tuba_toggle_css (GtkWidget* wdg,
                      gboolean state,
                      const gchar* style);
VALA_EXTERN GType tuba_settings_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaSettings, g_object_unref)
VALA_EXTERN gboolean tuba_settings_get_dim_trivial_notifications (TubaSettings* self);
static void tuba_views_notifications_on_notifications_filter_banner_button_clicked (TubaViewsNotifications* self);
VALA_EXTERN TubaViewsBase* tuba_dialogs_main_window_open_view (TubaDialogsMainWindow* self,
                                                   TubaViewsBase* view);
VALA_EXTERN TubaViewsNotificationRequests* tuba_views_notification_requests_new (void);
VALA_EXTERN TubaViewsNotificationRequests* tuba_views_notification_requests_construct (GType object_type);
VALA_EXTERN GType tuba_views_notification_requests_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsNotificationRequests, g_object_unref)
static gboolean tuba_views_notifications_real_should_hide (TubaViewsTimeline* base,
                                                    TubaEntity* entity);
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_status_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIStatus, g_object_unref)
VALA_EXTERN TubaAPIStatus* tuba_api_notification_get_status (TubaAPINotification* self);
static void tuba_views_notifications_real_on_account_changed (TubaAccountHolder* base,
                                                       TubaInstanceAccount* acc);
VALA_EXTERN GType tuba_api_instance_v2_api_versions_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIInstanceV2APIVersions, g_object_unref)
VALA_EXTERN TubaAPIInstanceV2APIVersions* tuba_instance_account_get_tuba_api_versions (TubaInstanceAccount* self);
VALA_EXTERN gint8 tuba_api_instance_v2_api_versions_get_mastodon (TubaAPIInstanceV2APIVersions* self);
VALA_EXTERN GType tuba_instance_account_instance_features_get_type (void) G_GNUC_CONST ;
VALA_EXTERN TubaInstanceAccountInstanceFeatures tuba_instance_account_get_tuba_instance_features (TubaInstanceAccount* self);
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)
VALA_EXTERN void tuba_views_timeline_set_accepts (TubaViewsTimeline* self,
                                      GType value);
VALA_EXTERN void tuba_views_notifications_filters_changed (TubaViewsNotifications* self,
                                               gboolean refresh);
VALA_EXTERN GType tuba_account_store_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAccountStore, g_object_unref)
VALA_EXTERN TubaInstanceAccount* tuba_account_store_get_active (TubaAccountStore* self);
static gboolean __lambda175_ (TubaViewsNotifications* self,
                       GBinding* b,
                       GValue* src,
                       GValue* target);
VALA_EXTERN void tuba_views_base_set_needs_attention (TubaViewsBase* self,
                                          gboolean value);
VALA_EXTERN GType tuba_place_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaPlace, g_object_unref)
VALA_EXTERN void tuba_place_set_badge (TubaPlace* self,
                           gint value);
static gboolean ___lambda175__gbinding_transform_func (GBinding* binding,
                                                GValue* from_value,
                                                GValue* to_value,
                                                gpointer self);
static gboolean tuba_views_notifications_on_filtered_notifications_count_change (TubaViewsNotifications* self,
                                                                          GBinding* binding,
                                                                          GValue* from_value,
                                                                          GValue* to_value);
static gboolean _tuba_views_notifications_on_filtered_notifications_count_change_gbinding_transform_func (GBinding* binding,
                                                                                                   GValue* from_value,
                                                                                                   GValue* to_value,
                                                                                                   gpointer self);
static void tuba_views_notifications_real_on_shown (TubaViewsBase* base);
VALA_EXTERN gboolean tuba_instance_account_get_tuba_probably_has_notification_filters (TubaInstanceAccount* self);
VALA_EXTERN void tuba_views_notifications_update_filtered_notifications (TubaViewsNotifications* self,
                                                             GAsyncReadyCallback _callback_,
                                                             gpointer _user_data_);
VALA_EXTERN void tuba_views_notifications_update_filtered_notifications_finish (TubaViewsNotifications* self,
                                                                    GAsyncResult* _res_);
static void tuba_views_notifications_real_on_hidden (TubaViewsBase* base);
VALA_EXTERN void tuba_instance_account_set_unread_count (TubaInstanceAccount* self,
                                             gint value);
static void tuba_views_notifications_real_request_data_free (gpointer _data);
static void tuba_views_notifications_real_request (TubaViewsTimeline* base,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_);
static gboolean tuba_views_notifications_real_request_co (TubaViewsNotificationsRequestData* _data_);
static void tuba_views_notifications_request_ready (GObject* source_object,
                                             GAsyncResult* _res_,
                                             gpointer _user_data_);
VALA_EXTERN GCancellable* tuba_views_timeline_get_request_cancellable (TubaViewsTimeline* self);
VALA_EXTERN gchar* tuba_views_timeline_get_req_url (TubaViewsTimeline* self);
VALA_EXTERN GType tuba_request_v2_method_get_type (void) G_GNUC_CONST ;
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);
VALA_EXTERN void tuba_views_timeline_append_params_v2 (TubaViewsTimeline* self,
                                           TubaRequestV2* req);
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);
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 GType tuba_network_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaNetwork, g_object_unref)
VALA_EXTERN JsonNode* tuba_network_parse_node (TubaNetwork* self,
                                   JsonParser* parser);
static void _vala_JsonNode_free (JsonNode* self);
VALA_EXTERN GType tuba_api_grouped_notifications_results_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIGroupedNotificationsResults, g_object_unref)
VALA_EXTERN TubaAPIGroupedNotificationsResults* tuba_api_grouped_notifications_results_from (JsonNode* node,
                                                                                 GError** error);
VALA_EXTERN GeeArrayList* tuba_api_grouped_notifications_results_get_notification_groups (TubaAPIGroupedNotificationsResults* self);
VALA_EXTERN GeeArrayList* tuba_api_grouped_notifications_results_get_accounts (TubaAPIGroupedNotificationsResults* self);
VALA_EXTERN GeeArrayList* tuba_api_grouped_notifications_results_notification_group_get_sample_account_ids (TubaAPIGroupedNotificationsResultsNotificationGroup* self);
VALA_EXTERN const gchar* tuba_api_account_get_id (TubaAPIAccount* self);
VALA_EXTERN void tuba_api_grouped_notifications_results_notification_group_set_tuba_accounts (TubaAPIGroupedNotificationsResultsNotificationGroup* self,
                                                                                  GeeArrayList* value);
VALA_EXTERN GeeArrayList* tuba_api_grouped_notifications_results_notification_group_get_tuba_accounts (TubaAPIGroupedNotificationsResultsNotificationGroup* self);
VALA_EXTERN void tuba_api_notification_set_account (TubaAPINotification* self,
                                        TubaAPIAccount* value);
VALA_EXTERN const gchar* tuba_api_grouped_notifications_results_notification_group_get_status_id (TubaAPIGroupedNotificationsResultsNotificationGroup* self);
VALA_EXTERN GeeArrayList* tuba_api_grouped_notifications_results_get_statuses (TubaAPIGroupedNotificationsResults* self);
VALA_EXTERN const gchar* tuba_api_status_get_id (TubaAPIStatus* self);
VALA_EXTERN void tuba_api_notification_set_status (TubaAPINotification* self,
                                       TubaAPIStatus* value);
static void _vala_array_add91 (GObject** * array,
                        gint* length,
                        gint* size,
                        GObject* value);
VALA_EXTERN void tuba_views_timeline_get_pages (TubaViewsTimeline* self,
                                    const gchar* header);
VALA_EXTERN void tuba_views_base_on_content_changed (TubaViewsBase* self);
VALA_EXTERN void tuba_views_timeline_on_request_finish (TubaViewsTimeline* self);
VALA_EXTERN void tuba_views_base_on_error (TubaViewsBase* self,
                               gint32 code,
                               const gchar* reason);
static void tuba_views_notifications_update_filtered_notifications_data_free (gpointer _data);
static gboolean tuba_views_notifications_update_filtered_notifications_co (TubaViewsNotificationsUpdateFilteredNotificationsData* _data_);
static void tuba_views_notifications_update_filtered_notifications_ready (GObject* source_object,
                                                                   GAsyncResult* _res_,
                                                                   gpointer _user_data_);
VALA_EXTERN void tuba_instance_account_set_filtered_notifications_count (TubaInstanceAccount* self,
                                                             gint value);
VALA_EXTERN GType tuba_api_notification_filter_policy_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPINotificationFilterPolicy, g_object_unref)
VALA_EXTERN TubaAPINotificationFilterPolicy* tuba_api_notification_filter_policy_from (JsonNode* node,
                                                                           GError** error);
VALA_EXTERN GType tuba_api_notification_filter_policy_summary_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPINotificationFilterPolicySummary, g_object_unref)
VALA_EXTERN TubaAPINotificationFilterPolicySummary* tuba_api_notification_filter_policy_get_summary (TubaAPINotificationFilterPolicy* self);
VALA_EXTERN gint32 tuba_api_notification_filter_policy_summary_get_pending_notifications_count (TubaAPINotificationFilterPolicySummary* self);
VALA_EXTERN void tuba_instance_account_set_tuba_probably_has_notification_filters (TubaInstanceAccount* self,
                                                                       gboolean value);
static gchar* tuba_views_notifications_real_get_stream_url (TubaStreamable* base);
VALA_EXTERN const gchar* tuba_instance_account_get_tuba_streaming_url (TubaInstanceAccount* self);
VALA_EXTERN const gchar* tuba_instance_account_get_access_token (TubaInstanceAccount* self);
VALA_EXTERN gchar* tuba_views_notifications_get_notifications_excluded_types_query_param (void);
VALA_EXTERN gchar** tuba_settings_get_notification_filters (TubaSettings* self,
                                                gint* result_length1);
static void tuba_views_notifications_set_is_all (TubaViewsNotifications* self,
                                          gboolean value);
VALA_EXTERN const gchar* tuba_views_timeline_get_url (TubaViewsTimeline* self);
VALA_EXTERN void tuba_views_timeline_set_url (TubaViewsTimeline* self,
                                  const gchar* value);
VALA_EXTERN void tuba_views_timeline_set_page_next (TubaViewsTimeline* self,
                                        const gchar* value);
static void tuba_views_notifications_real_on_new_post (TubaViewsTimeline* base,
                                                TubaStreamableEvent* ev);
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);
VALA_EXTERN const gchar* tuba_api_notification_get_kind (TubaAPINotification* self);
static gboolean _vala_string_array_contains (gchar* * stack,
                                      gssize stack_length,
                                      const gchar* needle);
VALA_EXTERN const gchar* tuba_api_notification_get_group_key (TubaAPINotification* self);
VALA_EXTERN void tuba_views_timeline_safely_remove (TubaViewsTimeline* self,
                                        gint i);
VALA_EXTERN void tuba_entity_patch (TubaEntity* self,
                        GObject* with);
VALA_EXTERN TubaAPIAccount* tuba_api_notification_get_account (TubaAPINotification* self);
VALA_EXTERN void tuba_api_grouped_notifications_results_notification_group_set_sample_account_ids (TubaAPIGroupedNotificationsResultsNotificationGroup* self,
                                                                                       GeeArrayList* value);
VALA_EXTERN void tuba_views_timeline_on_new_post_entity (TubaViewsTimeline* self,
                                             TubaEntity* entity);
VALA_EXTERN TubaAPIGroupedNotificationsResultsNotificationGroup* tuba_api_grouped_notifications_results_notification_group_new_from_notification (TubaAPINotification* notification);
VALA_EXTERN TubaAPIGroupedNotificationsResultsNotificationGroup* tuba_api_grouped_notifications_results_notification_group_construct_from_notification (GType object_type,
                                                                                                                                            TubaAPINotification* notification);
static void tuba_views_notifications_real_on_edit_post (TubaViewsTimeline* base,
                                                 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_notifications_real_on_delete_post (TubaViewsTimeline* base,
                                                   TubaStreamableEvent* ev);
VALA_EXTERN gchar* tuba_streamable_event_get_string (TubaStreamableEvent *self,
                                         GError** error);
VALA_EXTERN TubaAPIStatus* tuba_api_status_get_formal (TubaAPIStatus* self);
VALA_EXTERN TubaViewsNotifications* tuba_views_notifications_new (void);
VALA_EXTERN TubaViewsNotifications* tuba_views_notifications_construct (GType object_type);
VALA_EXTERN TubaViewsTimeline* tuba_views_timeline_new (void);
VALA_EXTERN TubaViewsTimeline* tuba_views_timeline_construct (GType object_type);
VALA_EXTERN void tuba_views_notifications_set_filtered_notifications (TubaViewsNotifications* self,
                                                          gint32 value);
static GObject * tuba_views_notifications_constructor (GType type,
                                                guint n_construct_properties,
                                                GObjectConstructParam * construct_properties);
VALA_EXTERN void tuba_views_base_set_label (TubaViewsBase* self,
                                const gchar* value);
VALA_EXTERN void tuba_views_base_set_icon (TubaViewsBase* self,
                               const gchar* value);
VALA_EXTERN void tuba_views_base_set_badge_number (TubaViewsBase* self,
                                       gint value);
VALA_EXTERN void tuba_views_base_set_empty_state_title (TubaViewsBase* self,
                                            const gchar* value);
static void _tuba_views_timeline_on_refresh_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_notifications_on_notifications_filter_banner_button_clicked_adw_banner_button_clicked (AdwBanner* _sender,
                                                                                                        gpointer self);
static void _tuba_views_notifications_settings_updated_g_object_notify (GObject* _sender,
                                                                 GParamSpec* pspec,
                                                                 gpointer self);
static void _tuba_views_notifications_on_network_change_g_object_notify (GObject* _sender,
                                                                  GParamSpec* pspec,
                                                                  gpointer self);
VALA_EXTERN void tuba_account_holder_on_account_changed (TubaAccountHolder* self,
                                             TubaInstanceAccount* acc);
VALA_EXTERN gchar* tuba_streamable_get_stream_url (TubaStreamable* self);
static void tuba_views_notifications_finalize (GObject * obj);
static GType tuba_views_notifications_get_type_once (void);
static void _vala_tuba_views_notifications_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 inline gpointer
tuba_views_notifications_get_instance_private (TubaViewsNotifications* self)
{
	return G_STRUCT_MEMBER_P (self, TubaViewsNotifications_private_offset);
}

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 gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

static void
tuba_views_notifications_real_on_scrolled_vadjustment_value_change (TubaViewsContentBase* base)
{
	TubaViewsNotifications * self;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GtkScrolledWindow* _tmp2_;
	GtkAdjustment* _tmp3_;
	GtkAdjustment* _tmp4_;
	gdouble _tmp5_;
	gdouble _tmp6_;
	self = (TubaViewsNotifications*) base;
	TUBA_VIEWS_CONTENT_BASE_CLASS (tuba_views_notifications_parent_class)->on_scrolled_vadjustment_value_change ((TubaViewsContentBase*) G_TYPE_CHECK_INSTANCE_CAST (self, TUBA_VIEWS_TYPE_TIMELINE, TubaViewsTimeline));
	_tmp2_ = ((TubaViewsBase*) self)->scrolled;
	_tmp3_ = gtk_scrolled_window_get_vadjustment (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = gtk_adjustment_get_value (_tmp4_);
	_tmp6_ = _tmp5_;
	if (_tmp6_ <= ((gdouble) 50)) {
		TubaInstanceAccount* _tmp7_;
		TubaInstanceAccount* _tmp8_;
		_tmp7_ = tuba_account_holder_get_account ((TubaAccountHolder*) self);
		_tmp8_ = _tmp7_;
		_tmp1_ = _tmp8_ != NULL;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		TubaInstanceAccount* _tmp9_;
		TubaInstanceAccount* _tmp10_;
		gint _tmp11_;
		gint _tmp12_;
		_tmp9_ = tuba_account_holder_get_account ((TubaAccountHolder*) self);
		_tmp10_ = _tmp9_;
		_tmp11_ = tuba_instance_account_get_unread_count (_tmp10_);
		_tmp12_ = _tmp11_;
		_tmp0_ = _tmp12_ > 0;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gint _tmp13_ = 0;
		TubaInstanceAccount* _tmp14_;
		TubaInstanceAccount* _tmp15_;
		gint _tmp16_;
		gint _tmp17_;
		TubaInstanceAccount* _tmp18_;
		TubaInstanceAccount* _tmp19_;
		gint _tmp20_;
		gint _tmp21_;
		TubaInstanceAccount* _tmp30_;
		TubaInstanceAccount* _tmp31_;
		_tmp14_ = tuba_account_holder_get_account ((TubaAccountHolder*) self);
		_tmp15_ = _tmp14_;
		_tmp16_ = tuba_instance_account_get_last_received_id (_tmp15_);
		_tmp17_ = _tmp16_;
		_tmp18_ = tuba_account_holder_get_account ((TubaAccountHolder*) self);
		_tmp19_ = _tmp18_;
		_tmp20_ = tuba_instance_account_get_last_read_id (_tmp19_);
		_tmp21_ = _tmp20_;
		if (_tmp17_ > _tmp21_) {
			TubaInstanceAccount* _tmp22_;
			TubaInstanceAccount* _tmp23_;
			gint _tmp24_;
			gint _tmp25_;
			_tmp22_ = tuba_account_holder_get_account ((TubaAccountHolder*) self);
			_tmp23_ = _tmp22_;
			_tmp24_ = tuba_instance_account_get_last_received_id (_tmp23_);
			_tmp25_ = _tmp24_;
			_tmp13_ = _tmp25_;
		} else {
			TubaInstanceAccount* _tmp26_;
			TubaInstanceAccount* _tmp27_;
			gint _tmp28_;
			gint _tmp29_;
			_tmp26_ = tuba_account_holder_get_account ((TubaAccountHolder*) self);
			_tmp27_ = _tmp26_;
			_tmp28_ = tuba_instance_account_get_last_read_id (_tmp27_);
			_tmp29_ = _tmp28_;
			_tmp13_ = _tmp29_;
		}
		_tmp30_ = tuba_account_holder_get_account ((TubaAccountHolder*) self);
		_tmp31_ = _tmp30_;
		tuba_instance_account_read_notifications (_tmp31_, _tmp13_, NULL, NULL);
	}
}

static void
tuba_views_notifications_on_network_change (TubaViewsNotifications* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	TubaApplication* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp3_ = tuba_app;
	_tmp4_ = tuba_application_get_is_online (_tmp3_);
	_tmp5_ = _tmp4_;
	if (_tmp5_) {
		TubaInstanceAccount* _tmp6_;
		TubaInstanceAccount* _tmp7_;
		_tmp6_ = tuba_account_holder_get_account ((TubaAccountHolder*) self);
		_tmp7_ = _tmp6_;
		_tmp2_ = _tmp7_ != NULL;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		TubaInstanceAccount* _tmp8_;
		TubaInstanceAccount* _tmp9_;
		gint _tmp10_;
		gint _tmp11_;
		_tmp8_ = tuba_account_holder_get_account ((TubaAccountHolder*) self);
		_tmp9_ = _tmp8_;
		_tmp10_ = tuba_instance_account_get_unread_count (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp1_ = _tmp11_ > 0;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		TubaApplication* _tmp12_;
		TubaDialogsMainWindow* _tmp13_;
		TubaDialogsMainWindow* _tmp14_;
		gboolean _tmp15_;
		gboolean _tmp16_;
		_tmp12_ = tuba_app;
		_tmp13_ = tuba_application_get_main_window (_tmp12_);
		_tmp14_ = _tmp13_;
		_tmp15_ = tuba_dialogs_main_window_get_is_home (_tmp14_);
		_tmp16_ = _tmp15_;
		_tmp0_ = _tmp16_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		tuba_views_timeline_on_refresh ((TubaViewsTimeline*) self);
	}
}

static void
tuba_views_notifications_settings_updated (TubaViewsNotifications* self)
{
	TubaSettings* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = tuba_settings;
	_tmp1_ = tuba_settings_get_dim_trivial_notifications (_tmp0_);
	_tmp2_ = _tmp1_;
	tuba_toggle_css ((GtkWidget*) self, _tmp2_, "dim-enabled");
}

static void
tuba_views_notifications_on_notifications_filter_banner_button_clicked (TubaViewsNotifications* self)
{
	TubaApplication* _tmp0_;
	TubaDialogsMainWindow* _tmp1_;
	TubaDialogsMainWindow* _tmp2_;
	TubaViewsNotificationRequests* _tmp3_;
	TubaViewsNotificationRequests* _tmp4_;
	TubaViewsBase* _tmp5_;
	TubaViewsBase* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = tuba_app;
	_tmp1_ = tuba_application_get_main_window (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = tuba_views_notification_requests_new ();
	g_object_ref_sink (_tmp3_);
	_tmp4_ = _tmp3_;
	_tmp5_ = tuba_dialogs_main_window_open_view (_tmp2_, (TubaViewsBase*) _tmp4_);
	_tmp6_ = _tmp5_;
	_g_object_unref0 (_tmp6_);
	_g_object_unref0 (_tmp4_);
}

static gboolean
tuba_views_notifications_real_should_hide (TubaViewsTimeline* base,
                                           TubaEntity* entity)
{
	TubaViewsNotifications * self;
	TubaAPINotification* notification_entity = NULL;
	TubaAPINotification* _tmp0_;
	gboolean _tmp1_ = FALSE;
	TubaAPINotification* _tmp2_;
	gboolean result;
	self = (TubaViewsNotifications*) base;
	g_return_val_if_fail (entity != NULL, FALSE);
	_tmp0_ = _g_object_ref0 (TUBA_API_IS_NOTIFICATION (entity) ? ((TubaAPINotification*) entity) : NULL);
	notification_entity = _tmp0_;
	_tmp2_ = notification_entity;
	if (_tmp2_ != NULL) {
		TubaAPINotification* _tmp3_;
		TubaAPIStatus* _tmp4_;
		TubaAPIStatus* _tmp5_;
		_tmp3_ = notification_entity;
		_tmp4_ = tuba_api_notification_get_status (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp1_ = _tmp5_ != NULL;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		TubaAPINotification* _tmp6_;
		TubaAPIStatus* _tmp7_;
		TubaAPIStatus* _tmp8_;
		_tmp6_ = notification_entity;
		_tmp7_ = tuba_api_notification_get_status (_tmp6_);
		_tmp8_ = _tmp7_;
		result = TUBA_VIEWS_TIMELINE_CLASS (tuba_views_notifications_parent_class)->should_hide (G_TYPE_CHECK_INSTANCE_CAST (self, TUBA_VIEWS_TYPE_TIMELINE, TubaViewsTimeline), (TubaEntity*) _tmp8_);
		_g_object_unref0 (notification_entity);
		return result;
	}
	result = FALSE;
	_g_object_unref0 (notification_entity);
	return result;
}

static gboolean
__lambda175_ (TubaViewsNotifications* self,
              GBinding* b,
              GValue* src,
              GValue* target)
{
	gint unread_count = 0;
	TubaPlace* _tmp0_;
	gboolean result;
	g_return_val_if_fail (b != NULL, FALSE);
	g_return_val_if_fail (src != NULL, FALSE);
	g_return_val_if_fail (target != NULL, FALSE);
	unread_count = g_value_get_int (src);
	g_value_set_int (target, unread_count);
	tuba_views_base_set_needs_attention ((TubaViewsBase*) self, unread_count > 0);
	_tmp0_ = tuba_mastodon_account_PLACE_NOTIFICATIONS;
	tuba_place_set_badge (_tmp0_, unread_count);
	result = TRUE;
	return result;
}

static gboolean
___lambda175__gbinding_transform_func (GBinding* binding,
                                       GValue* from_value,
                                       GValue* to_value,
                                       gpointer self)
{
	gboolean result;
	result = __lambda175_ ((TubaViewsNotifications*) self, binding, from_value, to_value);
	return result;
}

static gboolean
_tuba_views_notifications_on_filtered_notifications_count_change_gbinding_transform_func (GBinding* binding,
                                                                                          GValue* from_value,
                                                                                          GValue* to_value,
                                                                                          gpointer self)
{
	gboolean result;
	result = tuba_views_notifications_on_filtered_notifications_count_change ((TubaViewsNotifications*) self, binding, from_value, to_value);
	return result;
}

static void
tuba_views_notifications_real_on_account_changed (TubaAccountHolder* base,
                                                  TubaInstanceAccount* acc)
{
	TubaViewsNotifications * self;
	gboolean _tmp0_ = FALSE;
	TubaAPIInstanceV2APIVersions* _tmp1_;
	TubaAPIInstanceV2APIVersions* _tmp2_;
	gint8 _tmp3_;
	gint8 _tmp4_;
	GType _tmp7_ = G_TYPE_NONE;
	GBinding* _tmp8_;
	GBinding* _tmp11_;
	TubaAccountStore* _tmp14_;
	TubaInstanceAccount* _tmp15_;
	TubaInstanceAccount* _tmp16_;
	GBinding* _tmp17_;
	GBinding* _tmp18_;
	TubaAccountStore* _tmp19_;
	TubaInstanceAccount* _tmp20_;
	TubaInstanceAccount* _tmp21_;
	GBinding* _tmp22_;
	GBinding* _tmp23_;
	self = (TubaViewsNotifications*) base;
	_tmp1_ = tuba_instance_account_get_tuba_api_versions (acc);
	_tmp2_ = _tmp1_;
	_tmp3_ = tuba_api_instance_v2_api_versions_get_mastodon (_tmp2_);
	_tmp4_ = _tmp3_;
	if (((gint) _tmp4_) >= 2) {
		_tmp0_ = TRUE;
	} else {
		TubaInstanceAccountInstanceFeatures _tmp5_;
		TubaInstanceAccountInstanceFeatures _tmp6_;
		_tmp5_ = tuba_instance_account_get_tuba_instance_features (acc);
		_tmp6_ = _tmp5_;
		_tmp0_ = (_tmp6_ & TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_GROUP_NOTIFICATIONS) == TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_GROUP_NOTIFICATIONS;
	}
	self->priv->enabled_group_notifications = _tmp0_;
	if (self->priv->enabled_group_notifications) {
		_tmp7_ = TUBA_API_GROUPED_NOTIFICATIONS_RESULTS_TYPE_NOTIFICATION_GROUP;
	} else {
		_tmp7_ = TUBA_API_TYPE_NOTIFICATION;
	}
	tuba_views_timeline_set_accepts ((TubaViewsTimeline*) self, _tmp7_);
	tuba_views_notifications_filters_changed (self, FALSE);
	TUBA_VIEWS_TIMELINE_CLASS (tuba_views_notifications_parent_class)->on_account_changed (G_TYPE_CHECK_INSTANCE_CAST (self, TUBA_VIEWS_TYPE_TIMELINE, TubaViewsTimeline), acc);
	_tmp8_ = self->priv->badge_number_binding;
	if (_tmp8_ != NULL) {
		GBinding* _tmp9_;
		GBinding* _tmp10_;
		_tmp9_ = self->priv->badge_number_binding;
		_tmp10_ = _g_object_ref0 (_tmp9_);
		g_binding_unbind (_tmp10_);
	}
	_tmp11_ = self->priv->filtered_notifications_count_binding;
	if (_tmp11_ != NULL) {
		GBinding* _tmp12_;
		GBinding* _tmp13_;
		_tmp12_ = self->priv->filtered_notifications_count_binding;
		_tmp13_ = _g_object_ref0 (_tmp12_);
		g_binding_unbind (_tmp13_);
	}
	_tmp14_ = tuba_accounts;
	_tmp15_ = tuba_account_store_get_active (_tmp14_);
	_tmp16_ = _tmp15_;
	_tmp17_ = g_object_bind_property_with_closures ((GObject*) _tmp16_, "unread-count", (GObject*) self, "badge-number", G_BINDING_SYNC_CREATE, (GClosure*) ((___lambda175__gbinding_transform_func == NULL) ? NULL : g_cclosure_new ((GCallback) ___lambda175__gbinding_transform_func, g_object_ref (self), (GClosureNotify) g_object_unref)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp18_ = _g_object_ref0 (_tmp17_);
	_g_object_unref0 (self->priv->badge_number_binding);
	self->priv->badge_number_binding = _tmp18_;
	_tmp19_ = tuba_accounts;
	_tmp20_ = tuba_account_store_get_active (_tmp19_);
	_tmp21_ = _tmp20_;
	_tmp22_ = g_object_bind_property_with_closures ((GObject*) _tmp21_, "filtered-notifications-count", (GObject*) self, "filtered-notifications", G_BINDING_SYNC_CREATE, (GClosure*) ((_tuba_views_notifications_on_filtered_notifications_count_change_gbinding_transform_func == NULL) ? NULL : g_cclosure_new ((GCallback) _tuba_views_notifications_on_filtered_notifications_count_change_gbinding_transform_func, g_object_ref (self), (GClosureNotify) g_object_unref)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp23_ = _g_object_ref0 (_tmp22_);
	_g_object_unref0 (self->priv->filtered_notifications_count_binding);
	self->priv->filtered_notifications_count_binding = _tmp23_;
}

static gboolean
tuba_views_notifications_on_filtered_notifications_count_change (TubaViewsNotifications* self,
                                                                 GBinding* binding,
                                                                 GValue* from_value,
                                                                 GValue* to_value)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (binding != NULL, FALSE);
	g_return_val_if_fail (from_value != NULL, FALSE);
	g_return_val_if_fail (to_value != NULL, FALSE);
	g_value_set_int (to_value, g_value_get_int (from_value));
	result = TRUE;
	return result;
}

static void
tuba_views_notifications_real_on_shown (TubaViewsBase* base)
{
	TubaViewsNotifications * self;
	TubaInstanceAccount* _tmp0_;
	TubaInstanceAccount* _tmp1_;
	self = (TubaViewsNotifications*) base;
	TUBA_VIEWS_BASE_CLASS (tuba_views_notifications_parent_class)->on_shown ((TubaViewsBase*) G_TYPE_CHECK_INSTANCE_CAST (self, TUBA_VIEWS_TYPE_TIMELINE, TubaViewsTimeline));
	_tmp0_ = tuba_account_holder_get_account ((TubaAccountHolder*) self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		gint _tmp2_ = 0;
		TubaInstanceAccount* _tmp3_;
		TubaInstanceAccount* _tmp4_;
		gint _tmp5_;
		gint _tmp6_;
		TubaInstanceAccount* _tmp7_;
		TubaInstanceAccount* _tmp8_;
		gint _tmp9_;
		gint _tmp10_;
		TubaInstanceAccount* _tmp19_;
		TubaInstanceAccount* _tmp20_;
		TubaInstanceAccount* _tmp21_;
		TubaInstanceAccount* _tmp22_;
		gboolean _tmp23_;
		gboolean _tmp24_;
		_tmp3_ = tuba_account_holder_get_account ((TubaAccountHolder*) self);
		_tmp4_ = _tmp3_;
		_tmp5_ = tuba_instance_account_get_last_received_id (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = tuba_account_holder_get_account ((TubaAccountHolder*) self);
		_tmp8_ = _tmp7_;
		_tmp9_ = tuba_instance_account_get_last_read_id (_tmp8_);
		_tmp10_ = _tmp9_;
		if (_tmp6_ > _tmp10_) {
			TubaInstanceAccount* _tmp11_;
			TubaInstanceAccount* _tmp12_;
			gint _tmp13_;
			gint _tmp14_;
			_tmp11_ = tuba_account_holder_get_account ((TubaAccountHolder*) self);
			_tmp12_ = _tmp11_;
			_tmp13_ = tuba_instance_account_get_last_received_id (_tmp12_);
			_tmp14_ = _tmp13_;
			_tmp2_ = _tmp14_;
		} else {
			TubaInstanceAccount* _tmp15_;
			TubaInstanceAccount* _tmp16_;
			gint _tmp17_;
			gint _tmp18_;
			_tmp15_ = tuba_account_holder_get_account ((TubaAccountHolder*) self);
			_tmp16_ = _tmp15_;
			_tmp17_ = tuba_instance_account_get_last_read_id (_tmp16_);
			_tmp18_ = _tmp17_;
			_tmp2_ = _tmp18_;
		}
		_tmp19_ = tuba_account_holder_get_account ((TubaAccountHolder*) self);
		_tmp20_ = _tmp19_;
		tuba_instance_account_read_notifications (_tmp20_, _tmp2_, NULL, NULL);
		_tmp21_ = tuba_account_holder_get_account ((TubaAccountHolder*) self);
		_tmp22_ = _tmp21_;
		_tmp23_ = tuba_instance_account_get_tuba_probably_has_notification_filters (_tmp22_);
		_tmp24_ = _tmp23_;
		if (_tmp24_) {
			tuba_views_notifications_update_filtered_notifications (self, NULL, NULL);
		}
	}
}

static void
tuba_views_notifications_real_on_hidden (TubaViewsBase* base)
{
	TubaViewsNotifications * self;
	TubaInstanceAccount* _tmp0_;
	TubaInstanceAccount* _tmp1_;
	self = (TubaViewsNotifications*) base;
	TUBA_VIEWS_BASE_CLASS (tuba_views_notifications_parent_class)->on_hidden ((TubaViewsBase*) G_TYPE_CHECK_INSTANCE_CAST (self, TUBA_VIEWS_TYPE_TIMELINE, TubaViewsTimeline));
	_tmp0_ = tuba_account_holder_get_account ((TubaAccountHolder*) self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		TubaInstanceAccount* _tmp2_;
		TubaInstanceAccount* _tmp3_;
		_tmp2_ = tuba_account_holder_get_account ((TubaAccountHolder*) self);
		_tmp3_ = _tmp2_;
		tuba_instance_account_set_unread_count (_tmp3_, 0);
	}
}

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

static void
tuba_views_notifications_real_request (TubaViewsTimeline* base,
                                       GAsyncReadyCallback _callback_,
                                       gpointer _user_data_)
{
	TubaViewsNotifications * self;
	TubaViewsNotificationsRequestData* _data_;
	TubaViewsNotifications* _tmp0_;
	self = (TubaViewsNotifications*) base;
	_data_ = g_slice_new0 (TubaViewsNotificationsRequestData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_views_notifications_real_request_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	tuba_views_notifications_real_request_co (_data_);
}

static void
tuba_views_notifications_request_finish (TubaViewsTimeline* base,
                                         GAsyncResult* _res_)
{
	TubaViewsNotificationsRequestData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
tuba_views_notifications_request_ready (GObject* source_object,
                                        GAsyncResult* _res_,
                                        gpointer _user_data_)
{
	TubaViewsNotificationsRequestData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_views_notifications_real_request_co (_data_);
}

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

static void
_vala_array_add91 (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 gboolean
tuba_views_notifications_real_request_co (TubaViewsNotificationsRequestData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	if (!_data_->self->priv->enabled_group_notifications) {
		_data_->_state_ = 1;
		TUBA_VIEWS_TIMELINE_CLASS (tuba_views_notifications_parent_class)->request (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, TUBA_VIEWS_TYPE_TIMELINE, TubaViewsTimeline), tuba_views_notifications_request_ready, _data_);
		return FALSE;
		_state_1:
		TUBA_VIEWS_TIMELINE_CLASS (tuba_views_notifications_parent_class)->request_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, TUBA_VIEWS_TYPE_TIMELINE, TubaViewsTimeline), _data_->_res_);
		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_->_tmp0_ = tuba_views_timeline_get_request_cancellable ((TubaViewsTimeline*) _data_->self);
	_data_->_tmp1_ = _data_->_tmp0_;
	if (_data_->_tmp1_ != NULL) {
		_data_->_tmp2_ = tuba_views_timeline_get_request_cancellable ((TubaViewsTimeline*) _data_->self);
		_data_->_tmp3_ = _data_->_tmp2_;
		g_cancellable_cancel (_data_->_tmp3_);
	}
	_data_->_tmp4_ = tuba_views_timeline_get_req_url ((TubaViewsTimeline*) _data_->self);
	_data_->_tmp5_ = _data_->_tmp4_;
	_data_->_tmp6_ = tuba_account_holder_get_account ((TubaAccountHolder*) _data_->self);
	_data_->_tmp7_ = _data_->_tmp6_;
	_data_->_tmp8_ = _g_object_ref0 (_data_->_tmp7_);
	_data_->_tmp9_ = NULL;
	_data_->_tmp9_ = tuba_request_v2_new (_data_->_tmp5_, TUBA_REQUEST_V2_METHOD_GET);
	tuba_request_v2_set_account (_data_->_tmp9_, _data_->_tmp8_);
	_g_object_unref0 (_data_->_tmp8_);
	tuba_request_v2_set_ctx (_data_->_tmp9_, (GtkWidget*) _data_->self);
	_data_->_tmp10_ = _data_->_tmp9_;
	_g_free0 (_data_->_tmp5_);
	_data_->req = _data_->_tmp10_;
	_data_->_tmp11_ = _data_->req;
	_data_->_tmp12_ = tuba_request_v2_get_cancellable (_data_->_tmp11_);
	_data_->_tmp13_ = _data_->_tmp12_;
	tuba_views_timeline_set_request_cancellable ((TubaViewsTimeline*) _data_->self, _data_->_tmp13_);
	_data_->_tmp14_ = _data_->req;
	tuba_views_timeline_append_params_v2 ((TubaViewsTimeline*) _data_->self, _data_->_tmp14_);
	{
		_data_->_tmp16_ = _data_->req;
		_data_->_tmp17_ = NULL;
		_data_->_state_ = 2;
		tuba_request_v2_exec (_data_->_tmp16_, tuba_views_notifications_request_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp18_ = tuba_request_v2_exec_finish (_data_->_tmp16_, _data_->_res_, &_data_->_tmp17_, &_data_->_inner_error0_);
		_soup_message_headers_unref0 (_data_->response_headers);
		_data_->response_headers = _data_->_tmp17_;
		_data_->_tmp15_ = _data_->_tmp18_;
		if (G_UNLIKELY (_data_->_inner_error0_ != 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_->_tmp19_ = _data_->_tmp15_;
		_data_->_tmp15_ = NULL;
		_g_object_unref0 (_data_->in_stream);
		_data_->in_stream = _data_->_tmp19_;
		_data_->_tmp20_ = _data_->in_stream;
		_data_->_state_ = 3;
		tuba_network_get_parser_from_inputstream_async (_data_->_tmp20_, NULL, tuba_views_notifications_request_ready, _data_);
		return FALSE;
		_state_3:
		_data_->_tmp21_ = tuba_network_get_parser_from_inputstream_finish (_data_->_res_, &_data_->_inner_error0_);
		_data_->parser = _data_->_tmp21_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->_tmp15_);
			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_->_tmp22_ = tuba_views_timeline_get_request_cancellable ((TubaViewsTimeline*) _data_->self);
		_data_->_tmp23_ = _data_->_tmp22_;
		if (g_cancellable_is_cancelled (_data_->_tmp23_)) {
			_g_object_unref0 (_data_->parser);
			_g_object_unref0 (_data_->_tmp15_);
			_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_->_tmp24_ = tuba_network;
		_data_->_tmp25_ = _data_->parser;
		_data_->_tmp26_ = tuba_network_parse_node (_data_->_tmp24_, _data_->_tmp25_);
		_data_->node = _data_->_tmp26_;
		_data_->_tmp27_ = _data_->node;
		if (_data_->_tmp27_ == NULL) {
			__vala_JsonNode_free0 (_data_->node);
			_g_object_unref0 (_data_->parser);
			_g_object_unref0 (_data_->_tmp15_);
			_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_->_tmp28_ = g_new0 (GObject*, 0 + 1);
		_data_->to_add = _data_->_tmp28_;
		_data_->to_add_length1 = 0;
		_data_->_to_add_size_ = _data_->to_add_length1;
		_data_->_tmp29_ = _data_->node;
		_data_->_tmp30_ = tuba_api_grouped_notifications_results_from (_data_->_tmp29_, &_data_->_inner_error0_);
		_data_->group_notifications = _data_->_tmp30_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_data_->to_add = (_vala_array_free (_data_->to_add, _data_->to_add_length1, (GDestroyNotify) g_object_unref), NULL);
			__vala_JsonNode_free0 (_data_->node);
			_g_object_unref0 (_data_->parser);
			_g_object_unref0 (_data_->_tmp15_);
			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_->_tmp31_ = _data_->group_notifications;
			_data_->_tmp32_ = tuba_api_grouped_notifications_results_get_notification_groups (_data_->_tmp31_);
			_data_->_tmp33_ = _data_->_tmp32_;
			_data_->_group_list = _data_->_tmp33_;
			_data_->_tmp34_ = _data_->_group_list;
			_data_->_tmp35_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _data_->_tmp34_);
			_data_->_tmp36_ = _data_->_tmp35_;
			_data_->_group_size = _data_->_tmp36_;
			_data_->_group_index = -1;
			while (TRUE) {
				_data_->_group_index = _data_->_group_index + 1;
				_data_->_tmp37_ = _data_->_group_index;
				_data_->_tmp38_ = _data_->_group_size;
				if (!(_data_->_tmp37_ < _data_->_tmp38_)) {
					break;
				}
				_data_->_tmp39_ = _data_->_group_list;
				_data_->_tmp40_ = gee_abstract_list_get ((GeeAbstractList*) _data_->_tmp39_, _data_->_group_index);
				_data_->group = (TubaAPIGroupedNotificationsResultsNotificationGroup*) _data_->_tmp40_;
				_data_->_tmp41_ = gee_array_list_new (TUBA_API_TYPE_ACCOUNT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
				_data_->group_accounts = _data_->_tmp41_;
				{
					_data_->_tmp42_ = _data_->group_notifications;
					_data_->_tmp43_ = tuba_api_grouped_notifications_results_get_accounts (_data_->_tmp42_);
					_data_->_tmp44_ = _data_->_tmp43_;
					_data_->_account_list = _data_->_tmp44_;
					_data_->_tmp45_ = _data_->_account_list;
					_data_->_tmp46_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _data_->_tmp45_);
					_data_->_tmp47_ = _data_->_tmp46_;
					_data_->_account_size = _data_->_tmp47_;
					_data_->_account_index = -1;
					while (TRUE) {
						_data_->_account_index = _data_->_account_index + 1;
						_data_->_tmp48_ = _data_->_account_index;
						_data_->_tmp49_ = _data_->_account_size;
						if (!(_data_->_tmp48_ < _data_->_tmp49_)) {
							break;
						}
						_data_->_tmp50_ = _data_->_account_list;
						_data_->_tmp51_ = gee_abstract_list_get ((GeeAbstractList*) _data_->_tmp50_, _data_->_account_index);
						_data_->account = (TubaAPIAccount*) _data_->_tmp51_;
						_data_->_tmp52_ = _data_->group;
						_data_->_tmp53_ = tuba_api_grouped_notifications_results_notification_group_get_sample_account_ids (_data_->_tmp52_);
						_data_->_tmp54_ = _data_->_tmp53_;
						_data_->_tmp55_ = _data_->account;
						_data_->_tmp56_ = tuba_api_account_get_id (_data_->_tmp55_);
						_data_->_tmp57_ = _data_->_tmp56_;
						if (gee_abstract_collection_contains ((GeeAbstractCollection*) _data_->_tmp54_, _data_->_tmp57_)) {
							_data_->_tmp58_ = _data_->group_accounts;
							_data_->_tmp59_ = _data_->account;
							gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp58_, _data_->_tmp59_);
						}
						_g_object_unref0 (_data_->account);
					}
				}
				_data_->_tmp60_ = _data_->group;
				_data_->_tmp61_ = _data_->group_accounts;
				tuba_api_grouped_notifications_results_notification_group_set_tuba_accounts (_data_->_tmp60_, _data_->_tmp61_);
				_data_->_tmp62_ = _data_->group;
				_data_->_tmp63_ = tuba_api_grouped_notifications_results_notification_group_get_tuba_accounts (_data_->_tmp62_);
				_data_->_tmp64_ = _data_->_tmp63_;
				_data_->_tmp65_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _data_->_tmp64_);
				_data_->_tmp66_ = _data_->_tmp65_;
				if (_data_->_tmp66_ == 1) {
					_data_->_tmp67_ = _data_->group;
					_data_->_tmp68_ = _data_->group;
					_data_->_tmp69_ = tuba_api_grouped_notifications_results_notification_group_get_tuba_accounts (_data_->_tmp68_);
					_data_->_tmp70_ = _data_->_tmp69_;
					_data_->_tmp71_ = gee_abstract_list_get ((GeeAbstractList*) _data_->_tmp70_, 0);
					_data_->_tmp72_ = (TubaAPIAccount*) _data_->_tmp71_;
					tuba_api_notification_set_account ((TubaAPINotification*) _data_->_tmp67_, _data_->_tmp72_);
					_g_object_unref0 (_data_->_tmp72_);
				}
				_data_->_tmp73_ = _data_->group;
				_data_->_tmp74_ = tuba_api_grouped_notifications_results_notification_group_get_status_id (_data_->_tmp73_);
				_data_->_tmp75_ = _data_->_tmp74_;
				if (_data_->_tmp75_ != NULL) {
					{
						_data_->_tmp76_ = _data_->group_notifications;
						_data_->_tmp77_ = tuba_api_grouped_notifications_results_get_statuses (_data_->_tmp76_);
						_data_->_tmp78_ = _data_->_tmp77_;
						_data_->_status_list = _data_->_tmp78_;
						_data_->_tmp79_ = _data_->_status_list;
						_data_->_tmp80_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _data_->_tmp79_);
						_data_->_tmp81_ = _data_->_tmp80_;
						_data_->_status_size = _data_->_tmp81_;
						_data_->_status_index = -1;
						while (TRUE) {
							_data_->_status_index = _data_->_status_index + 1;
							_data_->_tmp82_ = _data_->_status_index;
							_data_->_tmp83_ = _data_->_status_size;
							if (!(_data_->_tmp82_ < _data_->_tmp83_)) {
								break;
							}
							_data_->_tmp84_ = _data_->_status_list;
							_data_->_tmp85_ = gee_abstract_list_get ((GeeAbstractList*) _data_->_tmp84_, _data_->_status_index);
							_data_->status = (TubaAPIStatus*) _data_->_tmp85_;
							_data_->_tmp86_ = _data_->status;
							_data_->_tmp87_ = tuba_api_status_get_id (_data_->_tmp86_);
							_data_->_tmp88_ = _data_->_tmp87_;
							_data_->_tmp89_ = _data_->group;
							_data_->_tmp90_ = tuba_api_grouped_notifications_results_notification_group_get_status_id (_data_->_tmp89_);
							_data_->_tmp91_ = _data_->_tmp90_;
							if (g_strcmp0 (_data_->_tmp88_, _data_->_tmp91_) == 0) {
								_data_->_tmp92_ = _data_->group;
								_data_->_tmp93_ = _data_->status;
								tuba_api_notification_set_status ((TubaAPINotification*) _data_->_tmp92_, _data_->_tmp93_);
								_g_object_unref0 (_data_->status);
								break;
							}
							_g_object_unref0 (_data_->status);
						}
					}
				}
				_data_->_tmp94_ = _data_->group;
				if (!tuba_views_timeline_should_hide ((TubaViewsTimeline*) _data_->self, (TubaEntity*) _data_->_tmp94_)) {
					_data_->_tmp95_ = _data_->group;
					_data_->_tmp96_ = _g_object_ref0 ((GObject*) _data_->_tmp95_);
					_vala_array_add91 (&_data_->to_add, &_data_->to_add_length1, &_data_->_to_add_size_, _data_->_tmp96_);
				}
				_g_object_unref0 (_data_->group_accounts);
				_g_object_unref0 (_data_->group);
			}
		}
		_data_->_tmp97_ = ((TubaViewsContentBase*) _data_->self)->model;
		_data_->_tmp98_ = ((TubaViewsContentBase*) _data_->self)->model;
		_data_->_tmp99_ = _data_->to_add;
		_data_->_tmp99__length1 = _data_->to_add_length1;
		g_list_store_splice (_data_->_tmp97_, g_list_model_get_n_items ((GListModel*) _data_->_tmp98_), (guint) 0, _data_->_tmp99_, (guint) _data_->_tmp99__length1);
		_data_->_tmp100_ = _data_->response_headers;
		if (_data_->_tmp100_ != NULL) {
			_data_->_tmp101_ = _data_->response_headers;
			_data_->_tmp102_ = soup_message_headers_get_one (_data_->_tmp101_, "Link");
			tuba_views_timeline_get_pages ((TubaViewsTimeline*) _data_->self, _data_->_tmp102_);
		}
		_data_->_tmp103_ = _data_->to_add;
		_data_->_tmp103__length1 = _data_->to_add_length1;
		if (_data_->_tmp103__length1 == 0) {
			tuba_views_base_on_content_changed ((TubaViewsBase*) _data_->self);
		}
		tuba_views_timeline_on_request_finish ((TubaViewsTimeline*) _data_->self);
		_g_object_unref0 (_data_->group_notifications);
		_data_->to_add = (_vala_array_free (_data_->to_add, _data_->to_add_length1, (GDestroyNotify) g_object_unref), NULL);
		__vala_JsonNode_free0 (_data_->node);
		_g_object_unref0 (_data_->parser);
		_g_object_unref0 (_data_->_tmp15_);
	}
	goto __finally0;
	__catch0_g_io_error_cancelled:
	{
		g_clear_error (&_data_->_inner_error0_);
		g_debug ("Notifications.vala:246: Message is cancelled.");
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp104_ = _data_->e;
		_data_->_tmp105_ = _data_->e;
		_data_->_tmp106_ = _data_->_tmp105_->message;
		tuba_views_base_on_error ((TubaViewsBase*) _data_->self, (gint32) _data_->_tmp104_->code, _data_->_tmp106_);
		_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;
}

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

void
tuba_views_notifications_update_filtered_notifications (TubaViewsNotifications* self,
                                                        GAsyncReadyCallback _callback_,
                                                        gpointer _user_data_)
{
	TubaViewsNotificationsUpdateFilteredNotificationsData* _data_;
	TubaViewsNotifications* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (TubaViewsNotificationsUpdateFilteredNotificationsData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_views_notifications_update_filtered_notifications_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	tuba_views_notifications_update_filtered_notifications_co (_data_);
}

void
tuba_views_notifications_update_filtered_notifications_finish (TubaViewsNotifications* self,
                                                               GAsyncResult* _res_)
{
	TubaViewsNotificationsUpdateFilteredNotificationsData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
tuba_views_notifications_update_filtered_notifications_ready (GObject* source_object,
                                                              GAsyncResult* _res_,
                                                              gpointer _user_data_)
{
	TubaViewsNotificationsUpdateFilteredNotificationsData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_views_notifications_update_filtered_notifications_co (_data_);
}

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 gboolean
tuba_views_notifications_update_filtered_notifications_co (TubaViewsNotificationsUpdateFilteredNotificationsData* _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_ = tuba_accounts;
	_data_->_tmp1_ = tuba_account_store_get_active (_data_->_tmp0_);
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = _g_object_ref0 (_data_->_tmp2_);
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = tuba_request_v2_new ("/api/v1/notifications/policy", TUBA_REQUEST_V2_METHOD_GET);
	tuba_request_v2_set_account (_data_->_tmp4_, _data_->_tmp3_);
	_g_object_unref0 (_data_->_tmp3_);
	_data_->req = _data_->_tmp4_;
	{
		_data_->_tmp5_ = _data_->req;
		_data_->_state_ = 1;
		tuba_request_v2_exec (_data_->_tmp5_, tuba_views_notifications_update_filtered_notifications_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp6_ = tuba_request_v2_exec_finish (_data_->_tmp5_, _data_->_res_, NULL, &_data_->_inner_error0_);
		_data_->in_stream = _data_->_tmp6_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp7_ = _data_->in_stream;
		_data_->_state_ = 2;
		tuba_network_get_parser_from_inputstream_async (_data_->_tmp7_, NULL, tuba_views_notifications_update_filtered_notifications_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp8_ = tuba_network_get_parser_from_inputstream_finish (_data_->_res_, &_data_->_inner_error0_);
		_data_->parser = _data_->_tmp8_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->in_stream);
			goto __catch0_g_error;
		}
		_data_->_tmp9_ = tuba_network;
		_data_->_tmp10_ = _data_->parser;
		_data_->_tmp11_ = tuba_network_parse_node (_data_->_tmp9_, _data_->_tmp10_);
		_data_->node = _data_->_tmp11_;
		_data_->_tmp12_ = _data_->node;
		if (_data_->_tmp12_ == NULL) {
			_data_->_tmp13_ = tuba_accounts;
			_data_->_tmp14_ = tuba_account_store_get_active (_data_->_tmp13_);
			_data_->_tmp15_ = _data_->_tmp14_;
			tuba_instance_account_set_filtered_notifications_count (_data_->_tmp15_, 0);
			__vala_JsonNode_free0 (_data_->node);
			_g_object_unref0 (_data_->parser);
			_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_->_tmp16_ = _data_->node;
		_data_->_tmp17_ = tuba_api_notification_filter_policy_from (_data_->_tmp16_, &_data_->_inner_error0_);
		_data_->policies = _data_->_tmp17_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			__vala_JsonNode_free0 (_data_->node);
			_g_object_unref0 (_data_->parser);
			_g_object_unref0 (_data_->in_stream);
			goto __catch0_g_error;
		}
		_data_->_tmp18_ = _data_->policies;
		_data_->_tmp19_ = tuba_api_notification_filter_policy_get_summary (_data_->_tmp18_);
		_data_->_tmp20_ = _data_->_tmp19_;
		if (_data_->_tmp20_ != NULL) {
			_data_->_tmp21_ = tuba_accounts;
			_data_->_tmp22_ = tuba_account_store_get_active (_data_->_tmp21_);
			_data_->_tmp23_ = _data_->_tmp22_;
			_data_->_tmp24_ = _data_->policies;
			_data_->_tmp25_ = tuba_api_notification_filter_policy_get_summary (_data_->_tmp24_);
			_data_->_tmp26_ = _data_->_tmp25_;
			_data_->_tmp27_ = tuba_api_notification_filter_policy_summary_get_pending_notifications_count (_data_->_tmp26_);
			_data_->_tmp28_ = _data_->_tmp27_;
			tuba_instance_account_set_filtered_notifications_count (_data_->_tmp23_, (gint) _data_->_tmp28_);
		}
		_g_object_unref0 (_data_->policies);
		__vala_JsonNode_free0 (_data_->node);
		_g_object_unref0 (_data_->parser);
		_g_object_unref0 (_data_->in_stream);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp29_ = tuba_accounts;
		_data_->_tmp30_ = tuba_account_store_get_active (_data_->_tmp29_);
		_data_->_tmp31_ = _data_->_tmp30_;
		tuba_instance_account_set_filtered_notifications_count (_data_->_tmp31_, 0);
		_data_->_tmp32_ = _data_->e;
		if (_data_->_tmp32_->code == 404) {
			_data_->_tmp33_ = tuba_accounts;
			_data_->_tmp34_ = tuba_account_store_get_active (_data_->_tmp33_);
			_data_->_tmp35_ = _data_->_tmp34_;
			tuba_instance_account_set_tuba_probably_has_notification_filters (_data_->_tmp35_, FALSE);
		} else {
			_data_->_tmp36_ = _data_->e;
			_data_->_tmp37_ = g_strdup_printf ("%i", _data_->_tmp36_->code);
			_data_->_tmp38_ = _data_->_tmp37_;
			_data_->_tmp39_ = _data_->e;
			_data_->_tmp40_ = _data_->_tmp39_->message;
			_data_->_tmp41_ = string_to_string (_data_->_tmp40_);
			_data_->_tmp42_ = g_strconcat ("Error while trying to get notification policy: ", _data_->_tmp38_, " ", _data_->_tmp41_, NULL);
			_data_->_tmp43_ = _data_->_tmp42_;
			g_warning ("Notifications.vala:273: %s", _data_->_tmp43_);
			_g_free0 (_data_->_tmp43_);
			_g_free0 (_data_->_tmp38_);
		}
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_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;
	}
	_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;
}

static gchar*
tuba_views_notifications_real_get_stream_url (TubaStreamable* base)
{
	TubaViewsNotifications * self;
	gchar* _tmp0_ = NULL;
	TubaInstanceAccount* _tmp1_;
	TubaInstanceAccount* _tmp2_;
	gchar* _tmp14_;
	gchar* result;
	self = (TubaViewsNotifications*) base;
	_tmp1_ = tuba_account_holder_get_account ((TubaAccountHolder*) self);
	_tmp2_ = _tmp1_;
	if (_tmp2_ != NULL) {
		TubaInstanceAccount* _tmp3_;
		TubaInstanceAccount* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		TubaInstanceAccount* _tmp8_;
		TubaInstanceAccount* _tmp9_;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		const gchar* _tmp12_;
		gchar* _tmp13_;
		_tmp3_ = tuba_account_holder_get_account ((TubaAccountHolder*) self);
		_tmp4_ = _tmp3_;
		_tmp5_ = tuba_instance_account_get_tuba_streaming_url (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = string_to_string (_tmp6_);
		_tmp8_ = tuba_account_holder_get_account ((TubaAccountHolder*) self);
		_tmp9_ = _tmp8_;
		_tmp10_ = tuba_instance_account_get_access_token (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = string_to_string (_tmp11_);
		_tmp13_ = g_strconcat (_tmp7_, "/api/v1/streaming?stream=user:notification&access_token=", _tmp12_, NULL);
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp13_;
	} else {
		_g_free0 (_tmp0_);
		_tmp0_ = NULL;
	}
	_tmp14_ = _tmp0_;
	_tmp0_ = NULL;
	result = _tmp14_;
	_g_free0 (_tmp0_);
	return result;
}

static gchar*
_vala_g_strjoinv (const gchar* separator,
                  gchar** str_array,
                  gint str_array_length1)
{
	gboolean _tmp0_ = FALSE;
	gchar* result;
	if (separator == NULL) {
		separator = "";
	}
	if (str_array != NULL) {
		gboolean _tmp1_ = FALSE;
		if (str_array_length1 > 0) {
			_tmp1_ = TRUE;
		} else {
			gboolean _tmp2_ = FALSE;
			if (str_array_length1 == -1) {
				const gchar* _tmp3_;
				_tmp3_ = str_array[0];
				_tmp2_ = _tmp3_ != NULL;
			} else {
				_tmp2_ = FALSE;
			}
			_tmp1_ = _tmp2_;
		}
		_tmp0_ = _tmp1_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gint i = 0;
		gsize len = 0UL;
		gint _tmp16_;
		gint _tmp17_;
		const gchar* res = NULL;
		void* _tmp18_;
		const gchar* _tmp19_ = NULL;
		const gchar* _tmp20_;
		void* ptr = NULL;
		const gchar* _tmp22_;
		void* _tmp23_;
		const gchar* _tmp33_;
		len = (gsize) 1;
		{
			gboolean _tmp4_ = FALSE;
			i = 0;
			_tmp4_ = TRUE;
			while (TRUE) {
				gboolean _tmp6_ = FALSE;
				gboolean _tmp7_ = FALSE;
				gint _tmp10_ = 0;
				const gchar* _tmp11_;
				if (!_tmp4_) {
					gint _tmp5_;
					_tmp5_ = i;
					i = _tmp5_ + 1;
				}
				_tmp4_ = FALSE;
				if (str_array_length1 != -1) {
					_tmp7_ = i < str_array_length1;
				} else {
					_tmp7_ = FALSE;
				}
				if (_tmp7_) {
					_tmp6_ = TRUE;
				} else {
					gboolean _tmp8_ = FALSE;
					if (str_array_length1 == -1) {
						const gchar* _tmp9_;
						_tmp9_ = str_array[i];
						_tmp8_ = _tmp9_ != NULL;
					} else {
						_tmp8_ = FALSE;
					}
					_tmp6_ = _tmp8_;
				}
				if (!_tmp6_) {
					break;
				}
				_tmp11_ = str_array[i];
				if (_tmp11_ != NULL) {
					const gchar* _tmp12_;
					gint _tmp13_;
					gint _tmp14_;
					_tmp12_ = str_array[i];
					_tmp13_ = strlen ((const gchar*) _tmp12_);
					_tmp14_ = _tmp13_;
					_tmp10_ = _tmp14_;
				} else {
					_tmp10_ = 0;
				}
				len += (gsize) _tmp10_;
			}
		}
		if (i == 0) {
			gchar* _tmp15_;
			_tmp15_ = g_strdup ("");
			result = _tmp15_;
			return result;
		}
		str_array_length1 = i;
		_tmp16_ = strlen ((const gchar*) separator);
		_tmp17_ = _tmp16_;
		len += (gsize) (_tmp17_ * (i - 1));
		_tmp18_ = g_malloc (len);
		res = _tmp18_;
		_tmp20_ = str_array[0];
		if (_tmp20_ != NULL) {
			const gchar* _tmp21_;
			_tmp21_ = str_array[0];
			_tmp19_ = (const gchar*) _tmp21_;
		} else {
			_tmp19_ = "";
		}
		_tmp22_ = res;
		_tmp23_ = g_stpcpy ((void*) _tmp22_, _tmp19_);
		ptr = _tmp23_;
		{
			gboolean _tmp24_ = FALSE;
			i = 1;
			_tmp24_ = TRUE;
			while (TRUE) {
				void* _tmp26_;
				void* _tmp27_;
				const gchar* _tmp28_ = NULL;
				const gchar* _tmp29_;
				void* _tmp31_;
				void* _tmp32_;
				if (!_tmp24_) {
					gint _tmp25_;
					_tmp25_ = i;
					i = _tmp25_ + 1;
				}
				_tmp24_ = FALSE;
				if (!(i < str_array_length1)) {
					break;
				}
				_tmp26_ = ptr;
				_tmp27_ = g_stpcpy (_tmp26_, (const gchar*) separator);
				ptr = _tmp27_;
				_tmp29_ = str_array[i];
				if (_tmp29_ != NULL) {
					const gchar* _tmp30_;
					_tmp30_ = str_array[i];
					_tmp28_ = (const gchar*) _tmp30_;
				} else {
					_tmp28_ = "";
				}
				_tmp31_ = ptr;
				_tmp32_ = g_stpcpy (_tmp31_, _tmp28_);
				ptr = _tmp32_;
			}
		}
		_tmp33_ = res;
		res = NULL;
		result = (gchar*) _tmp33_;
		return result;
	} else {
		gchar* _tmp34_;
		_tmp34_ = g_strdup ("");
		result = _tmp34_;
		return result;
	}
}

gchar*
tuba_views_notifications_get_notifications_excluded_types_query_param (void)
{
	TubaSettings* _tmp0_;
	gchar** _tmp1_;
	gint _tmp1__length1;
	gint _tmp2_ = 0;
	gchar** _tmp3_;
	gint _tmp3__length1;
	TubaSettings* _tmp5_;
	gchar** _tmp6_;
	gint _tmp6__length1;
	gint _tmp7_ = 0;
	gchar** _tmp8_;
	gint _tmp8__length1;
	gchar* _tmp9_;
	gchar* _tmp10_;
	const gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* result;
	_tmp0_ = tuba_settings;
	_tmp1_ = tuba_settings_get_notification_filters (_tmp0_, &_tmp2_);
	_tmp1__length1 = _tmp2_;
	_tmp3_ = _tmp1_;
	_tmp3__length1 = _tmp1__length1;
	if (_tmp3__length1 == 0) {
		gchar* _tmp4_;
		_tmp4_ = g_strdup ("");
		result = _tmp4_;
		return result;
	}
	_tmp5_ = tuba_settings;
	_tmp6_ = tuba_settings_get_notification_filters (_tmp5_, &_tmp7_);
	_tmp6__length1 = _tmp7_;
	_tmp8_ = _tmp6_;
	_tmp8__length1 = _tmp6__length1;
	_tmp9_ = _vala_g_strjoinv ("&exclude_types[]=", _tmp8_, (gint) _tmp8__length1);
	_tmp10_ = _tmp9_;
	_tmp11_ = string_to_string (_tmp10_);
	_tmp12_ = g_strconcat ("?exclude_types[]=", _tmp11_, NULL);
	_tmp13_ = _tmp12_;
	_g_free0 (_tmp10_);
	result = _tmp13_;
	return result;
}

void
tuba_views_notifications_filters_changed (TubaViewsNotifications* self,
                                          gboolean refresh)
{
	gint _tmp0_ = 0;
	gchar* new_url = NULL;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	TubaSettings* _tmp5_;
	gchar** _tmp6_;
	gint _tmp6__length1;
	gint _tmp7_ = 0;
	gchar** _tmp8_;
	gint _tmp8__length1;
	const gchar* _tmp13_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	const gchar* _tmp16_;
	g_return_if_fail (self != NULL);
	if (self->priv->enabled_group_notifications) {
		_tmp0_ = 2;
	} else {
		_tmp0_ = 1;
	}
	_tmp1_ = g_strdup_printf ("%i", _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strconcat ("/api/v", _tmp2_, "/notifications", NULL);
	_tmp4_ = _tmp3_;
	_g_free0 (_tmp2_);
	new_url = _tmp4_;
	_tmp5_ = tuba_settings;
	_tmp6_ = tuba_settings_get_notification_filters (_tmp5_, &_tmp7_);
	_tmp6__length1 = _tmp7_;
	_tmp8_ = _tmp6_;
	_tmp8__length1 = _tmp6__length1;
	if (_tmp8__length1 == 0) {
		tuba_views_notifications_set_is_all (self, TRUE);
	} else {
		const gchar* _tmp9_;
		gchar* _tmp10_;
		gchar* _tmp11_;
		gchar* _tmp12_;
		tuba_views_notifications_set_is_all (self, FALSE);
		_tmp9_ = new_url;
		_tmp10_ = tuba_views_notifications_get_notifications_excluded_types_query_param ();
		_tmp11_ = _tmp10_;
		_tmp12_ = g_strconcat (_tmp9_, _tmp11_, NULL);
		_g_free0 (new_url);
		new_url = _tmp12_;
		_g_free0 (_tmp11_);
	}
	_tmp13_ = new_url;
	_tmp14_ = tuba_views_timeline_get_url ((TubaViewsTimeline*) self);
	_tmp15_ = _tmp14_;
	if (g_strcmp0 (_tmp13_, _tmp15_) == 0) {
		_g_free0 (new_url);
		return;
	}
	_tmp16_ = new_url;
	tuba_views_timeline_set_url ((TubaViewsTimeline*) self, _tmp16_);
	if (refresh) {
		tuba_views_timeline_set_page_next ((TubaViewsTimeline*) self, NULL);
		tuba_views_timeline_on_refresh ((TubaViewsTimeline*) self);
	}
	_g_free0 (new_url);
}

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

static void
tuba_views_notifications_real_on_new_post (TubaViewsTimeline* base,
                                           TubaStreamableEvent* ev)
{
	TubaViewsNotifications * self;
	GError* _inner_error0_ = NULL;
	self = (TubaViewsNotifications*) base;
	g_return_if_fail (ev != NULL);
	{
		JsonNode* _tmp0_ = NULL;
		JsonNode* _tmp1_;
		TubaEntity* _tmp2_ = NULL;
		TubaEntity* _tmp3_;
		TubaAPINotification* entity = NULL;
		TubaAPINotification* _tmp4_;
		gboolean _tmp5_ = FALSE;
		TubaSettings* _tmp6_;
		gchar** _tmp7_;
		gint _tmp7__length1;
		gint _tmp8_ = 0;
		gchar** _tmp9_;
		gint _tmp9__length1;
		gboolean _tmp17_ = FALSE;
		gboolean _tmp18_ = FALSE;
		_tmp1_ = tuba_streamable_event_get_node (ev, &_inner_error0_);
		_tmp0_ = _tmp1_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp3_ = tuba_entity_from_json (TUBA_API_TYPE_NOTIFICATION, _tmp0_, &_inner_error0_);
		_tmp2_ = _tmp3_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			__vala_JsonNode_free0 (_tmp0_);
			goto __catch0_g_error;
		}
		_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TUBA_API_TYPE_NOTIFICATION, TubaAPINotification));
		entity = _tmp4_;
		_tmp6_ = tuba_settings;
		_tmp7_ = tuba_settings_get_notification_filters (_tmp6_, &_tmp8_);
		_tmp7__length1 = _tmp8_;
		_tmp9_ = _tmp7_;
		_tmp9__length1 = _tmp7__length1;
		if (_tmp9__length1 > 0) {
			TubaAPINotification* _tmp10_;
			const gchar* _tmp11_;
			const gchar* _tmp12_;
			TubaSettings* _tmp13_;
			gchar** _tmp14_;
			gint _tmp14__length1;
			gint _tmp15_ = 0;
			gchar** _tmp16_;
			gint _tmp16__length1;
			_tmp10_ = entity;
			_tmp11_ = tuba_api_notification_get_kind (_tmp10_);
			_tmp12_ = _tmp11_;
			_tmp13_ = tuba_settings;
			_tmp14_ = tuba_settings_get_notification_filters (_tmp13_, &_tmp15_);
			_tmp14__length1 = _tmp15_;
			_tmp16_ = _tmp14_;
			_tmp16__length1 = _tmp14__length1;
			_tmp5_ = _vala_string_array_contains (_tmp16_, _tmp16__length1, _tmp12_);
		} else {
			_tmp5_ = FALSE;
		}
		if (_tmp5_) {
			_g_object_unref0 (entity);
			_g_object_unref0 (_tmp2_);
			__vala_JsonNode_free0 (_tmp0_);
			return;
		}
		if (self->priv->enabled_group_notifications) {
			TubaAPINotification* _tmp19_;
			const gchar* _tmp20_;
			const gchar* _tmp21_;
			_tmp19_ = entity;
			_tmp20_ = tuba_api_notification_get_group_key (_tmp19_);
			_tmp21_ = _tmp20_;
			_tmp18_ = _tmp21_ != NULL;
		} else {
			_tmp18_ = FALSE;
		}
		if (_tmp18_) {
			TubaAPINotification* _tmp22_;
			const gchar* _tmp23_;
			const gchar* _tmp24_;
			_tmp22_ = entity;
			_tmp23_ = tuba_api_notification_get_group_key (_tmp22_);
			_tmp24_ = _tmp23_;
			_tmp17_ = !g_str_has_prefix (_tmp24_, "ungrouped-");
		} else {
			_tmp17_ = FALSE;
		}
		if (_tmp17_) {
			TubaAPIGroupedNotificationsResultsNotificationGroup* group = NULL;
			TubaAPIGroupedNotificationsResultsNotificationGroup* _tmp41_;
			group = NULL;
			{
				guint i = 0U;
				i = (guint) 0;
				{
					gboolean _tmp25_ = FALSE;
					_tmp25_ = TRUE;
					while (TRUE) {
						GListStore* _tmp27_;
						TubaAPIGroupedNotificationsResultsNotificationGroup* notification_obj = NULL;
						GListStore* _tmp28_;
						GObject* _tmp29_;
						TubaAPIGroupedNotificationsResultsNotificationGroup* _tmp30_;
						gboolean _tmp31_ = FALSE;
						TubaAPIGroupedNotificationsResultsNotificationGroup* _tmp32_;
						if (!_tmp25_) {
							guint _tmp26_;
							_tmp26_ = i;
							i = _tmp26_ + 1;
						}
						_tmp25_ = FALSE;
						_tmp27_ = ((TubaViewsContentBase*) self)->model;
						if (!(i < g_list_model_get_n_items ((GListModel*) _tmp27_))) {
							break;
						}
						_tmp28_ = ((TubaViewsContentBase*) self)->model;
						_tmp29_ = g_list_model_get_item ((GListModel*) _tmp28_, i);
						_tmp30_ = TUBA_API_GROUPED_NOTIFICATIONS_RESULTS_IS_NOTIFICATION_GROUP (_tmp29_) ? ((TubaAPIGroupedNotificationsResultsNotificationGroup*) _tmp29_) : NULL;
						if (_tmp30_ == NULL) {
							_g_object_unref0 (_tmp29_);
						}
						notification_obj = _tmp30_;
						_tmp32_ = notification_obj;
						if (_tmp32_ != NULL) {
							TubaAPIGroupedNotificationsResultsNotificationGroup* _tmp33_;
							const gchar* _tmp34_;
							const gchar* _tmp35_;
							TubaAPINotification* _tmp36_;
							const gchar* _tmp37_;
							const gchar* _tmp38_;
							_tmp33_ = notification_obj;
							_tmp34_ = tuba_api_notification_get_group_key ((TubaAPINotification*) _tmp33_);
							_tmp35_ = _tmp34_;
							_tmp36_ = entity;
							_tmp37_ = tuba_api_notification_get_group_key (_tmp36_);
							_tmp38_ = _tmp37_;
							_tmp31_ = g_strcmp0 (_tmp35_, _tmp38_) == 0;
						} else {
							_tmp31_ = FALSE;
						}
						if (_tmp31_) {
							TubaAPIGroupedNotificationsResultsNotificationGroup* _tmp39_;
							TubaAPIGroupedNotificationsResultsNotificationGroup* _tmp40_;
							_tmp39_ = notification_obj;
							_tmp40_ = _g_object_ref0 (_tmp39_);
							_g_object_unref0 (group);
							group = _tmp40_;
							tuba_views_timeline_safely_remove ((TubaViewsTimeline*) self, (gint) i);
							_g_object_unref0 (notification_obj);
							break;
						}
						_g_object_unref0 (notification_obj);
					}
				}
			}
			_tmp41_ = group;
			if (_tmp41_ != NULL) {
				TubaAPIGroupedNotificationsResultsNotificationGroup* _tmp42_;
				TubaAPINotification* _tmp43_;
				TubaAPIGroupedNotificationsResultsNotificationGroup* _tmp44_;
				GeeArrayList* _tmp45_;
				GeeArrayList* _tmp46_;
				TubaAPIGroupedNotificationsResultsNotificationGroup* _tmp50_;
				GeeArrayList* _tmp51_;
				GeeArrayList* _tmp52_;
				TubaAPINotification* _tmp53_;
				TubaAPIAccount* _tmp54_;
				TubaAPIAccount* _tmp55_;
				TubaAPIGroupedNotificationsResultsNotificationGroup* _tmp56_;
				GeeArrayList* _tmp57_;
				GeeArrayList* _tmp58_;
				TubaAPIGroupedNotificationsResultsNotificationGroup* _tmp62_;
				GeeArrayList* _tmp63_;
				GeeArrayList* _tmp64_;
				TubaAPINotification* _tmp65_;
				TubaAPIAccount* _tmp66_;
				TubaAPIAccount* _tmp67_;
				const gchar* _tmp68_;
				const gchar* _tmp69_;
				TubaAPIGroupedNotificationsResultsNotificationGroup* _tmp70_;
				_tmp42_ = group;
				_tmp43_ = entity;
				tuba_entity_patch ((TubaEntity*) _tmp42_, (GObject*) _tmp43_);
				_tmp44_ = group;
				_tmp45_ = tuba_api_grouped_notifications_results_notification_group_get_tuba_accounts (_tmp44_);
				_tmp46_ = _tmp45_;
				if (_tmp46_ == NULL) {
					TubaAPIGroupedNotificationsResultsNotificationGroup* _tmp47_;
					GeeArrayList* _tmp48_;
					GeeArrayList* _tmp49_;
					_tmp47_ = group;
					_tmp48_ = gee_array_list_new (TUBA_API_TYPE_ACCOUNT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
					_tmp49_ = _tmp48_;
					tuba_api_grouped_notifications_results_notification_group_set_tuba_accounts (_tmp47_, _tmp49_);
					_g_object_unref0 (_tmp49_);
				}
				_tmp50_ = group;
				_tmp51_ = tuba_api_grouped_notifications_results_notification_group_get_tuba_accounts (_tmp50_);
				_tmp52_ = _tmp51_;
				_tmp53_ = entity;
				_tmp54_ = tuba_api_notification_get_account (_tmp53_);
				_tmp55_ = _tmp54_;
				gee_abstract_list_insert ((GeeAbstractList*) _tmp52_, 0, _tmp55_);
				_tmp56_ = group;
				_tmp57_ = tuba_api_grouped_notifications_results_notification_group_get_sample_account_ids (_tmp56_);
				_tmp58_ = _tmp57_;
				if (_tmp58_ == NULL) {
					TubaAPIGroupedNotificationsResultsNotificationGroup* _tmp59_;
					GeeArrayList* _tmp60_;
					GeeArrayList* _tmp61_;
					_tmp59_ = group;
					_tmp60_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
					_tmp61_ = _tmp60_;
					tuba_api_grouped_notifications_results_notification_group_set_sample_account_ids (_tmp59_, _tmp61_);
					_g_object_unref0 (_tmp61_);
				}
				_tmp62_ = group;
				_tmp63_ = tuba_api_grouped_notifications_results_notification_group_get_sample_account_ids (_tmp62_);
				_tmp64_ = _tmp63_;
				_tmp65_ = entity;
				_tmp66_ = tuba_api_notification_get_account (_tmp65_);
				_tmp67_ = _tmp66_;
				_tmp68_ = tuba_api_account_get_id (_tmp67_);
				_tmp69_ = _tmp68_;
				gee_abstract_list_insert ((GeeAbstractList*) _tmp64_, 0, _tmp69_);
				_tmp70_ = group;
				tuba_views_timeline_on_new_post_entity ((TubaViewsTimeline*) self, (TubaEntity*) _tmp70_);
			} else {
				TubaAPINotification* _tmp71_;
				TubaAPIGroupedNotificationsResultsNotificationGroup* _tmp72_;
				TubaAPIGroupedNotificationsResultsNotificationGroup* _tmp73_;
				_tmp71_ = entity;
				_tmp72_ = tuba_api_grouped_notifications_results_notification_group_new_from_notification (_tmp71_);
				_tmp73_ = _tmp72_;
				tuba_views_timeline_on_new_post_entity ((TubaViewsTimeline*) self, (TubaEntity*) _tmp73_);
				_g_object_unref0 (_tmp73_);
			}
			_g_object_unref0 (group);
		} else {
			TubaAPINotification* _tmp74_;
			_tmp74_ = entity;
			tuba_views_timeline_on_new_post_entity ((TubaViewsTimeline*) self, (TubaEntity*) _tmp74_);
		}
		_g_object_unref0 (entity);
		_g_object_unref0 (_tmp2_);
		__vala_JsonNode_free0 (_tmp0_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp75_;
		const gchar* _tmp76_;
		const gchar* _tmp77_;
		gchar* _tmp78_;
		gchar* _tmp79_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp75_ = e;
		_tmp76_ = _tmp75_->message;
		_tmp77_ = string_to_string (_tmp76_);
		_tmp78_ = g_strconcat ("Error getting Entity from json: ", _tmp77_, NULL);
		_tmp79_ = _tmp78_;
		g_warning ("Notifications.vala:346: %s", _tmp79_);
		_g_free0 (_tmp79_);
		_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;
	}
}

static void
tuba_views_notifications_real_on_edit_post (TubaViewsTimeline* base,
                                            TubaStreamableEvent* ev)
{
	TubaViewsNotifications * self;
	GError* _inner_error0_ = NULL;
	self = (TubaViewsNotifications*) base;
	g_return_if_fail (ev != NULL);
	{
		JsonNode* _tmp0_ = NULL;
		JsonNode* _tmp1_;
		TubaEntity* _tmp2_ = NULL;
		TubaEntity* _tmp3_;
		TubaAPIStatus* entity = NULL;
		TubaAPIStatus* _tmp4_;
		gchar* entity_id = NULL;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp1_ = tuba_streamable_event_get_node (ev, &_inner_error0_);
		_tmp0_ = _tmp1_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp3_ = tuba_entity_from_json (TUBA_API_TYPE_STATUS, _tmp0_, &_inner_error0_);
		_tmp2_ = _tmp3_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			__vala_JsonNode_free0 (_tmp0_);
			goto __catch0_g_error;
		}
		_tmp4_ = _g_object_ref0 (TUBA_API_IS_STATUS (_tmp2_) ? ((TubaAPIStatus*) _tmp2_) : NULL);
		entity = _tmp4_;
		if (entity == NULL) {
			_g_object_unref0 (entity);
			_g_object_unref0 (_tmp2_);
			__vala_JsonNode_free0 (_tmp0_);
			return;
		}
		_tmp5_ = tuba_api_status_get_id (entity);
		_tmp6_ = _tmp5_;
		_tmp7_ = g_strdup (_tmp6_);
		entity_id = _tmp7_;
		{
			guint i = 0U;
			i = (guint) 0;
			{
				gboolean _tmp8_ = FALSE;
				_tmp8_ = TRUE;
				while (TRUE) {
					GListStore* _tmp10_;
					TubaAPINotification* notification_obj = NULL;
					GListStore* _tmp11_;
					GObject* _tmp12_;
					TubaAPINotification* _tmp13_;
					gboolean _tmp14_ = FALSE;
					gboolean _tmp15_ = FALSE;
					TubaAPINotification* _tmp16_;
					if (!_tmp8_) {
						guint _tmp9_;
						_tmp9_ = i;
						i = _tmp9_ + 1;
					}
					_tmp8_ = FALSE;
					_tmp10_ = ((TubaViewsContentBase*) self)->model;
					if (!(i < g_list_model_get_n_items ((GListModel*) _tmp10_))) {
						break;
					}
					_tmp11_ = ((TubaViewsContentBase*) self)->model;
					_tmp12_ = g_list_model_get_item ((GListModel*) _tmp11_, i);
					_tmp13_ = TUBA_API_IS_NOTIFICATION (_tmp12_) ? ((TubaAPINotification*) _tmp12_) : NULL;
					if (_tmp13_ == NULL) {
						_g_object_unref0 (_tmp12_);
					}
					notification_obj = _tmp13_;
					_tmp16_ = notification_obj;
					if (_tmp16_ != NULL) {
						TubaAPINotification* _tmp17_;
						TubaAPIStatus* _tmp18_;
						TubaAPIStatus* _tmp19_;
						_tmp17_ = notification_obj;
						_tmp18_ = tuba_api_notification_get_status (_tmp17_);
						_tmp19_ = _tmp18_;
						_tmp15_ = _tmp19_ != NULL;
					} else {
						_tmp15_ = FALSE;
					}
					if (_tmp15_) {
						TubaAPINotification* _tmp20_;
						TubaAPIStatus* _tmp21_;
						TubaAPIStatus* _tmp22_;
						const gchar* _tmp23_;
						const gchar* _tmp24_;
						const gchar* _tmp25_;
						_tmp20_ = notification_obj;
						_tmp21_ = tuba_api_notification_get_status (_tmp20_);
						_tmp22_ = _tmp21_;
						_tmp23_ = tuba_api_status_get_id (_tmp22_);
						_tmp24_ = _tmp23_;
						_tmp25_ = entity_id;
						_tmp14_ = g_strcmp0 (_tmp24_, _tmp25_) == 0;
					} else {
						_tmp14_ = FALSE;
					}
					if (_tmp14_) {
						gboolean had_focus = FALSE;
						GListStore* _tmp26_;
						TubaAPINotification* _tmp27_;
						GListStore* _tmp28_;
						TubaAPINotification* _tmp29_;
						had_focus = tuba_views_timeline_was_focused ((TubaViewsTimeline*) self, (gint) i);
						_tmp26_ = ((TubaViewsContentBase*) self)->model;
						g_list_store_remove (_tmp26_, i);
						_tmp27_ = notification_obj;
						tuba_api_notification_set_status (_tmp27_, entity);
						_tmp28_ = ((TubaViewsContentBase*) self)->model;
						_tmp29_ = notification_obj;
						g_list_store_insert (_tmp28_, i, (GObject*) _tmp29_);
						if (had_focus) {
							tuba_views_timeline_focus_recover_actual ((TubaViewsTimeline*) self, (gint) i);
						}
					}
					_g_object_unref0 (notification_obj);
				}
			}
		}
		_g_free0 (entity_id);
		_g_object_unref0 (entity);
		_g_object_unref0 (_tmp2_);
		__vala_JsonNode_free0 (_tmp0_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp30_;
		const gchar* _tmp31_;
		const gchar* _tmp32_;
		gchar* _tmp33_;
		gchar* _tmp34_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp30_ = e;
		_tmp31_ = _tmp30_->message;
		_tmp32_ = string_to_string (_tmp31_);
		_tmp33_ = g_strconcat ("Error getting Entity from json: ", _tmp32_, NULL);
		_tmp34_ = _tmp33_;
		g_warning ("Notifications.vala:367: %s", _tmp34_);
		_g_free0 (_tmp34_);
		_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;
	}
}

static void
tuba_views_notifications_real_on_delete_post (TubaViewsTimeline* base,
                                              TubaStreamableEvent* ev)
{
	TubaViewsNotifications * self;
	GError* _inner_error0_ = NULL;
	self = (TubaViewsNotifications*) base;
	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_;
					TubaAPINotification* notification_obj = NULL;
					GListStore* _tmp4_;
					GObject* _tmp5_;
					TubaAPINotification* _tmp6_;
					gboolean _tmp7_ = FALSE;
					gboolean _tmp8_ = FALSE;
					TubaAPINotification* _tmp9_;
					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_NOTIFICATION (_tmp5_) ? ((TubaAPINotification*) _tmp5_) : NULL;
					if (_tmp6_ == NULL) {
						_g_object_unref0 (_tmp5_);
					}
					notification_obj = _tmp6_;
					_tmp9_ = notification_obj;
					if (_tmp9_ != NULL) {
						TubaAPINotification* _tmp10_;
						TubaAPIStatus* _tmp11_;
						TubaAPIStatus* _tmp12_;
						_tmp10_ = notification_obj;
						_tmp11_ = tuba_api_notification_get_status (_tmp10_);
						_tmp12_ = _tmp11_;
						_tmp8_ = _tmp12_ != NULL;
					} else {
						_tmp8_ = FALSE;
					}
					if (_tmp8_) {
						TubaAPINotification* _tmp13_;
						TubaAPIStatus* _tmp14_;
						TubaAPIStatus* _tmp15_;
						TubaAPIStatus* _tmp16_;
						TubaAPIStatus* _tmp17_;
						const gchar* _tmp18_;
						const gchar* _tmp19_;
						const gchar* _tmp20_;
						_tmp13_ = notification_obj;
						_tmp14_ = tuba_api_notification_get_status (_tmp13_);
						_tmp15_ = _tmp14_;
						_tmp16_ = tuba_api_status_get_formal (_tmp15_);
						_tmp17_ = _tmp16_;
						_tmp18_ = tuba_api_status_get_id (_tmp17_);
						_tmp19_ = _tmp18_;
						_tmp20_ = status_id;
						_tmp7_ = g_strcmp0 (_tmp19_, _tmp20_) == 0;
					} else {
						_tmp7_ = FALSE;
					}
					if (_tmp7_) {
						tuba_views_timeline_safely_remove ((TubaViewsTimeline*) self, (gint) i);
					}
					_g_object_unref0 (notification_obj);
				}
			}
		}
		_g_free0 (status_id);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp21_;
		const gchar* _tmp22_;
		const gchar* _tmp23_;
		gchar* _tmp24_;
		gchar* _tmp25_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp21_ = e;
		_tmp22_ = _tmp21_->message;
		_tmp23_ = string_to_string (_tmp22_);
		_tmp24_ = g_strconcat ("Error getting String from json: ", _tmp23_, NULL);
		_tmp25_ = _tmp24_;
		g_warning ("Notifications.vala:382: %s", _tmp25_);
		_g_free0 (_tmp25_);
		_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;
	}
}

TubaViewsNotifications*
tuba_views_notifications_construct (GType object_type)
{
	TubaViewsNotifications * self = NULL;
	self = (TubaViewsNotifications*) tuba_views_timeline_construct (object_type);
	return self;
}

TubaViewsNotifications*
tuba_views_notifications_new (void)
{
	return tuba_views_notifications_construct (TUBA_VIEWS_TYPE_NOTIFICATIONS);
}

void
tuba_views_notifications_set_filtered_notifications (TubaViewsNotifications* self,
                                                     gint32 value)
{
	AdwBanner* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->notifications_filter_banner;
	if (_tmp0_ == NULL) {
		return;
	}
	if (value > ((gint32) 0)) {
		AdwBanner* _tmp1_;
		gchar* _tmp2_;
		gchar* _tmp3_;
		AdwBanner* _tmp4_;
		_tmp1_ = self->priv->notifications_filter_banner;
		_tmp2_ = g_strdup_printf (ngettext ("%d Filtered Notification", "%d Filtered Notifications", (gulong) value), (gint) value);
		_tmp3_ = _tmp2_;
		adw_banner_set_title (_tmp1_, _tmp3_);
		_g_free0 (_tmp3_);
		_tmp4_ = self->priv->notifications_filter_banner;
		adw_banner_set_revealed (_tmp4_, TRUE);
	} else {
		AdwBanner* _tmp5_;
		_tmp5_ = self->priv->notifications_filter_banner;
		adw_banner_set_revealed (_tmp5_, FALSE);
	}
	g_object_notify_by_pspec ((GObject *) self, tuba_views_notifications_properties[TUBA_VIEWS_NOTIFICATIONS_FILTERED_NOTIFICATIONS_PROPERTY]);
}

static void
tuba_views_notifications_set_is_all (TubaViewsNotifications* self,
                                     gboolean value)
{
	g_return_if_fail (self != NULL);
	if (value) {
		gtk_widget_add_css_class ((GtkWidget*) self, "notifications-all");
	} else {
		gtk_widget_remove_css_class ((GtkWidget*) self, "notifications-all");
	}
}

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

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_notifications_on_notifications_filter_banner_button_clicked_adw_banner_button_clicked (AdwBanner* _sender,
                                                                                                   gpointer self)
{
	tuba_views_notifications_on_notifications_filter_banner_button_clicked ((TubaViewsNotifications*) self);
}

static void
_tuba_views_notifications_settings_updated_g_object_notify (GObject* _sender,
                                                            GParamSpec* pspec,
                                                            gpointer self)
{
	tuba_views_notifications_settings_updated ((TubaViewsNotifications*) self);
}

static void
_tuba_views_notifications_on_network_change_g_object_notify (GObject* _sender,
                                                             GParamSpec* pspec,
                                                             gpointer self)
{
	tuba_views_notifications_on_network_change ((TubaViewsNotifications*) self);
}

static GObject *
tuba_views_notifications_constructor (GType type,
                                      guint n_construct_properties,
                                      GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TubaViewsNotifications * self;
	gboolean _tmp0_ = FALSE;
	TubaAccountStore* _tmp1_;
	TubaInstanceAccount* _tmp2_;
	TubaInstanceAccount* _tmp3_;
	TubaAPIInstanceV2APIVersions* _tmp4_;
	TubaAPIInstanceV2APIVersions* _tmp5_;
	gint8 _tmp6_;
	gint8 _tmp7_;
	gint _tmp13_ = 0;
	gchar* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	GType _tmp18_ = G_TYPE_NONE;
	gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	gchar* _tmp22_;
	gchar* _tmp23_;
	AdwBanner* _tmp24_ = NULL;
	AdwBanner* _tmp25_;
	GtkBox* box = NULL;
	GtkBox* _tmp26_ = NULL;
	GtkBox* _tmp27_;
	AdwBanner* _tmp28_;
	GtkOverlay* _tmp29_;
	GtkBox* _tmp30_;
	GtkBox* _tmp31_;
	GtkStack* _tmp32_;
	TubaSettings* _tmp33_;
	TubaApplication* _tmp34_;
	parent_class = G_OBJECT_CLASS (tuba_views_notifications_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_TYPE_NOTIFICATIONS, TubaViewsNotifications);
	_tmp1_ = tuba_accounts;
	_tmp2_ = tuba_account_store_get_active (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = tuba_instance_account_get_tuba_api_versions (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = tuba_api_instance_v2_api_versions_get_mastodon (_tmp5_);
	_tmp7_ = _tmp6_;
	if (((gint) _tmp7_) >= 2) {
		_tmp0_ = TRUE;
	} else {
		TubaAccountStore* _tmp8_;
		TubaInstanceAccount* _tmp9_;
		TubaInstanceAccount* _tmp10_;
		TubaInstanceAccountInstanceFeatures _tmp11_;
		TubaInstanceAccountInstanceFeatures _tmp12_;
		_tmp8_ = tuba_accounts;
		_tmp9_ = tuba_account_store_get_active (_tmp8_);
		_tmp10_ = _tmp9_;
		_tmp11_ = tuba_instance_account_get_tuba_instance_features (_tmp10_);
		_tmp12_ = _tmp11_;
		_tmp0_ = (_tmp12_ & TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_GROUP_NOTIFICATIONS) == TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_GROUP_NOTIFICATIONS;
	}
	self->priv->enabled_group_notifications = _tmp0_;
	if (self->priv->enabled_group_notifications) {
		_tmp13_ = 2;
	} else {
		_tmp13_ = 1;
	}
	_tmp14_ = g_strdup_printf ("%i", _tmp13_);
	_tmp15_ = _tmp14_;
	_tmp16_ = g_strconcat ("/api/v", _tmp15_, "/notifications", NULL);
	_tmp17_ = _tmp16_;
	tuba_views_timeline_set_url ((TubaViewsTimeline*) self, _tmp17_);
	_g_free0 (_tmp17_);
	_g_free0 (_tmp15_);
	tuba_views_base_set_label ((TubaViewsBase*) self, _ ("Notifications"));
	tuba_views_base_set_icon ((TubaViewsBase*) self, "tuba-bell-outline-symbolic");
	if (self->priv->enabled_group_notifications) {
		_tmp18_ = TUBA_API_GROUPED_NOTIFICATIONS_RESULTS_TYPE_NOTIFICATION_GROUP;
	} else {
		_tmp18_ = TUBA_API_TYPE_NOTIFICATION;
	}
	tuba_views_timeline_set_accepts ((TubaViewsTimeline*) self, _tmp18_);
	tuba_views_base_set_badge_number ((TubaViewsBase*) self, 0);
	tuba_views_base_set_needs_attention ((TubaViewsBase*) self, FALSE);
	tuba_views_base_set_empty_state_title ((TubaViewsBase*) self, _ ("No Notifications"));
	tuba_views_notifications_filters_changed (self, FALSE);
	_tmp19_ = g_strconcat ("stream-event::", TUBA_INSTANCE_ACCOUNT_EVENT_NOTIFICATION, NULL);
	g_signal_connect_object ((TubaStreamable*) self, _tmp19_, (GCallback) _tuba_views_timeline_on_new_post_tuba_streamable_stream_event, (TubaViewsTimeline*) self, 0);
	_g_free0 (_tmp19_);
	_tmp20_ = g_strconcat ("stream-event::", TUBA_INSTANCE_ACCOUNT_EVENT_NOTIFICATIONS_MERGED, NULL);
	g_signal_connect_object ((TubaStreamable*) self, _tmp20_, (GCallback) _tuba_views_timeline_on_refresh_tuba_streamable_stream_event, (TubaViewsTimeline*) self, 0);
	_g_free0 (_tmp20_);
	_tmp21_ = g_strconcat ("stream-event::", TUBA_INSTANCE_ACCOUNT_EVENT_EDIT_POST, NULL);
	g_signal_connect_object ((TubaStreamable*) self, _tmp21_, (GCallback) _tuba_views_timeline_on_edit_post_tuba_streamable_stream_event, (TubaViewsTimeline*) self, 0);
	_g_free0 (_tmp21_);
	_tmp22_ = g_strconcat ("stream-event::", TUBA_INSTANCE_ACCOUNT_EVENT_DELETE_POST, NULL);
	g_signal_connect_object ((TubaStreamable*) self, _tmp22_, (GCallback) _tuba_views_timeline_on_delete_post_tuba_streamable_stream_event, (TubaViewsTimeline*) self, 0);
	_g_free0 (_tmp22_);
	_tmp23_ = g_strdup (_ ("View"));
	_tmp24_ = (AdwBanner*) adw_banner_new ("");
	adw_banner_set_use_markup (_tmp24_, TRUE);
	adw_banner_set_button_label (_tmp24_, _tmp23_);
	_g_free0 (_tmp23_);
	adw_banner_set_revealed (_tmp24_, FALSE);
	g_object_ref_sink (_tmp24_);
	_g_object_unref0 (self->priv->notifications_filter_banner);
	self->priv->notifications_filter_banner = _tmp24_;
	_tmp25_ = self->priv->notifications_filter_banner;
	g_signal_connect_object (_tmp25_, "button-clicked", (GCallback) _tuba_views_notifications_on_notifications_filter_banner_button_clicked_adw_banner_button_clicked, self, 0);
	_tmp26_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp26_, TRUE);
	g_object_ref_sink (_tmp26_);
	box = _tmp26_;
	_tmp27_ = box;
	_tmp28_ = self->priv->notifications_filter_banner;
	gtk_box_append (_tmp27_, (GtkWidget*) _tmp28_);
	_tmp29_ = ((TubaViewsBase*) self)->scrolled_overlay;
	_tmp30_ = box;
	gtk_overlay_set_child (_tmp29_, (GtkWidget*) _tmp30_);
	_tmp31_ = box;
	_tmp32_ = ((TubaViewsBase*) self)->states;
	gtk_box_append (_tmp31_, (GtkWidget*) _tmp32_);
	_tmp33_ = tuba_settings;
	g_signal_connect_object ((GObject*) _tmp33_, "notify::dim-trivial-notifications", (GCallback) _tuba_views_notifications_settings_updated_g_object_notify, self, 0);
	tuba_views_notifications_settings_updated (self);
	_tmp34_ = tuba_app;
	g_signal_connect_object ((GObject*) _tmp34_, "notify::is-online", (GCallback) _tuba_views_notifications_on_network_change_g_object_notify, self, 0);
	_g_object_unref0 (box);
	return obj;
}

static void
tuba_views_notifications_class_init (TubaViewsNotificationsClass * klass,
                                     gpointer klass_data)
{
	tuba_views_notifications_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaViewsNotifications_private_offset);
	((TubaViewsContentBaseClass *) klass)->on_scrolled_vadjustment_value_change = (void (*) (TubaViewsContentBase*)) tuba_views_notifications_real_on_scrolled_vadjustment_value_change;
	((TubaViewsTimelineClass *) klass)->should_hide = (gboolean (*) (TubaViewsTimeline*, TubaEntity*)) tuba_views_notifications_real_should_hide;
	((TubaViewsTimelineClass *) klass)->on_account_changed = (void (*) (TubaViewsTimeline*, TubaInstanceAccount*)) tuba_views_notifications_real_on_account_changed;
	((TubaViewsBaseClass *) klass)->on_shown = (void (*) (TubaViewsBase*)) tuba_views_notifications_real_on_shown;
	((TubaViewsBaseClass *) klass)->on_hidden = (void (*) (TubaViewsBase*)) tuba_views_notifications_real_on_hidden;
	((TubaViewsTimelineClass *) klass)->request = (void (*) (TubaViewsTimeline*, GAsyncReadyCallback, gpointer)) tuba_views_notifications_real_request;
	((TubaViewsTimelineClass *) klass)->request_finish = (void (*) (TubaViewsTimeline*, GAsyncResult*)) tuba_views_notifications_request_finish;
	((TubaViewsTimelineClass *) klass)->get_stream_url = (gchar* (*) (TubaViewsTimeline*)) tuba_views_notifications_real_get_stream_url;
	((TubaViewsTimelineClass *) klass)->on_new_post = (void (*) (TubaViewsTimeline*, TubaStreamableEvent*)) tuba_views_notifications_real_on_new_post;
	((TubaViewsTimelineClass *) klass)->on_edit_post = (void (*) (TubaViewsTimeline*, TubaStreamableEvent*)) tuba_views_notifications_real_on_edit_post;
	((TubaViewsTimelineClass *) klass)->on_delete_post = (void (*) (TubaViewsTimeline*, TubaStreamableEvent*)) tuba_views_notifications_real_on_delete_post;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_views_notifications_set_property;
	G_OBJECT_CLASS (klass)->constructor = tuba_views_notifications_constructor;
	G_OBJECT_CLASS (klass)->finalize = tuba_views_notifications_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_NOTIFICATIONS_FILTERED_NOTIFICATIONS_PROPERTY, tuba_views_notifications_properties[TUBA_VIEWS_NOTIFICATIONS_FILTERED_NOTIFICATIONS_PROPERTY] = g_param_spec_int ("filtered-notifications", "filtered-notifications", "filtered-notifications", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE));
}

static void
tuba_views_notifications_tuba_account_holder_interface_init (TubaAccountHolderIface * iface,
                                                             gpointer iface_data)
{
	tuba_views_notifications_tuba_account_holder_parent_iface = g_type_interface_peek_parent (iface);
	iface->on_account_changed = (void (*) (TubaAccountHolder*, TubaInstanceAccount*)) tuba_views_notifications_real_on_account_changed;
}

static void
tuba_views_notifications_tuba_streamable_interface_init (TubaStreamableIface * iface,
                                                         gpointer iface_data)
{
	tuba_views_notifications_tuba_streamable_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_stream_url = (gchar* (*) (TubaStreamable*)) tuba_views_notifications_real_get_stream_url;
}

static void
tuba_views_notifications_instance_init (TubaViewsNotifications * self,
                                        gpointer klass)
{
	self->priv = tuba_views_notifications_get_instance_private (self);
	self->last_account = NULL;
	self->priv->enabled_group_notifications = FALSE;
}

static void
tuba_views_notifications_finalize (GObject * obj)
{
	TubaViewsNotifications * self;
	gchar* _tmp0_;
	guint _tmp1_;
	GQuark _tmp2_;
	GBinding* _tmp3_;
	GBinding* _tmp4_;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_TYPE_NOTIFICATIONS, TubaViewsNotifications);
	g_warning ("Notifications.vala:118: Destroying Notifications");
	_tmp0_ = g_strconcat ("stream-event::", TUBA_INSTANCE_ACCOUNT_EVENT_NOTIFICATION, NULL);
	g_signal_parse_name (_tmp0_, TUBA_TYPE_STREAMABLE, &_tmp1_, &_tmp2_, TRUE);
	g_signal_handlers_disconnect_matched ((TubaStreamable*) self, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, _tmp2_, NULL, (GCallback) _tuba_views_timeline_on_new_post_tuba_streamable_stream_event, (TubaViewsTimeline*) self);
	_g_free0 (_tmp0_);
	_tmp3_ = self->priv->badge_number_binding;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	g_binding_unbind (_tmp4_);
	_g_object_unref0 (self->last_account);
	_g_object_unref0 (self->priv->badge_number_binding);
	_g_object_unref0 (self->priv->filtered_notifications_count_binding);
	_g_object_unref0 (self->priv->notifications_filter_banner);
	G_OBJECT_CLASS (tuba_views_notifications_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_views_notifications_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaViewsNotificationsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_views_notifications_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaViewsNotifications), 0, (GInstanceInitFunc) tuba_views_notifications_instance_init, NULL };
	static const GInterfaceInfo tuba_account_holder_info = { (GInterfaceInitFunc) tuba_views_notifications_tuba_account_holder_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo tuba_streamable_info = { (GInterfaceInitFunc) tuba_views_notifications_tuba_streamable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType tuba_views_notifications_type_id;
	tuba_views_notifications_type_id = g_type_register_static (TUBA_VIEWS_TYPE_TIMELINE, "TubaViewsNotifications", &g_define_type_info, G_TYPE_FLAG_NONE);
	g_type_add_interface_static (tuba_views_notifications_type_id, TUBA_TYPE_ACCOUNT_HOLDER, &tuba_account_holder_info);
	g_type_add_interface_static (tuba_views_notifications_type_id, TUBA_TYPE_STREAMABLE, &tuba_streamable_info);
	TubaViewsNotifications_private_offset = g_type_add_instance_private (tuba_views_notifications_type_id, sizeof (TubaViewsNotificationsPrivate));
	return tuba_views_notifications_type_id;
}

GType
tuba_views_notifications_get_type (void)
{
	static GType tuba_views_notifications_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_views_notifications_type_id__once)) {
		GType tuba_views_notifications_type_id;
		tuba_views_notifications_type_id = tuba_views_notifications_get_type_once ();
		g_once_init_leave_pointer (&tuba_views_notifications_type_id__once, tuba_views_notifications_type_id);
	}
	return tuba_views_notifications_type_id__once;
}

static void
_vala_tuba_views_notifications_set_property (GObject * object,
                                             guint property_id,
                                             const GValue * value,
                                             GParamSpec * pspec)
{
	TubaViewsNotifications * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_VIEWS_TYPE_NOTIFICATIONS, TubaViewsNotifications);
	switch (property_id) {
		case TUBA_VIEWS_NOTIFICATIONS_FILTERED_NOTIFICATIONS_PROPERTY:
		tuba_views_notifications_set_filtered_notifications (self, g_value_get_int (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);
}

