/* conversation_view.c generated by valac 0.56.19, the Vala compiler
 * generated from conversation_view.vala, do not modify */

#include <gtk/gtk.h>
#include "libdino.h"
#include <glib-object.h>
#include <gee.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <float.h>
#include <math.h>
#include <adwaita.h>
#include <gio/gio.h>
#include "xmpp-vala.h"

#define DINO_UI_CONVERSATION_SUMMARY_CONVERSATION_VIEW_MESSAGE_MENU_BOX_OFFSET -20
#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 DINO_UI_CONVERSATION_SUMMARY_TYPE_CONVERSATION_VIEW (dino_ui_conversation_summary_conversation_view_get_type ())
#define DINO_UI_CONVERSATION_SUMMARY_CONVERSATION_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_CONVERSATION_VIEW, DinoUiConversationSummaryConversationView))
#define DINO_UI_CONVERSATION_SUMMARY_CONVERSATION_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_CONVERSATION_SUMMARY_TYPE_CONVERSATION_VIEW, DinoUiConversationSummaryConversationViewClass))
#define DINO_UI_CONVERSATION_SUMMARY_IS_CONVERSATION_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_CONVERSATION_VIEW))
#define DINO_UI_CONVERSATION_SUMMARY_IS_CONVERSATION_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_CONVERSATION_SUMMARY_TYPE_CONVERSATION_VIEW))
#define DINO_UI_CONVERSATION_SUMMARY_CONVERSATION_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_CONVERSATION_VIEW, DinoUiConversationSummaryConversationViewClass))

typedef struct _DinoUiConversationSummaryConversationView DinoUiConversationSummaryConversationView;
typedef struct _DinoUiConversationSummaryConversationViewClass DinoUiConversationSummaryConversationViewClass;
typedef struct _DinoUiConversationSummaryConversationViewPrivate DinoUiConversationSummaryConversationViewPrivate;

#define DINO_UI_CONVERSATION_SUMMARY_TYPE_CONTENT_META_ITEM (dino_ui_conversation_summary_content_meta_item_get_type ())
#define DINO_UI_CONVERSATION_SUMMARY_CONTENT_META_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_CONTENT_META_ITEM, DinoUiConversationSummaryContentMetaItem))
#define DINO_UI_CONVERSATION_SUMMARY_CONTENT_META_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_CONVERSATION_SUMMARY_TYPE_CONTENT_META_ITEM, DinoUiConversationSummaryContentMetaItemClass))
#define DINO_UI_CONVERSATION_SUMMARY_IS_CONTENT_META_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_CONTENT_META_ITEM))
#define DINO_UI_CONVERSATION_SUMMARY_IS_CONTENT_META_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_CONVERSATION_SUMMARY_TYPE_CONTENT_META_ITEM))
#define DINO_UI_CONVERSATION_SUMMARY_CONTENT_META_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_CONTENT_META_ITEM, DinoUiConversationSummaryContentMetaItemClass))

typedef struct _DinoUiConversationSummaryContentMetaItem DinoUiConversationSummaryContentMetaItem;
typedef struct _DinoUiConversationSummaryContentMetaItemClass DinoUiConversationSummaryContentMetaItemClass;

#define DINO_UI_CONVERSATION_SUMMARY_TYPE_CONVERSATION_ITEM_SKELETON (dino_ui_conversation_summary_conversation_item_skeleton_get_type ())
#define DINO_UI_CONVERSATION_SUMMARY_CONVERSATION_ITEM_SKELETON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_CONVERSATION_ITEM_SKELETON, DinoUiConversationSummaryConversationItemSkeleton))
#define DINO_UI_CONVERSATION_SUMMARY_CONVERSATION_ITEM_SKELETON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_CONVERSATION_SUMMARY_TYPE_CONVERSATION_ITEM_SKELETON, DinoUiConversationSummaryConversationItemSkeletonClass))
#define DINO_UI_CONVERSATION_SUMMARY_IS_CONVERSATION_ITEM_SKELETON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_CONVERSATION_ITEM_SKELETON))
#define DINO_UI_CONVERSATION_SUMMARY_IS_CONVERSATION_ITEM_SKELETON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_CONVERSATION_SUMMARY_TYPE_CONVERSATION_ITEM_SKELETON))
#define DINO_UI_CONVERSATION_SUMMARY_CONVERSATION_ITEM_SKELETON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_CONVERSATION_ITEM_SKELETON, DinoUiConversationSummaryConversationItemSkeletonClass))

typedef struct _DinoUiConversationSummaryConversationItemSkeleton DinoUiConversationSummaryConversationItemSkeleton;
typedef struct _DinoUiConversationSummaryConversationItemSkeletonClass DinoUiConversationSummaryConversationItemSkeletonClass;

#define DINO_UI_CONVERSATION_SUMMARY_TYPE_CONTENT_PROVIDER (dino_ui_conversation_summary_content_provider_get_type ())
#define DINO_UI_CONVERSATION_SUMMARY_CONTENT_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_CONTENT_PROVIDER, DinoUiConversationSummaryContentProvider))
#define DINO_UI_CONVERSATION_SUMMARY_CONTENT_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_CONVERSATION_SUMMARY_TYPE_CONTENT_PROVIDER, DinoUiConversationSummaryContentProviderClass))
#define DINO_UI_CONVERSATION_SUMMARY_IS_CONTENT_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_CONTENT_PROVIDER))
#define DINO_UI_CONVERSATION_SUMMARY_IS_CONTENT_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_CONVERSATION_SUMMARY_TYPE_CONTENT_PROVIDER))
#define DINO_UI_CONVERSATION_SUMMARY_CONTENT_PROVIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_CONTENT_PROVIDER, DinoUiConversationSummaryContentProviderClass))

typedef struct _DinoUiConversationSummaryContentProvider DinoUiConversationSummaryContentProvider;
typedef struct _DinoUiConversationSummaryContentProviderClass DinoUiConversationSummaryContentProviderClass;

#define DINO_UI_CONVERSATION_SUMMARY_TYPE_SUBSCRIPTION_NOTITICATION (dino_ui_conversation_summary_subscription_notitication_get_type ())
#define DINO_UI_CONVERSATION_SUMMARY_SUBSCRIPTION_NOTITICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_SUBSCRIPTION_NOTITICATION, DinoUiConversationSummarySubscriptionNotitication))
#define DINO_UI_CONVERSATION_SUMMARY_SUBSCRIPTION_NOTITICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_CONVERSATION_SUMMARY_TYPE_SUBSCRIPTION_NOTITICATION, DinoUiConversationSummarySubscriptionNotiticationClass))
#define DINO_UI_CONVERSATION_SUMMARY_IS_SUBSCRIPTION_NOTITICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_SUBSCRIPTION_NOTITICATION))
#define DINO_UI_CONVERSATION_SUMMARY_IS_SUBSCRIPTION_NOTITICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_CONVERSATION_SUMMARY_TYPE_SUBSCRIPTION_NOTITICATION))
#define DINO_UI_CONVERSATION_SUMMARY_SUBSCRIPTION_NOTITICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_SUBSCRIPTION_NOTITICATION, DinoUiConversationSummarySubscriptionNotiticationClass))

typedef struct _DinoUiConversationSummarySubscriptionNotitication DinoUiConversationSummarySubscriptionNotitication;
typedef struct _DinoUiConversationSummarySubscriptionNotiticationClass DinoUiConversationSummarySubscriptionNotiticationClass;
enum  {
	DINO_UI_CONVERSATION_SUMMARY_CONVERSATION_VIEW_0_PROPERTY,
	DINO_UI_CONVERSATION_SUMMARY_CONVERSATION_VIEW_CONVERSATION_PROPERTY,
	DINO_UI_CONVERSATION_SUMMARY_CONVERSATION_VIEW_NUM_PROPERTIES
};
static GParamSpec* dino_ui_conversation_summary_conversation_view_properties[DINO_UI_CONVERSATION_SUMMARY_CONVERSATION_VIEW_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) ((var == NULL) ? NULL : (var = (g_free (var), NULL)))

#define DINO_UI_TYPE_APPLICATION (dino_ui_application_get_type ())
#define DINO_UI_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_APPLICATION, DinoUiApplication))
#define DINO_UI_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_APPLICATION, DinoUiApplicationClass))
#define DINO_UI_IS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_APPLICATION))
#define DINO_UI_IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_APPLICATION))
#define DINO_UI_APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_APPLICATION, DinoUiApplicationClass))

typedef struct _DinoUiApplication DinoUiApplication;
typedef struct _DinoUiApplicationClass DinoUiApplicationClass;

#define DINO_UI_CONVERSATION_SUMMARY_TYPE_CHAT_STATE_POPULATOR (dino_ui_conversation_summary_chat_state_populator_get_type ())
#define DINO_UI_CONVERSATION_SUMMARY_CHAT_STATE_POPULATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_CHAT_STATE_POPULATOR, DinoUiConversationSummaryChatStatePopulator))
#define DINO_UI_CONVERSATION_SUMMARY_CHAT_STATE_POPULATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_CONVERSATION_SUMMARY_TYPE_CHAT_STATE_POPULATOR, DinoUiConversationSummaryChatStatePopulatorClass))
#define DINO_UI_CONVERSATION_SUMMARY_IS_CHAT_STATE_POPULATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_CHAT_STATE_POPULATOR))
#define DINO_UI_CONVERSATION_SUMMARY_IS_CHAT_STATE_POPULATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_CONVERSATION_SUMMARY_TYPE_CHAT_STATE_POPULATOR))
#define DINO_UI_CONVERSATION_SUMMARY_CHAT_STATE_POPULATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_CHAT_STATE_POPULATOR, DinoUiConversationSummaryChatStatePopulatorClass))

typedef struct _DinoUiConversationSummaryChatStatePopulator DinoUiConversationSummaryChatStatePopulator;
typedef struct _DinoUiConversationSummaryChatStatePopulatorClass DinoUiConversationSummaryChatStatePopulatorClass;

#define DINO_UI_CONVERSATION_SUMMARY_TYPE_DATE_SEPARATOR_POPULATOR (dino_ui_conversation_summary_date_separator_populator_get_type ())
#define DINO_UI_CONVERSATION_SUMMARY_DATE_SEPARATOR_POPULATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_DATE_SEPARATOR_POPULATOR, DinoUiConversationSummaryDateSeparatorPopulator))
#define DINO_UI_CONVERSATION_SUMMARY_DATE_SEPARATOR_POPULATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_CONVERSATION_SUMMARY_TYPE_DATE_SEPARATOR_POPULATOR, DinoUiConversationSummaryDateSeparatorPopulatorClass))
#define DINO_UI_CONVERSATION_SUMMARY_IS_DATE_SEPARATOR_POPULATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_DATE_SEPARATOR_POPULATOR))
#define DINO_UI_CONVERSATION_SUMMARY_IS_DATE_SEPARATOR_POPULATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_CONVERSATION_SUMMARY_TYPE_DATE_SEPARATOR_POPULATOR))
#define DINO_UI_CONVERSATION_SUMMARY_DATE_SEPARATOR_POPULATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_DATE_SEPARATOR_POPULATOR, DinoUiConversationSummaryDateSeparatorPopulatorClass))

typedef struct _DinoUiConversationSummaryDateSeparatorPopulator DinoUiConversationSummaryDateSeparatorPopulator;
typedef struct _DinoUiConversationSummaryDateSeparatorPopulatorClass DinoUiConversationSummaryDateSeparatorPopulatorClass;

#define DINO_UI_CONVERSATION_SUMMARY_TYPE_UNREAD_INDICATOR_POPULATOR (dino_ui_conversation_summary_unread_indicator_populator_get_type ())
#define DINO_UI_CONVERSATION_SUMMARY_UNREAD_INDICATOR_POPULATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_UNREAD_INDICATOR_POPULATOR, DinoUiConversationSummaryUnreadIndicatorPopulator))
#define DINO_UI_CONVERSATION_SUMMARY_UNREAD_INDICATOR_POPULATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_CONVERSATION_SUMMARY_TYPE_UNREAD_INDICATOR_POPULATOR, DinoUiConversationSummaryUnreadIndicatorPopulatorClass))
#define DINO_UI_CONVERSATION_SUMMARY_IS_UNREAD_INDICATOR_POPULATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_UNREAD_INDICATOR_POPULATOR))
#define DINO_UI_CONVERSATION_SUMMARY_IS_UNREAD_INDICATOR_POPULATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_CONVERSATION_SUMMARY_TYPE_UNREAD_INDICATOR_POPULATOR))
#define DINO_UI_CONVERSATION_SUMMARY_UNREAD_INDICATOR_POPULATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_UNREAD_INDICATOR_POPULATOR, DinoUiConversationSummaryUnreadIndicatorPopulatorClass))

typedef struct _DinoUiConversationSummaryUnreadIndicatorPopulator DinoUiConversationSummaryUnreadIndicatorPopulator;
typedef struct _DinoUiConversationSummaryUnreadIndicatorPopulatorClass DinoUiConversationSummaryUnreadIndicatorPopulatorClass;

#define DINO_UI_CONVERSATION_SUMMARY_TYPE_MESSAGE_META_ITEM (dino_ui_conversation_summary_message_meta_item_get_type ())
#define DINO_UI_CONVERSATION_SUMMARY_MESSAGE_META_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_MESSAGE_META_ITEM, DinoUiConversationSummaryMessageMetaItem))
#define DINO_UI_CONVERSATION_SUMMARY_MESSAGE_META_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_CONVERSATION_SUMMARY_TYPE_MESSAGE_META_ITEM, DinoUiConversationSummaryMessageMetaItemClass))
#define DINO_UI_CONVERSATION_SUMMARY_IS_MESSAGE_META_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_MESSAGE_META_ITEM))
#define DINO_UI_CONVERSATION_SUMMARY_IS_MESSAGE_META_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_CONVERSATION_SUMMARY_TYPE_MESSAGE_META_ITEM))
#define DINO_UI_CONVERSATION_SUMMARY_MESSAGE_META_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_MESSAGE_META_ITEM, DinoUiConversationSummaryMessageMetaItemClass))

typedef struct _DinoUiConversationSummaryMessageMetaItem DinoUiConversationSummaryMessageMetaItem;
typedef struct _DinoUiConversationSummaryMessageMetaItemClass DinoUiConversationSummaryMessageMetaItemClass;
#define _xmpp_jid_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_jid_unref (var), NULL)))
typedef struct _Block28Data Block28Data;
typedef struct _Block29Data Block29Data;
typedef struct _DinoUiConversationSummaryContentMetaItemPrivate DinoUiConversationSummaryContentMetaItemPrivate;
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))
typedef struct _Block30Data Block30Data;
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))

struct _DinoUiConversationSummaryConversationView {
	GtkWidget parent_instance;
	DinoUiConversationSummaryConversationViewPrivate * priv;
	GtkScrolledWindow* scrolled;
};

struct _DinoUiConversationSummaryConversationViewClass {
	GtkWidgetClass parent_class;
};

struct _DinoUiConversationSummaryConversationViewPrivate {
	DinoEntitiesConversation* _conversation;
	GtkRevealer* notification_revealer;
	GtkBox* message_menu_box;
	GtkBox* notifications;
	GtkBox* main;
	GtkWidget* main_wrap_box;
	GeeHashMap* action_buttons;
	GeeList* message_actions;
	DinoStreamInteractor* stream_interactor;
	GeeTreeSet* content_items;
	GeeTreeSet* meta_items;
	GRecMutex __lock_meta_items;
	GeeHashMap* item_item_skeletons;
	GeeHashMap* widgets;
	GeeList* widget_order;
	DinoUiConversationSummaryContentProvider* content_populator;
	DinoUiConversationSummarySubscriptionNotitication* subscription_notification;
	gdouble* was_value;
	gdouble* was_upper;
	gdouble* was_page_size;
	GMutex reloading_mutex;
	gboolean firstLoad;
	gboolean at_current_content;
	gboolean reload_messages;
	GtkWidget* currently_highlighted;
	DinoUiConversationSummaryContentMetaItem* current_meta_item;
	gdouble last_y;
};

struct _Block28Data {
	int _ref_count_;
	DinoUiConversationSummaryConversationView* self;
	GtkWidget* widget;
};

struct _Block29Data {
	int _ref_count_;
	DinoUiConversationSummaryConversationView* self;
	DinoUiConversationSummaryContentMetaItem* meta_item;
	DinoContentItem* content_item;
};

struct _DinoUiConversationSummaryContentMetaItem {
	DinoPluginsMetaConversationItem parent_instance;
	DinoUiConversationSummaryContentMetaItemPrivate * priv;
	DinoContentItem* content_item;
};

struct _DinoUiConversationSummaryContentMetaItemClass {
	DinoPluginsMetaConversationItemClass parent_class;
};

struct _Block30Data {
	int _ref_count_;
	DinoUiConversationSummaryConversationView* self;
	GtkMenuButton* reaction_button;
};

static gint DinoUiConversationSummaryConversationView_private_offset;
static gpointer dino_ui_conversation_summary_conversation_view_parent_class = NULL;
static DinoPluginsConversationItemCollectionIface * dino_ui_conversation_summary_conversation_view_dino_plugins_conversation_item_collection_parent_iface = NULL;
static DinoPluginsNotificationCollectionIface * dino_ui_conversation_summary_conversation_view_dino_plugins_notification_collection_parent_iface = NULL;

VALA_EXTERN GType dino_ui_conversation_summary_conversation_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiConversationSummaryConversationView, g_object_unref)
VALA_EXTERN GType dino_ui_conversation_summary_content_meta_item_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiConversationSummaryContentMetaItem, g_object_unref)
VALA_EXTERN GType dino_ui_conversation_summary_conversation_item_skeleton_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiConversationSummaryConversationItemSkeleton, g_object_unref)
VALA_EXTERN GType dino_ui_conversation_summary_content_provider_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiConversationSummaryContentProvider, g_object_unref)
VALA_EXTERN GType dino_ui_conversation_summary_subscription_notitication_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiConversationSummarySubscriptionNotitication, g_object_unref)
static gint dino_ui_conversation_summary_conversation_view_compare_content_meta_items (DinoUiConversationSummaryContentMetaItem* a,
                                                                                DinoUiConversationSummaryContentMetaItem* b);
static gint _dino_ui_conversation_summary_conversation_view_compare_content_meta_items_gcompare_data_func (gconstpointer a,
                                                                                                    gconstpointer b,
                                                                                                    gpointer self);
static gint dino_ui_conversation_summary_conversation_view_compare_meta_items (DinoPluginsMetaConversationItem* a,
                                                                        DinoPluginsMetaConversationItem* b);
static gint _dino_ui_conversation_summary_conversation_view_compare_meta_items_gcompare_data_func (gconstpointer a,
                                                                                            gconstpointer b,
                                                                                            gpointer self);
VALA_EXTERN DinoUiConversationSummaryConversationView* dino_ui_conversation_summary_conversation_view_init (DinoUiConversationSummaryConversationView* self,
                                                                                                DinoStreamInteractor* stream_interactor);
static void dino_ui_conversation_summary_conversation_view_on_upper_notify (DinoUiConversationSummaryConversationView* self);
static void _dino_ui_conversation_summary_conversation_view_on_upper_notify_g_object_notify (GObject* _sender,
                                                                                      GParamSpec* pspec,
                                                                                      gpointer self);
static void dino_ui_conversation_summary_conversation_view_on_value_notify (DinoUiConversationSummaryConversationView* self);
static void _dino_ui_conversation_summary_conversation_view_on_value_notify_g_object_notify (GObject* _sender,
                                                                                      GParamSpec* pspec,
                                                                                      gpointer self);
VALA_EXTERN DinoUiConversationSummaryContentProvider* dino_ui_conversation_summary_content_provider_new (DinoStreamInteractor* stream_interactor);
VALA_EXTERN DinoUiConversationSummaryContentProvider* dino_ui_conversation_summary_content_provider_construct (GType object_type,
                                                                                                   DinoStreamInteractor* stream_interactor);
VALA_EXTERN DinoUiConversationSummarySubscriptionNotitication* dino_ui_conversation_summary_subscription_notitication_new (DinoStreamInteractor* stream_interactor);
VALA_EXTERN DinoUiConversationSummarySubscriptionNotitication* dino_ui_conversation_summary_subscription_notitication_construct (GType object_type,
                                                                                                                     DinoStreamInteractor* stream_interactor);
VALA_EXTERN void dino_ui_conversation_summary_conversation_view_on_add_meta_notification (DinoUiConversationSummaryConversationView* self,
                                                                              DinoPluginsMetaConversationNotification* notification);
static void _dino_ui_conversation_summary_conversation_view_on_add_meta_notification_dino_plugins_notification_collection_add_meta_notification (DinoPluginsNotificationCollection* _sender,
                                                                                                                                          DinoPluginsMetaConversationNotification* item,
                                                                                                                                          gpointer self);
VALA_EXTERN void dino_ui_conversation_summary_conversation_view_on_remove_meta_notification (DinoUiConversationSummaryConversationView* self,
                                                                                 DinoPluginsMetaConversationNotification* notification);
static void _dino_ui_conversation_summary_conversation_view_on_remove_meta_notification_dino_plugins_notification_collection_remove_meta_notification (DinoPluginsNotificationCollection* _sender,
                                                                                                                                                DinoPluginsMetaConversationNotification* item,
                                                                                                                                                gpointer self);
VALA_EXTERN GType dino_ui_application_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiApplication, g_object_unref)
VALA_EXTERN DinoUiConversationSummaryChatStatePopulator* dino_ui_conversation_summary_chat_state_populator_new (DinoStreamInteractor* stream_interactor);
VALA_EXTERN DinoUiConversationSummaryChatStatePopulator* dino_ui_conversation_summary_chat_state_populator_construct (GType object_type,
                                                                                                          DinoStreamInteractor* stream_interactor);
VALA_EXTERN GType dino_ui_conversation_summary_chat_state_populator_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiConversationSummaryChatStatePopulator, g_object_unref)
VALA_EXTERN DinoUiConversationSummaryDateSeparatorPopulator* dino_ui_conversation_summary_date_separator_populator_new (DinoStreamInteractor* stream_interactor);
VALA_EXTERN DinoUiConversationSummaryDateSeparatorPopulator* dino_ui_conversation_summary_date_separator_populator_construct (GType object_type,
                                                                                                                  DinoStreamInteractor* stream_interactor);
VALA_EXTERN GType dino_ui_conversation_summary_date_separator_populator_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiConversationSummaryDateSeparatorPopulator, g_object_unref)
VALA_EXTERN DinoUiConversationSummaryUnreadIndicatorPopulator* dino_ui_conversation_summary_unread_indicator_populator_new (DinoStreamInteractor* stream_interactor);
VALA_EXTERN DinoUiConversationSummaryUnreadIndicatorPopulator* dino_ui_conversation_summary_unread_indicator_populator_construct (GType object_type,
                                                                                                                      DinoStreamInteractor* stream_interactor);
VALA_EXTERN GType dino_ui_conversation_summary_unread_indicator_populator_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiConversationSummaryUnreadIndicatorPopulator, g_object_unref)
static void dino_ui_conversation_summary_conversation_view_on_leave_notify_event (DinoUiConversationSummaryConversationView* self);
static void _dino_ui_conversation_summary_conversation_view_on_leave_notify_event_gtk_event_controller_motion_leave (GtkEventControllerMotion* _sender,
                                                                                                              gpointer self);
static void dino_ui_conversation_summary_conversation_view_update_highlight (DinoUiConversationSummaryConversationView* self,
                                                                      gdouble x,
                                                                      gdouble y);
static void _dino_ui_conversation_summary_conversation_view_update_highlight_gtk_event_controller_motion_motion (GtkEventControllerMotion* _sender,
                                                                                                          gdouble x,
                                                                                                          gdouble y,
                                                                                                          gpointer self);
static void __lambda125_ (DinoUiConversationSummaryConversationView* self,
                   gint n,
                   gdouble x,
                   gdouble y);
static void ___lambda125__gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                              gint n_press,
                                              gdouble x,
                                              gdouble y,
                                              gpointer self);
VALA_EXTERN void dino_ui_conversation_summary_conversation_view_activate_last_message_correction (DinoUiConversationSummaryConversationView* self);
VALA_EXTERN GType dino_ui_conversation_summary_message_meta_item_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiConversationSummaryMessageMetaItem, g_object_unref)
VALA_EXTERN DinoEntitiesConversation* dino_ui_conversation_summary_conversation_view_get_conversation (DinoUiConversationSummaryConversationView* self);
static gboolean dino_ui_conversation_summary_conversation_view_is_highlight_fixed (DinoUiConversationSummaryConversationView* self);
static void dino_ui_conversation_summary_conversation_view_update_message_menu (DinoUiConversationSummaryConversationView* self);
VALA_EXTERN GtkWidget* dino_ui_conversation_summary_conversation_item_skeleton_get_widget (DinoUiConversationSummaryConversationItemSkeleton* self);
VALA_EXTERN gchar* dino_ui_util_string_if_tooltips_active (const gchar* s);
VALA_EXTERN void dino_ui_conversation_summary_conversation_view_initialize_for_conversation (DinoUiConversationSummaryConversationView* self,
                                                                                 DinoEntitiesConversation* conversation);
static gboolean ___lambda126_ (DinoUiConversationSummaryConversationView* self);
static gboolean ____lambda126__gsource_func (gpointer self);
static AdwAnimation* dino_ui_conversation_summary_conversation_view_scroll_animation (DinoUiConversationSummaryConversationView* self,
                                                                               gdouble target);
static void dino_ui_conversation_summary_conversation_view_clear (DinoUiConversationSummaryConversationView* self);
static void dino_ui_conversation_summary_conversation_view_initialize_for_conversation_ (DinoUiConversationSummaryConversationView* self,
                                                                                  DinoEntitiesConversation* conversation);
static void dino_ui_conversation_summary_conversation_view_display_latest (DinoUiConversationSummaryConversationView* self);
static void dino_ui_conversation_summary_conversation_view_scroll_and_highlight_item (DinoUiConversationSummaryConversationView* self,
                                                                               DinoPluginsMetaConversationItem* target,
                                                                               guint duration);
static Block28Data* block28_data_ref (Block28Data* _data28_);
static void block28_data_unref (void * _userdata_);
static void __lambda128_ (Block28Data* _data28_);
static gboolean __lambda129_ (Block28Data* _data28_);
static gboolean ___lambda129__gsource_func (gpointer self);
static void ___lambda128__adw_animation_done (AdwAnimation* _sender,
                                       gpointer self);
VALA_EXTERN void dino_ui_conversation_summary_conversation_view_initialize_around_message (DinoUiConversationSummaryConversationView* self,
                                                                               DinoEntitiesConversation* conversation,
                                                                               DinoContentItem* content_item);
static Block29Data* block29_data_ref (Block29Data* _data29_);
static void block29_data_unref (void * _userdata_);
static gboolean ___lambda130_ (Block29Data* _data29_,
                        DinoUiConversationSummaryContentMetaItem* it);
static gboolean ____lambda130__gee_predicate (gconstpointer g,
                                       gpointer self);
VALA_EXTERN GeeList* dino_ui_conversation_summary_content_provider_populate_before (DinoUiConversationSummaryContentProvider* self,
                                                                        DinoEntitiesConversation* conversation,
                                                                        DinoContentItem* before_item,
                                                                        gint n);
VALA_EXTERN void dino_ui_conversation_summary_conversation_view_do_insert_item (DinoUiConversationSummaryConversationView* self,
                                                                    DinoPluginsMetaConversationItem* item);
VALA_EXTERN DinoUiConversationSummaryContentMetaItem* dino_ui_conversation_summary_content_provider_get_content_meta_item (DinoUiConversationSummaryContentProvider* self,
                                                                                                               DinoContentItem* content_item);
static GtkWidget* dino_ui_conversation_summary_conversation_view_insert_new (DinoUiConversationSummaryConversationView* self,
                                                                      DinoPluginsMetaConversationItem* item);
VALA_EXTERN GeeList* dino_ui_conversation_summary_content_provider_populate_after (DinoUiConversationSummaryContentProvider* self,
                                                                       DinoEntitiesConversation* conversation,
                                                                       DinoContentItem* after_item,
                                                                       gint n);
static gboolean __lambda131_ (Block29Data* _data29_);
static gboolean ___lambda131__gsource_func (gpointer self);
static void dino_ui_conversation_summary_conversation_view_clear_notifications (DinoUiConversationSummaryConversationView* self);
static void dino_ui_conversation_summary_conversation_view_set_conversation (DinoUiConversationSummaryConversationView* self,
                                                                      DinoEntitiesConversation* value);
VALA_EXTERN void dino_ui_conversation_summary_content_provider_init (DinoUiConversationSummaryContentProvider* self,
                                                         DinoPluginsConversationItemCollection* item_collection,
                                                         DinoEntitiesConversation* conversation,
                                                         DinoPluginsWidgetType type);
VALA_EXTERN void dino_ui_conversation_summary_subscription_notitication_init (DinoUiConversationSummarySubscriptionNotitication* self,
                                                                  DinoEntitiesConversation* conversation,
                                                                  DinoUiConversationSummaryConversationView* conversation_view);
VALA_EXTERN GeeList* dino_ui_conversation_summary_content_provider_populate_latest (DinoUiConversationSummaryContentProvider* self,
                                                                        DinoEntitiesConversation* conversation,
                                                                        gint n);
static gboolean __lambda127_ (DinoUiConversationSummaryConversationView* self);
static gboolean ___lambda127__gsource_func (gpointer self);
static void dino_ui_conversation_summary_conversation_view_real_insert_item (DinoPluginsConversationItemCollection* base,
                                                                      DinoPluginsMetaConversationItem* item);
static void dino_ui_conversation_summary_conversation_view_real_remove_item (DinoPluginsConversationItemCollection* base,
                                                                      DinoPluginsMetaConversationItem* item);
VALA_EXTERN void dino_ui_conversation_summary_conversation_view_add_notification (DinoUiConversationSummaryConversationView* self,
                                                                      GtkWidget* widget);
VALA_EXTERN void dino_ui_conversation_summary_conversation_view_remove_notification (DinoUiConversationSummaryConversationView* self,
                                                                         GtkWidget* widget);
static gboolean __lambda117_ (DinoUiConversationSummaryConversationView* self);
static gboolean ___lambda117__gsource_func (gpointer self);
VALA_EXTERN DinoUiConversationSummaryConversationItemSkeleton* dino_ui_conversation_summary_conversation_item_skeleton_new (DinoStreamInteractor* stream_interactor,
                                                                                                                DinoEntitiesConversation* conversation,
                                                                                                                DinoPluginsMetaConversationItem* item);
VALA_EXTERN DinoUiConversationSummaryConversationItemSkeleton* dino_ui_conversation_summary_conversation_item_skeleton_construct (GType object_type,
                                                                                                                      DinoStreamInteractor* stream_interactor,
                                                                                                                      DinoEntitiesConversation* conversation,
                                                                                                                      DinoPluginsMetaConversationItem* item);
static gboolean dino_ui_conversation_summary_conversation_view_can_merge (DinoUiConversationSummaryConversationView* self,
                                                                   DinoPluginsMetaConversationItem* upper_item,
                                                                   DinoPluginsMetaConversationItem* lower_item);
VALA_EXTERN void dino_ui_conversation_summary_conversation_item_skeleton_set_show_skeleton (DinoUiConversationSummaryConversationItemSkeleton* self,
                                                                                gboolean value);
static void dino_ui_conversation_summary_conversation_view_on_action_button_clicked (DinoUiConversationSummaryConversationView* self,
                                                                              GtkWidget* widget,
                                                                              GVariant* variant);
static gboolean ____lambda119_ (DinoUiConversationSummaryConversationView* self);
static gboolean _____lambda119__gsource_func (gpointer self);
static gdouble* _double_dup (gdouble* self);
static void dino_ui_conversation_summary_conversation_view_load_earlier_messages (DinoUiConversationSummaryConversationView* self);
static void dino_ui_conversation_summary_conversation_view_load_later_messages (DinoUiConversationSummaryConversationView* self);
VALA_EXTERN DinoUiConversationSummaryConversationView* dino_ui_conversation_summary_conversation_view_new (void);
VALA_EXTERN DinoUiConversationSummaryConversationView* dino_ui_conversation_summary_conversation_view_construct (GType object_type);
static GObject * dino_ui_conversation_summary_conversation_view_constructor (GType type,
                                                                      guint n_construct_properties,
                                                                      GObjectConstructParam * construct_properties);
static Block30Data* block30_data_ref (Block30Data* _data30_);
static void block30_data_unref (void * _userdata_);
static void _dino_ui_conversation_summary_conversation_view___lambda132_ (DinoUiConversationSummaryConversationView* self,
                                                                   GtkButton* button);
static void __dino_ui_conversation_summary_conversation_view___lambda132__gtk_button_clicked (GtkButton* _sender,
                                                                                       gpointer self);
static void _dino_ui_conversation_summary_conversation_view___lambda133_ (DinoUiConversationSummaryConversationView* self,
                                                                   GtkButton* button);
static void __dino_ui_conversation_summary_conversation_view___lambda133__gtk_button_clicked (GtkButton* _sender,
                                                                                       gpointer self);
static void _dino_ui_conversation_summary_conversation_view___lambda134_ (Block30Data* _data30_,
                                                                   const gchar* emoji);
static void __dino_ui_conversation_summary_conversation_view___lambda134__gtk_emoji_chooser_emoji_picked (GtkEmojiChooser* _sender,
                                                                                                   const gchar* text,
                                                                                                   gpointer self);
static void dino_ui_conversation_summary_conversation_view_finalize (GObject * obj);
static GType dino_ui_conversation_summary_conversation_view_get_type_once (void);
static void _vala_dino_ui_conversation_summary_conversation_view_get_property (GObject * object,
                                                                        guint property_id,
                                                                        GValue * value,
                                                                        GParamSpec * pspec);
static void _vala_dino_ui_conversation_summary_conversation_view_set_property (GObject * object,
                                                                        guint property_id,
                                                                        const GValue * value,
                                                                        GParamSpec * pspec);
static void _vala_clear_GMutex (GMutex * mutex);
static void _vala_clear_GRecMutex (GRecMutex * mutex);
static void _vala_clear_GRWLock (GRWLock * mutex);
static void _vala_clear_GCond (GCond * mutex);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
dino_ui_conversation_summary_conversation_view_get_instance_private (DinoUiConversationSummaryConversationView* self)
{
	return G_STRUCT_MEMBER_P (self, DinoUiConversationSummaryConversationView_private_offset);
}

static gint
_dino_ui_conversation_summary_conversation_view_compare_content_meta_items_gcompare_data_func (gconstpointer a,
                                                                                               gconstpointer b,
                                                                                               gpointer self)
{
	gint result;
	result = dino_ui_conversation_summary_conversation_view_compare_content_meta_items ((DinoUiConversationSummaryContentMetaItem*) a, (DinoUiConversationSummaryContentMetaItem*) b);
	return result;
}

static gint
_dino_ui_conversation_summary_conversation_view_compare_meta_items_gcompare_data_func (gconstpointer a,
                                                                                       gconstpointer b,
                                                                                       gpointer self)
{
	gint result;
	result = dino_ui_conversation_summary_conversation_view_compare_meta_items ((DinoPluginsMetaConversationItem*) a, (DinoPluginsMetaConversationItem*) b);
	return result;
}

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

static void
_dino_ui_conversation_summary_conversation_view_on_upper_notify_g_object_notify (GObject* _sender,
                                                                                 GParamSpec* pspec,
                                                                                 gpointer self)
{
	dino_ui_conversation_summary_conversation_view_on_upper_notify ((DinoUiConversationSummaryConversationView*) self);
}

static void
_dino_ui_conversation_summary_conversation_view_on_value_notify_g_object_notify (GObject* _sender,
                                                                                 GParamSpec* pspec,
                                                                                 gpointer self)
{
	dino_ui_conversation_summary_conversation_view_on_value_notify ((DinoUiConversationSummaryConversationView*) self);
}

static void
_dino_ui_conversation_summary_conversation_view_on_add_meta_notification_dino_plugins_notification_collection_add_meta_notification (DinoPluginsNotificationCollection* _sender,
                                                                                                                                     DinoPluginsMetaConversationNotification* item,
                                                                                                                                     gpointer self)
{
	dino_ui_conversation_summary_conversation_view_on_add_meta_notification ((DinoUiConversationSummaryConversationView*) self, item);
}

static void
_dino_ui_conversation_summary_conversation_view_on_remove_meta_notification_dino_plugins_notification_collection_remove_meta_notification (DinoPluginsNotificationCollection* _sender,
                                                                                                                                           DinoPluginsMetaConversationNotification* item,
                                                                                                                                           gpointer self)
{
	dino_ui_conversation_summary_conversation_view_on_remove_meta_notification ((DinoUiConversationSummaryConversationView*) self, item);
}

static void
_dino_ui_conversation_summary_conversation_view_on_leave_notify_event_gtk_event_controller_motion_leave (GtkEventControllerMotion* _sender,
                                                                                                         gpointer self)
{
	dino_ui_conversation_summary_conversation_view_on_leave_notify_event ((DinoUiConversationSummaryConversationView*) self);
}

static void
_dino_ui_conversation_summary_conversation_view_update_highlight_gtk_event_controller_motion_motion (GtkEventControllerMotion* _sender,
                                                                                                     gdouble x,
                                                                                                     gdouble y,
                                                                                                     gpointer self)
{
	dino_ui_conversation_summary_conversation_view_update_highlight ((DinoUiConversationSummaryConversationView*) self, x, y);
}

static void
__lambda125_ (DinoUiConversationSummaryConversationView* self,
              gint n,
              gdouble x,
              gdouble y)
{
	dino_ui_conversation_summary_conversation_view_update_highlight (self, x, y);
}

static void
___lambda125__gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                         gint n_press,
                                         gdouble x,
                                         gdouble y,
                                         gpointer self)
{
	__lambda125_ ((DinoUiConversationSummaryConversationView*) self, n_press, x, y);
}

DinoUiConversationSummaryConversationView*
dino_ui_conversation_summary_conversation_view_init (DinoUiConversationSummaryConversationView* self,
                                                     DinoStreamInteractor* stream_interactor)
{
	DinoStreamInteractor* _tmp0_;
	GtkScrolledWindow* _tmp1_;
	GtkAdjustment* _tmp2_;
	GtkAdjustment* _tmp3_;
	GtkScrolledWindow* _tmp4_;
	GtkAdjustment* _tmp5_;
	GtkAdjustment* _tmp6_;
	GtkScrolledWindow* _tmp7_;
	GtkAdjustment* _tmp8_;
	GtkAdjustment* _tmp9_;
	DinoUiConversationSummaryContentProvider* _tmp10_;
	DinoUiConversationSummarySubscriptionNotitication* _tmp11_;
	DinoUiApplication* app = NULL;
	GApplication* _tmp12_;
	DinoUiApplication* _tmp13_;
	DinoPluginsRegistry* _tmp14_;
	DinoPluginsRegistry* _tmp15_;
	DinoUiConversationSummaryChatStatePopulator* _tmp16_;
	DinoUiConversationSummaryChatStatePopulator* _tmp17_;
	DinoPluginsRegistry* _tmp18_;
	DinoPluginsRegistry* _tmp19_;
	DinoUiConversationSummaryDateSeparatorPopulator* _tmp20_;
	DinoUiConversationSummaryDateSeparatorPopulator* _tmp21_;
	DinoPluginsRegistry* _tmp22_;
	DinoPluginsRegistry* _tmp23_;
	DinoUiConversationSummaryUnreadIndicatorPopulator* _tmp24_;
	DinoUiConversationSummaryUnreadIndicatorPopulator* _tmp25_;
	GtkEventControllerMotion* main_wrap_motion_events = NULL;
	GtkEventControllerMotion* _tmp26_;
	GtkWidget* _tmp27_;
	GtkEventController* _tmp28_;
	GtkEventControllerMotion* main_motion_events = NULL;
	GtkEventControllerMotion* _tmp29_;
	GtkBox* _tmp30_;
	GtkEventController* _tmp31_;
	GtkGestureClick* click_controller = NULL;
	GtkGestureClick* _tmp32_;
	GtkWidget* _tmp33_;
	GtkEventController* _tmp34_;
	DinoUiConversationSummaryConversationView* _tmp35_;
	DinoUiConversationSummaryConversationView* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (stream_interactor != NULL, NULL);
	_tmp0_ = _g_object_ref0 (stream_interactor);
	_g_object_unref0 (self->priv->stream_interactor);
	self->priv->stream_interactor = _tmp0_;
	_tmp1_ = self->scrolled;
	_tmp2_ = gtk_scrolled_window_get_vadjustment (_tmp1_);
	_tmp3_ = _tmp2_;
	g_signal_connect_object ((GObject*) _tmp3_, "notify::upper", (GCallback) _dino_ui_conversation_summary_conversation_view_on_upper_notify_g_object_notify, self, G_CONNECT_AFTER);
	_tmp4_ = self->scrolled;
	_tmp5_ = gtk_scrolled_window_get_vadjustment (_tmp4_);
	_tmp6_ = _tmp5_;
	g_signal_connect_object ((GObject*) _tmp6_, "notify::page-size", (GCallback) _dino_ui_conversation_summary_conversation_view_on_upper_notify_g_object_notify, self, 0);
	_tmp7_ = self->scrolled;
	_tmp8_ = gtk_scrolled_window_get_vadjustment (_tmp7_);
	_tmp9_ = _tmp8_;
	g_signal_connect_object ((GObject*) _tmp9_, "notify::value", (GCallback) _dino_ui_conversation_summary_conversation_view_on_value_notify_g_object_notify, self, 0);
	_tmp10_ = dino_ui_conversation_summary_content_provider_new (stream_interactor);
	_g_object_unref0 (self->priv->content_populator);
	self->priv->content_populator = _tmp10_;
	_tmp11_ = dino_ui_conversation_summary_subscription_notitication_new (stream_interactor);
	_g_object_unref0 (self->priv->subscription_notification);
	self->priv->subscription_notification = _tmp11_;
	g_signal_connect_object ((DinoPluginsNotificationCollection*) self, "add-meta-notification", (GCallback) _dino_ui_conversation_summary_conversation_view_on_add_meta_notification_dino_plugins_notification_collection_add_meta_notification, self, 0);
	g_signal_connect_object ((DinoPluginsNotificationCollection*) self, "remove-meta-notification", (GCallback) _dino_ui_conversation_summary_conversation_view_on_remove_meta_notification_dino_plugins_notification_collection_remove_meta_notification, self, 0);
	_tmp12_ = g_application_get_default ();
	_tmp13_ = _g_object_ref0 (DINO_UI_IS_APPLICATION (_tmp12_) ? ((DinoUiApplication*) _tmp12_) : NULL);
	app = _tmp13_;
	_tmp14_ = dino_application_get_plugin_registry ((DinoApplication*) app);
	_tmp15_ = _tmp14_;
	_tmp16_ = dino_ui_conversation_summary_chat_state_populator_new (stream_interactor);
	_tmp17_ = _tmp16_;
	dino_plugins_registry_register_conversation_addition_populator (_tmp15_, (DinoPluginsConversationAdditionPopulator*) _tmp17_);
	_g_object_unref0 (_tmp17_);
	_tmp18_ = dino_application_get_plugin_registry ((DinoApplication*) app);
	_tmp19_ = _tmp18_;
	_tmp20_ = dino_ui_conversation_summary_date_separator_populator_new (stream_interactor);
	_tmp21_ = _tmp20_;
	dino_plugins_registry_register_conversation_addition_populator (_tmp19_, (DinoPluginsConversationAdditionPopulator*) _tmp21_);
	_g_object_unref0 (_tmp21_);
	_tmp22_ = dino_application_get_plugin_registry ((DinoApplication*) app);
	_tmp23_ = _tmp22_;
	_tmp24_ = dino_ui_conversation_summary_unread_indicator_populator_new (stream_interactor);
	_tmp25_ = _tmp24_;
	dino_plugins_registry_register_conversation_addition_populator (_tmp23_, (DinoPluginsConversationAdditionPopulator*) _tmp25_);
	_g_object_unref0 (_tmp25_);
	_tmp26_ = (GtkEventControllerMotion*) gtk_event_controller_motion_new ();
	main_wrap_motion_events = _tmp26_;
	_tmp27_ = self->priv->main_wrap_box;
	_tmp28_ = _g_object_ref0 ((GtkEventController*) main_wrap_motion_events);
	gtk_widget_add_controller (_tmp27_, _tmp28_);
	g_signal_connect_object (main_wrap_motion_events, "leave", (GCallback) _dino_ui_conversation_summary_conversation_view_on_leave_notify_event_gtk_event_controller_motion_leave, self, 0);
	_tmp29_ = (GtkEventControllerMotion*) gtk_event_controller_motion_new ();
	main_motion_events = _tmp29_;
	_tmp30_ = self->priv->main;
	_tmp31_ = _g_object_ref0 ((GtkEventController*) main_motion_events);
	gtk_widget_add_controller ((GtkWidget*) _tmp30_, _tmp31_);
	g_signal_connect_object (main_motion_events, "motion", (GCallback) _dino_ui_conversation_summary_conversation_view_update_highlight_gtk_event_controller_motion_motion, self, 0);
	_tmp32_ = (GtkGestureClick*) gtk_gesture_click_new ();
	click_controller = _tmp32_;
	gtk_gesture_single_set_touch_only ((GtkGestureSingle*) click_controller, TRUE);
	gtk_event_controller_set_propagation_phase ((GtkEventController*) click_controller, GTK_PHASE_CAPTURE);
	_tmp33_ = self->priv->main_wrap_box;
	_tmp34_ = _g_object_ref0 ((GtkEventController*) click_controller);
	gtk_widget_add_controller (_tmp33_, _tmp34_);
	g_signal_connect_object (click_controller, "pressed", (GCallback) ___lambda125__gtk_gesture_click_pressed, self, G_CONNECT_AFTER);
	_tmp35_ = _g_object_ref0 (self);
	result = _tmp35_;
	_g_object_unref0 (click_controller);
	_g_object_unref0 (main_motion_events);
	_g_object_unref0 (main_wrap_motion_events);
	_g_object_unref0 (app);
	return result;
}

void
dino_ui_conversation_summary_conversation_view_activate_last_message_correction (DinoUiConversationSummaryConversationView* self)
{
	GeeBidirIterator* iter = NULL;
	GeeTreeSet* _tmp0_;
	GeeBidirIterator* _tmp1_;
	GeeBidirIterator* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->content_items;
	_tmp1_ = gee_abstract_bidir_sorted_set_bidir_iterator ((GeeAbstractBidirSortedSet*) _tmp0_);
	iter = _tmp1_;
	_tmp2_ = iter;
	gee_bidir_iterator_last (_tmp2_);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp3_ = FALSE;
			_tmp3_ = TRUE;
			while (TRUE) {
				gboolean _tmp5_ = FALSE;
				DinoPluginsMetaConversationItem* item = NULL;
				GeeBidirIterator* _tmp9_;
				gpointer _tmp10_;
				DinoUiConversationSummaryMessageMetaItem* message_item = NULL;
				DinoPluginsMetaConversationItem* _tmp11_;
				DinoUiConversationSummaryMessageMetaItem* _tmp12_;
				DinoUiConversationSummaryMessageMetaItem* _tmp13_;
				GeeBidirIterator* _tmp48_;
				if (!_tmp3_) {
					gint _tmp4_;
					_tmp4_ = i;
					i = _tmp4_ + 1;
				}
				_tmp3_ = FALSE;
				if (i < 10) {
					GeeTreeSet* _tmp6_;
					gint _tmp7_;
					gint _tmp8_;
					_tmp6_ = self->priv->content_items;
					_tmp7_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp6_);
					_tmp8_ = _tmp7_;
					_tmp5_ = _tmp8_ > i;
				} else {
					_tmp5_ = FALSE;
				}
				if (!_tmp5_) {
					break;
				}
				_tmp9_ = iter;
				_tmp10_ = gee_iterator_get ((GeeIterator*) _tmp9_);
				item = (DinoPluginsMetaConversationItem*) _tmp10_;
				_tmp11_ = item;
				_tmp12_ = _g_object_ref0 (DINO_UI_CONVERSATION_SUMMARY_IS_MESSAGE_META_ITEM (_tmp11_) ? ((DinoUiConversationSummaryMessageMetaItem*) _tmp11_) : NULL);
				message_item = _tmp12_;
				_tmp13_ = message_item;
				if (_tmp13_ != NULL) {
					gboolean _tmp14_ = FALSE;
					gboolean _tmp15_ = FALSE;
					DinoEntitiesConversation* _tmp16_;
					DinoEntitiesConversationType _tmp17_;
					DinoEntitiesConversationType _tmp18_;
					_tmp16_ = self->priv->_conversation;
					_tmp17_ = dino_entities_conversation_get_type_ (_tmp16_);
					_tmp18_ = _tmp17_;
					if (_tmp18_ == DINO_ENTITIES_CONVERSATION_TYPE_CHAT) {
						DinoUiConversationSummaryMessageMetaItem* _tmp19_;
						XmppJid* _tmp20_;
						XmppJid* _tmp21_;
						DinoEntitiesConversation* _tmp22_;
						DinoEntitiesAccount* _tmp23_;
						DinoEntitiesAccount* _tmp24_;
						XmppJid* _tmp25_;
						XmppJid* _tmp26_;
						XmppJid* _tmp27_;
						_tmp19_ = message_item;
						_tmp20_ = dino_plugins_meta_conversation_item_get_jid ((DinoPluginsMetaConversationItem*) _tmp19_);
						_tmp21_ = _tmp20_;
						_tmp22_ = self->priv->_conversation;
						_tmp23_ = dino_entities_conversation_get_account (_tmp22_);
						_tmp24_ = _tmp23_;
						_tmp25_ = dino_entities_account_get_bare_jid (_tmp24_);
						_tmp26_ = _tmp25_;
						_tmp27_ = _tmp26_;
						_tmp15_ = xmpp_jid_equals_bare (_tmp21_, _tmp27_);
						_xmpp_jid_unref0 (_tmp27_);
					} else {
						_tmp15_ = FALSE;
					}
					if (_tmp15_) {
						_tmp14_ = TRUE;
					} else {
						gboolean _tmp28_ = FALSE;
						DinoEntitiesConversation* _tmp29_;
						DinoEntitiesConversationType _tmp30_;
						DinoEntitiesConversationType _tmp31_;
						_tmp29_ = self->priv->_conversation;
						_tmp30_ = dino_entities_conversation_get_type_ (_tmp29_);
						_tmp31_ = _tmp30_;
						if (_tmp31_ == DINO_ENTITIES_CONVERSATION_TYPE_GROUPCHAT) {
							DinoUiConversationSummaryMessageMetaItem* _tmp32_;
							XmppJid* _tmp33_;
							XmppJid* _tmp34_;
							DinoStreamInteractor* _tmp35_;
							DinoModuleIdentity* _tmp36_;
							gpointer _tmp37_;
							DinoMucManager* _tmp38_;
							DinoEntitiesConversation* _tmp39_;
							XmppJid* _tmp40_;
							XmppJid* _tmp41_;
							DinoEntitiesConversation* _tmp42_;
							DinoEntitiesAccount* _tmp43_;
							DinoEntitiesAccount* _tmp44_;
							XmppJid* _tmp45_;
							XmppJid* _tmp46_;
							_tmp32_ = message_item;
							_tmp33_ = dino_plugins_meta_conversation_item_get_jid ((DinoPluginsMetaConversationItem*) _tmp32_);
							_tmp34_ = _tmp33_;
							_tmp35_ = self->priv->stream_interactor;
							_tmp36_ = dino_muc_manager_IDENTITY;
							_tmp37_ = dino_stream_interactor_get_module (_tmp35_, DINO_TYPE_MUC_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp36_);
							_tmp38_ = (DinoMucManager*) _tmp37_;
							_tmp39_ = self->priv->_conversation;
							_tmp40_ = dino_entities_conversation_get_counterpart (_tmp39_);
							_tmp41_ = _tmp40_;
							_tmp42_ = self->priv->_conversation;
							_tmp43_ = dino_entities_conversation_get_account (_tmp42_);
							_tmp44_ = _tmp43_;
							_tmp45_ = dino_muc_manager_get_own_jid (_tmp38_, _tmp41_, _tmp44_);
							_tmp46_ = _tmp45_;
							_tmp28_ = xmpp_jid_equals (_tmp34_, _tmp46_);
							_xmpp_jid_unref0 (_tmp46_);
							_g_object_unref0 (_tmp38_);
						} else {
							_tmp28_ = FALSE;
						}
						_tmp14_ = _tmp28_;
					}
					if (_tmp14_) {
						DinoUiConversationSummaryMessageMetaItem* _tmp47_;
						_tmp47_ = message_item;
						dino_plugins_meta_conversation_item_set_in_edit_mode ((DinoPluginsMetaConversationItem*) _tmp47_, TRUE);
						_g_object_unref0 (message_item);
						_g_object_unref0 (item);
						break;
					}
				}
				_tmp48_ = iter;
				gee_bidir_iterator_previous (_tmp48_);
				_g_object_unref0 (message_item);
				_g_object_unref0 (item);
			}
		}
	}
	_g_object_unref0 (iter);
}

static gboolean
dino_ui_conversation_summary_conversation_view_is_highlight_fixed (DinoUiConversationSummaryConversationView* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	{
		GeeIterator* _widget_it = NULL;
		GeeHashMap* _tmp0_;
		GeeCollection* _tmp1_;
		GeeCollection* _tmp2_;
		GeeCollection* _tmp3_;
		GeeIterator* _tmp4_;
		GeeIterator* _tmp5_;
		_tmp0_ = self->priv->action_buttons;
		_tmp1_ = gee_abstract_map_get_values ((GeeAbstractMap*) _tmp0_);
		_tmp2_ = _tmp1_;
		_tmp3_ = _tmp2_;
		_tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
		_tmp5_ = _tmp4_;
		_g_object_unref0 (_tmp3_);
		_widget_it = _tmp5_;
		while (TRUE) {
			GeeIterator* _tmp6_;
			GtkWidget* widget = NULL;
			GeeIterator* _tmp7_;
			gpointer _tmp8_;
			GtkMenuButton* menu_button = NULL;
			GtkWidget* _tmp9_;
			GtkMenuButton* _tmp10_;
			gboolean _tmp11_ = FALSE;
			GtkMenuButton* _tmp12_;
			GtkToggleButton* toggle_button = NULL;
			GtkWidget* _tmp18_;
			GtkToggleButton* _tmp19_;
			gboolean _tmp20_ = FALSE;
			GtkToggleButton* _tmp21_;
			_tmp6_ = _widget_it;
			if (!gee_iterator_next (_tmp6_)) {
				break;
			}
			_tmp7_ = _widget_it;
			_tmp8_ = gee_iterator_get (_tmp7_);
			widget = (GtkWidget*) _tmp8_;
			_tmp9_ = widget;
			_tmp10_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp9_, gtk_menu_button_get_type ()) ? ((GtkMenuButton*) _tmp9_) : NULL);
			menu_button = _tmp10_;
			_tmp12_ = menu_button;
			if (_tmp12_ != NULL) {
				GtkMenuButton* _tmp13_;
				GtkPopover* _tmp14_;
				GtkPopover* _tmp15_;
				gboolean _tmp16_;
				gboolean _tmp17_;
				_tmp13_ = menu_button;
				_tmp14_ = gtk_menu_button_get_popover (_tmp13_);
				_tmp15_ = _tmp14_;
				_tmp16_ = gtk_widget_get_visible ((GtkWidget*) _tmp15_);
				_tmp17_ = _tmp16_;
				_tmp11_ = _tmp17_;
			} else {
				_tmp11_ = FALSE;
			}
			if (_tmp11_) {
				result = TRUE;
				_g_object_unref0 (menu_button);
				_g_object_unref0 (widget);
				_g_object_unref0 (_widget_it);
				return result;
			}
			_tmp18_ = widget;
			_tmp19_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp18_, gtk_toggle_button_get_type ()) ? ((GtkToggleButton*) _tmp18_) : NULL);
			toggle_button = _tmp19_;
			_tmp21_ = toggle_button;
			if (_tmp21_ != NULL) {
				GtkToggleButton* _tmp22_;
				gboolean _tmp23_;
				gboolean _tmp24_;
				_tmp22_ = toggle_button;
				_tmp23_ = gtk_toggle_button_get_active (_tmp22_);
				_tmp24_ = _tmp23_;
				_tmp20_ = _tmp24_;
			} else {
				_tmp20_ = FALSE;
			}
			if (_tmp20_) {
				result = TRUE;
				_g_object_unref0 (toggle_button);
				_g_object_unref0 (menu_button);
				_g_object_unref0 (widget);
				_g_object_unref0 (_widget_it);
				return result;
			}
			_g_object_unref0 (toggle_button);
			_g_object_unref0 (menu_button);
			_g_object_unref0 (widget);
		}
		_g_object_unref0 (_widget_it);
	}
	result = FALSE;
	return result;
}

static void
dino_ui_conversation_summary_conversation_view_on_leave_notify_event (DinoUiConversationSummaryConversationView* self)
{
	GtkWidget* _tmp0_;
	GtkBox* _tmp2_;
	g_return_if_fail (self != NULL);
	if (dino_ui_conversation_summary_conversation_view_is_highlight_fixed (self)) {
		return;
	}
	_tmp0_ = self->priv->currently_highlighted;
	if (_tmp0_ != NULL) {
		GtkWidget* _tmp1_;
		_tmp1_ = self->priv->currently_highlighted;
		gtk_widget_remove_css_class (_tmp1_, "highlight");
		_g_object_unref0 (self->priv->currently_highlighted);
		self->priv->currently_highlighted = NULL;
	}
	_tmp2_ = self->priv->message_menu_box;
	gtk_widget_set_visible ((GtkWidget*) _tmp2_, FALSE);
}

static void
dino_ui_conversation_summary_conversation_view_update_highlight (DinoUiConversationSummaryConversationView* self,
                                                                 gdouble x,
                                                                 gdouble y)
{
	gboolean _tmp0_ = FALSE;
	GtkWidget* _tmp1_;
	gint h = 0;
	GtkWidget* w = NULL;
	GtkWidget* _tmp19_;
	GtkWidget* _tmp21_;
	gdouble widget_x = 0.0;
	gdouble widget_y = 0.0;
	GtkWidget* _tmp22_;
	GtkBox* _tmp23_;
	gdouble _tmp24_ = 0.0;
	gdouble _tmp25_ = 0.0;
	DinoUiConversationSummaryContentMetaItem* _tmp45_;
	g_return_if_fail (self != NULL);
	if (dino_ui_conversation_summary_conversation_view_is_highlight_fixed (self)) {
		return;
	}
	_tmp1_ = self->priv->currently_highlighted;
	if (_tmp1_ != NULL) {
		_tmp0_ = fabs (self->priv->last_y - y) <= ((gdouble) 2);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		return;
	}
	self->priv->last_y = y;
	h = 0;
	w = NULL;
	{
		GeeIterator* _item_it = NULL;
		GeeTreeSet* _tmp2_;
		GeeIterator* _tmp3_;
		_tmp2_ = self->priv->meta_items;
		_tmp3_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp2_);
		_item_it = _tmp3_;
		while (TRUE) {
			GeeIterator* _tmp4_;
			DinoPluginsMetaConversationItem* item = NULL;
			GeeIterator* _tmp5_;
			gpointer _tmp6_;
			GtkWidget* widget = NULL;
			GeeHashMap* _tmp7_;
			DinoPluginsMetaConversationItem* _tmp8_;
			gpointer _tmp9_;
			GtkWidget* _tmp10_;
			GtkWidget* _tmp11_;
			gint _tmp12_;
			gint _tmp13_;
			GtkWidget* _tmp14_;
			gint _tmp15_;
			gint _tmp16_;
			_tmp4_ = _item_it;
			if (!gee_iterator_next (_tmp4_)) {
				break;
			}
			_tmp5_ = _item_it;
			_tmp6_ = gee_iterator_get (_tmp5_);
			item = (DinoPluginsMetaConversationItem*) _tmp6_;
			_tmp7_ = self->priv->widgets;
			_tmp8_ = item;
			_tmp9_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp7_, _tmp8_);
			widget = (GtkWidget*) _tmp9_;
			_tmp10_ = widget;
			_tmp11_ = widget;
			_tmp12_ = gtk_widget_get_margin_top (_tmp11_);
			_tmp13_ = _tmp12_;
			_tmp14_ = widget;
			_tmp15_ = gtk_widget_get_margin_bottom (_tmp14_);
			_tmp16_ = _tmp15_;
			h += (gtk_widget_get_allocated_height (_tmp10_) + _tmp13_) + _tmp16_;
			if (((gdouble) h) >= y) {
				GtkWidget* _tmp17_;
				GtkWidget* _tmp18_;
				_tmp17_ = widget;
				_tmp18_ = _g_object_ref0 (_tmp17_);
				_g_object_unref0 (w);
				w = _tmp18_;
				_g_object_unref0 (widget);
				_g_object_unref0 (item);
				break;
			}
			_g_object_unref0 (widget);
			_g_object_unref0 (item);
		}
		_g_object_unref0 (_item_it);
	}
	_tmp19_ = self->priv->currently_highlighted;
	if (_tmp19_ != NULL) {
		GtkWidget* _tmp20_;
		_tmp20_ = self->priv->currently_highlighted;
		gtk_widget_remove_css_class (_tmp20_, "highlight");
	}
	_g_object_unref0 (self->priv->currently_highlighted);
	self->priv->currently_highlighted = NULL;
	_g_object_unref0 (self->priv->current_meta_item);
	self->priv->current_meta_item = NULL;
	_tmp21_ = w;
	if (_tmp21_ == NULL) {
		dino_ui_conversation_summary_conversation_view_update_message_menu (self);
		_g_object_unref0 (w);
		return;
	}
	_tmp22_ = w;
	_tmp23_ = self->priv->main;
	gtk_widget_translate_coordinates (_tmp22_, (GtkWidget*) _tmp23_, (gdouble) 0, (gdouble) 0, &_tmp24_, &_tmp25_);
	widget_x = _tmp24_;
	widget_y = _tmp25_;
	{
		GeeIterator* _item_it = NULL;
		GeeHashMap* _tmp26_;
		GeeSet* _tmp27_;
		GeeSet* _tmp28_;
		GeeSet* _tmp29_;
		GeeIterator* _tmp30_;
		GeeIterator* _tmp31_;
		_tmp26_ = self->priv->item_item_skeletons;
		_tmp27_ = gee_abstract_map_get_keys ((GeeAbstractMap*) _tmp26_);
		_tmp28_ = _tmp27_;
		_tmp29_ = _tmp28_;
		_tmp30_ = gee_iterable_iterator ((GeeIterable*) _tmp29_);
		_tmp31_ = _tmp30_;
		_g_object_unref0 (_tmp29_);
		_item_it = _tmp31_;
		while (TRUE) {
			GeeIterator* _tmp32_;
			DinoPluginsMetaConversationItem* item = NULL;
			GeeIterator* _tmp33_;
			gpointer _tmp34_;
			GeeHashMap* _tmp35_;
			DinoPluginsMetaConversationItem* _tmp36_;
			gpointer _tmp37_;
			DinoUiConversationSummaryConversationItemSkeleton* _tmp38_;
			GtkWidget* _tmp39_;
			GtkWidget* _tmp40_;
			GtkWidget* _tmp41_;
			gboolean _tmp42_;
			_tmp32_ = _item_it;
			if (!gee_iterator_next (_tmp32_)) {
				break;
			}
			_tmp33_ = _item_it;
			_tmp34_ = gee_iterator_get (_tmp33_);
			item = (DinoPluginsMetaConversationItem*) _tmp34_;
			_tmp35_ = self->priv->item_item_skeletons;
			_tmp36_ = item;
			_tmp37_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp35_, _tmp36_);
			_tmp38_ = (DinoUiConversationSummaryConversationItemSkeleton*) _tmp37_;
			_tmp39_ = dino_ui_conversation_summary_conversation_item_skeleton_get_widget (_tmp38_);
			_tmp40_ = _tmp39_;
			_tmp41_ = w;
			_tmp42_ = _tmp40_ == _tmp41_;
			_g_object_unref0 (_tmp40_);
			_g_object_unref0 (_tmp38_);
			if (_tmp42_) {
				DinoPluginsMetaConversationItem* _tmp43_;
				DinoUiConversationSummaryContentMetaItem* _tmp44_;
				_tmp43_ = item;
				_tmp44_ = _g_object_ref0 (DINO_UI_CONVERSATION_SUMMARY_IS_CONTENT_META_ITEM (_tmp43_) ? ((DinoUiConversationSummaryContentMetaItem*) _tmp43_) : NULL);
				_g_object_unref0 (self->priv->current_meta_item);
				self->priv->current_meta_item = _tmp44_;
			}
			_g_object_unref0 (item);
		}
		_g_object_unref0 (_item_it);
	}
	dino_ui_conversation_summary_conversation_view_update_message_menu (self);
	_tmp45_ = self->priv->current_meta_item;
	if (_tmp45_ != NULL) {
		GtkWidget* _tmp46_;
		GtkWidget* _tmp47_;
		GtkWidget* _tmp48_;
		GtkBox* _tmp49_;
		_tmp46_ = w;
		_tmp47_ = _g_object_ref0 (_tmp46_);
		_g_object_unref0 (self->priv->currently_highlighted);
		self->priv->currently_highlighted = _tmp47_;
		_tmp48_ = self->priv->currently_highlighted;
		gtk_widget_add_css_class (_tmp48_, "highlight");
		_tmp49_ = self->priv->message_menu_box;
		gtk_widget_set_margin_top ((GtkWidget*) _tmp49_, (gint) (widget_y + DINO_UI_CONVERSATION_SUMMARY_CONVERSATION_VIEW_MESSAGE_MENU_BOX_OFFSET));
	}
	_g_object_unref0 (w);
}

static void
dino_ui_conversation_summary_conversation_view_update_message_menu (DinoUiConversationSummaryConversationView* self)
{
	DinoUiConversationSummaryContentMetaItem* _tmp0_;
	GeeList* current_message_actions = NULL;
	DinoUiConversationSummaryContentMetaItem* _tmp2_;
	GeeList* _tmp3_;
	DinoUiConversationSummaryContentMetaItem* _tmp4_;
	GeeList* _tmp5_;
	GeeList* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->current_meta_item;
	if (_tmp0_ == NULL) {
		GtkBox* _tmp1_;
		_tmp1_ = self->priv->message_menu_box;
		gtk_widget_set_visible ((GtkWidget*) _tmp1_, FALSE);
		return;
	}
	_tmp2_ = self->priv->current_meta_item;
	_tmp3_ = dino_plugins_meta_conversation_item_get_item_actions ((DinoPluginsMetaConversationItem*) _tmp2_, DINO_PLUGINS_WIDGET_TYPE_GTK4);
	current_message_actions = _tmp3_;
	_tmp4_ = self->priv->current_meta_item;
	_tmp5_ = dino_plugins_meta_conversation_item_get_item_actions ((DinoPluginsMetaConversationItem*) _tmp4_, DINO_PLUGINS_WIDGET_TYPE_GTK4);
	_g_object_unref0 (self->priv->message_actions);
	self->priv->message_actions = _tmp5_;
	_tmp6_ = self->priv->message_actions;
	if (_tmp6_ != NULL) {
		GtkBox* _tmp7_;
		_tmp7_ = self->priv->message_menu_box;
		gtk_widget_set_visible ((GtkWidget*) _tmp7_, TRUE);
		{
			GeeIterator* _widget_it = NULL;
			GeeHashMap* _tmp8_;
			GeeCollection* _tmp9_;
			GeeCollection* _tmp10_;
			GeeCollection* _tmp11_;
			GeeIterator* _tmp12_;
			GeeIterator* _tmp13_;
			_tmp8_ = self->priv->action_buttons;
			_tmp9_ = gee_abstract_map_get_values ((GeeAbstractMap*) _tmp8_);
			_tmp10_ = _tmp9_;
			_tmp11_ = _tmp10_;
			_tmp12_ = gee_iterable_iterator ((GeeIterable*) _tmp11_);
			_tmp13_ = _tmp12_;
			_g_object_unref0 (_tmp11_);
			_widget_it = _tmp13_;
			while (TRUE) {
				GeeIterator* _tmp14_;
				GtkWidget* widget = NULL;
				GeeIterator* _tmp15_;
				gpointer _tmp16_;
				GtkWidget* _tmp17_;
				_tmp14_ = _widget_it;
				if (!gee_iterator_next (_tmp14_)) {
					break;
				}
				_tmp15_ = _widget_it;
				_tmp16_ = gee_iterator_get (_tmp15_);
				widget = (GtkWidget*) _tmp16_;
				_tmp17_ = widget;
				gtk_widget_set_visible (_tmp17_, FALSE);
				_g_object_unref0 (widget);
			}
			_g_object_unref0 (_widget_it);
		}
		{
			GeeList* _message_action_list = NULL;
			GeeList* _tmp18_;
			gint _message_action_size = 0;
			GeeList* _tmp19_;
			gint _tmp20_;
			gint _tmp21_;
			gint _message_action_index = 0;
			_tmp18_ = current_message_actions;
			_message_action_list = _tmp18_;
			_tmp19_ = _message_action_list;
			_tmp20_ = gee_collection_get_size ((GeeCollection*) _tmp19_);
			_tmp21_ = _tmp20_;
			_message_action_size = _tmp21_;
			_message_action_index = -1;
			while (TRUE) {
				gint _tmp22_;
				gint _tmp23_;
				DinoPluginsMessageAction* message_action = NULL;
				GeeList* _tmp24_;
				gpointer _tmp25_;
				GtkWidget* button_widget = NULL;
				GeeHashMap* _tmp26_;
				DinoPluginsMessageAction* _tmp27_;
				const gchar* _tmp28_;
				gpointer _tmp29_;
				GtkWidget* _tmp30_;
				DinoPluginsMessageAction* _tmp31_;
				const gchar* _tmp32_;
				_message_action_index = _message_action_index + 1;
				_tmp22_ = _message_action_index;
				_tmp23_ = _message_action_size;
				if (!(_tmp22_ < _tmp23_)) {
					break;
				}
				_tmp24_ = _message_action_list;
				_tmp25_ = gee_list_get (_tmp24_, _message_action_index);
				message_action = (DinoPluginsMessageAction*) _tmp25_;
				_tmp26_ = self->priv->action_buttons;
				_tmp27_ = message_action;
				_tmp28_ = _tmp27_->name;
				_tmp29_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp26_, _tmp28_);
				button_widget = (GtkWidget*) _tmp29_;
				_tmp30_ = button_widget;
				gtk_widget_set_visible (_tmp30_, TRUE);
				_tmp31_ = message_action;
				_tmp32_ = _tmp31_->name;
				if (g_strcmp0 (_tmp32_, "reaction") == 0) {
					GtkMenuButton* button = NULL;
					GtkWidget* _tmp33_;
					GtkMenuButton* _tmp34_;
					GtkMenuButton* _tmp35_;
					DinoPluginsMessageAction* _tmp36_;
					GtkMenuButton* _tmp37_;
					DinoPluginsMessageAction* _tmp38_;
					const gchar* _tmp39_;
					GtkMenuButton* _tmp40_;
					DinoPluginsMessageAction* _tmp41_;
					const gchar* _tmp42_;
					gchar* _tmp43_;
					gchar* _tmp44_;
					_tmp33_ = button_widget;
					_tmp34_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, gtk_menu_button_get_type (), GtkMenuButton));
					button = _tmp34_;
					_tmp35_ = button;
					_tmp36_ = message_action;
					gtk_widget_set_sensitive ((GtkWidget*) _tmp35_, _tmp36_->sensitive);
					_tmp37_ = button;
					_tmp38_ = message_action;
					_tmp39_ = _tmp38_->icon_name;
					gtk_menu_button_set_icon_name (_tmp37_, _tmp39_);
					_tmp40_ = button;
					_tmp41_ = message_action;
					_tmp42_ = _tmp41_->tooltip;
					_tmp43_ = dino_ui_util_string_if_tooltips_active (_tmp42_);
					_tmp44_ = _tmp43_;
					gtk_widget_set_tooltip_text ((GtkWidget*) _tmp40_, _tmp44_);
					_g_free0 (_tmp44_);
					_g_object_unref0 (button);
				} else {
					DinoPluginsMessageAction* _tmp45_;
					DinoPluginsMessageActionEvoked _tmp46_;
					gpointer _tmp46__target;
					_tmp45_ = message_action;
					_tmp46_ = _tmp45_->callback;
					_tmp46__target = _tmp45_->callback_target;
					if (_tmp46_ != NULL) {
						GtkButton* button = NULL;
						GtkWidget* _tmp47_;
						GtkButton* _tmp48_;
						GtkButton* _tmp49_;
						DinoPluginsMessageAction* _tmp50_;
						GtkButton* _tmp51_;
						DinoPluginsMessageAction* _tmp52_;
						const gchar* _tmp53_;
						GtkButton* _tmp54_;
						DinoPluginsMessageAction* _tmp55_;
						const gchar* _tmp56_;
						gchar* _tmp57_;
						gchar* _tmp58_;
						_tmp47_ = button_widget;
						_tmp48_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp47_, gtk_button_get_type (), GtkButton));
						button = _tmp48_;
						_tmp49_ = button;
						_tmp50_ = message_action;
						gtk_widget_set_sensitive ((GtkWidget*) _tmp49_, _tmp50_->sensitive);
						_tmp51_ = button;
						_tmp52_ = message_action;
						_tmp53_ = _tmp52_->icon_name;
						gtk_button_set_icon_name (_tmp51_, _tmp53_);
						_tmp54_ = button;
						_tmp55_ = message_action;
						_tmp56_ = _tmp55_->tooltip;
						_tmp57_ = dino_ui_util_string_if_tooltips_active (_tmp56_);
						_tmp58_ = _tmp57_;
						gtk_widget_set_tooltip_text ((GtkWidget*) _tmp54_, _tmp58_);
						_g_free0 (_tmp58_);
						_g_object_unref0 (button);
					}
				}
				_g_object_unref0 (button_widget);
				_g_object_unref0 (message_action);
			}
		}
	} else {
		GtkBox* _tmp59_;
		_tmp59_ = self->priv->message_menu_box;
		gtk_widget_set_visible ((GtkWidget*) _tmp59_, FALSE);
	}
	_g_object_unref0 (current_message_actions);
}

static gboolean
___lambda126_ (DinoUiConversationSummaryConversationView* self)
{
	GtkBox* _tmp0_;
	gboolean result;
	_tmp0_ = self->priv->main;
	gtk_widget_set_visible ((GtkWidget*) _tmp0_, TRUE);
	result = FALSE;
	return result;
}

static gboolean
____lambda126__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda126_ ((DinoUiConversationSummaryConversationView*) self);
	return result;
}

void
dino_ui_conversation_summary_conversation_view_initialize_for_conversation (DinoUiConversationSummaryConversationView* self,
                                                                            DinoEntitiesConversation* conversation)
{
	gboolean _tmp1_ = FALSE;
	DinoEntitiesConversation* _tmp2_;
	GtkScrolledWindow* _tmp20_;
	GtkAdjustment* _tmp21_;
	GtkAdjustment* _tmp22_;
	GtkScrolledWindow* _tmp23_;
	GtkAdjustment* _tmp24_;
	GtkAdjustment* _tmp25_;
	gdouble _tmp26_;
	gdouble _tmp27_;
	g_return_if_fail (self != NULL);
	if (self->priv->firstLoad) {
		GtkBox* _tmp0_;
		_tmp0_ = self->priv->main;
		gtk_widget_set_visible ((GtkWidget*) _tmp0_, FALSE);
		g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ____lambda126__gsource_func, g_object_ref (self), g_object_unref);
		self->priv->firstLoad = FALSE;
	}
	_tmp2_ = self->priv->_conversation;
	if (conversation == _tmp2_) {
		_tmp1_ = self->priv->at_current_content;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		GtkScrolledWindow* _tmp3_;
		GtkAdjustment* _tmp4_;
		GtkAdjustment* _tmp5_;
		gdouble _tmp6_;
		gdouble _tmp7_;
		GtkScrolledWindow* _tmp8_;
		GtkAdjustment* _tmp9_;
		GtkAdjustment* _tmp10_;
		gdouble _tmp11_;
		gdouble _tmp12_;
		_tmp3_ = self->scrolled;
		_tmp4_ = gtk_scrolled_window_get_vadjustment (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = gtk_adjustment_get_value (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = self->scrolled;
		_tmp9_ = gtk_scrolled_window_get_vadjustment (_tmp8_);
		_tmp10_ = _tmp9_;
		_tmp11_ = gtk_adjustment_get_upper (_tmp10_);
		_tmp12_ = _tmp11_;
		if (_tmp7_ != _tmp12_) {
			GtkScrolledWindow* _tmp13_;
			GtkAdjustment* _tmp14_;
			GtkAdjustment* _tmp15_;
			gdouble _tmp16_;
			gdouble _tmp17_;
			AdwAnimation* _tmp18_;
			AdwAnimation* _tmp19_;
			_tmp13_ = self->scrolled;
			_tmp14_ = gtk_scrolled_window_get_vadjustment (_tmp13_);
			_tmp15_ = _tmp14_;
			_tmp16_ = gtk_adjustment_get_upper (_tmp15_);
			_tmp17_ = _tmp16_;
			_tmp18_ = dino_ui_conversation_summary_conversation_view_scroll_animation (self, _tmp17_);
			_tmp19_ = _tmp18_;
			adw_animation_play (_tmp19_);
			_g_object_unref0 (_tmp19_);
		}
		return;
	}
	dino_ui_conversation_summary_conversation_view_clear (self);
	dino_ui_conversation_summary_conversation_view_initialize_for_conversation_ (self, conversation);
	dino_ui_conversation_summary_conversation_view_display_latest (self);
	self->priv->at_current_content = TRUE;
	_tmp20_ = self->scrolled;
	_tmp21_ = gtk_scrolled_window_get_vadjustment (_tmp20_);
	_tmp22_ = _tmp21_;
	_tmp23_ = self->scrolled;
	_tmp24_ = gtk_scrolled_window_get_vadjustment (_tmp23_);
	_tmp25_ = _tmp24_;
	_tmp26_ = gtk_adjustment_get_upper (_tmp25_);
	_tmp27_ = _tmp26_;
	gtk_adjustment_set_value (_tmp22_, _tmp27_);
}

static Block28Data*
block28_data_ref (Block28Data* _data28_)
{
	g_atomic_int_inc (&_data28_->_ref_count_);
	return _data28_;
}

static void
block28_data_unref (void * _userdata_)
{
	Block28Data* _data28_;
	_data28_ = (Block28Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data28_->_ref_count_)) {
		DinoUiConversationSummaryConversationView* self;
		self = _data28_->self;
		_g_object_unref0 (_data28_->widget);
		_g_object_unref0 (self);
		g_slice_free (Block28Data, _data28_);
	}
}

static gboolean
__lambda129_ (Block28Data* _data28_)
{
	DinoUiConversationSummaryConversationView* self;
	GtkWidget* _tmp0_;
	gboolean result;
	self = _data28_->self;
	_tmp0_ = _data28_->widget;
	gtk_widget_remove_css_class (_tmp0_, "highlight-once");
	result = FALSE;
	return result;
}

static gboolean
___lambda129__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda129_ (self);
	return result;
}

static void
__lambda128_ (Block28Data* _data28_)
{
	DinoUiConversationSummaryConversationView* self;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	self = _data28_->self;
	_tmp0_ = _data28_->widget;
	gtk_widget_remove_css_class (_tmp0_, "highlight-once");
	_tmp1_ = _data28_->widget;
	gtk_widget_add_css_class (_tmp1_, "highlight-once");
	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 5000, ___lambda129__gsource_func, block28_data_ref (_data28_), block28_data_unref);
}

static void
___lambda128__adw_animation_done (AdwAnimation* _sender,
                                  gpointer self)
{
	__lambda128_ (self);
}

static void
dino_ui_conversation_summary_conversation_view_scroll_and_highlight_item (DinoUiConversationSummaryConversationView* self,
                                                                          DinoPluginsMetaConversationItem* target,
                                                                          guint duration)
{
	Block28Data* _data28_;
	gint h = 0;
	GtkWidget* _tmp10_;
	GeeHashMap* _tmp11_;
	gpointer _tmp12_;
	GtkWidget* _tmp13_;
	gboolean _tmp14_;
	gdouble target_height = 0.0;
	GtkScrolledWindow* _tmp15_;
	GtkAdjustment* _tmp16_;
	GtkAdjustment* _tmp17_;
	gdouble _tmp18_;
	gdouble _tmp19_;
	AdwAnimation* animation = NULL;
	AdwAnimation* _tmp20_;
	AdwAnimation* _tmp21_;
	AdwAnimation* _tmp22_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (target != NULL);
	_data28_ = g_slice_new0 (Block28Data);
	_data28_->_ref_count_ = 1;
	_data28_->self = g_object_ref (self);
	_data28_->widget = NULL;
	h = 0;
	{
		GeeIterator* _item_it = NULL;
		GeeTreeSet* _tmp0_;
		GeeIterator* _tmp1_;
		_tmp0_ = self->priv->meta_items;
		_tmp1_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp0_);
		_item_it = _tmp1_;
		while (TRUE) {
			GeeIterator* _tmp2_;
			DinoPluginsMetaConversationItem* item = NULL;
			GeeIterator* _tmp3_;
			gpointer _tmp4_;
			GeeHashMap* _tmp5_;
			DinoPluginsMetaConversationItem* _tmp6_;
			gpointer _tmp7_;
			DinoPluginsMetaConversationItem* _tmp8_;
			GtkWidget* _tmp9_;
			_tmp2_ = _item_it;
			if (!gee_iterator_next (_tmp2_)) {
				break;
			}
			_tmp3_ = _item_it;
			_tmp4_ = gee_iterator_get (_tmp3_);
			item = (DinoPluginsMetaConversationItem*) _tmp4_;
			_tmp5_ = self->priv->widgets;
			_tmp6_ = item;
			_tmp7_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp5_, _tmp6_);
			_g_object_unref0 (_data28_->widget);
			_data28_->widget = (GtkWidget*) _tmp7_;
			_tmp8_ = item;
			if (target == _tmp8_) {
				_g_object_unref0 (item);
				break;
			}
			_tmp9_ = _data28_->widget;
			h += gtk_widget_get_allocated_height (_tmp9_);
			_g_object_unref0 (item);
		}
		_g_object_unref0 (_item_it);
	}
	_tmp10_ = _data28_->widget;
	_tmp11_ = self->priv->widgets;
	_tmp12_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp11_, target);
	_tmp13_ = (GtkWidget*) _tmp12_;
	_tmp14_ = _tmp10_ != _tmp13_;
	_g_object_unref0 (_tmp13_);
	if (_tmp14_) {
		g_warning ("conversation_view.vala:288: Target item widget not reached");
		block28_data_unref (_data28_);
		_data28_ = NULL;
		return;
	}
	_tmp15_ = self->scrolled;
	_tmp16_ = gtk_scrolled_window_get_vadjustment (_tmp15_);
	_tmp17_ = _tmp16_;
	_tmp18_ = gtk_adjustment_get_page_size (_tmp17_);
	_tmp19_ = _tmp18_;
	target_height = h - ((_tmp19_ * 1) / 3);
	_tmp20_ = dino_ui_conversation_summary_conversation_view_scroll_animation (self, target_height);
	animation = _tmp20_;
	_tmp21_ = animation;
	g_signal_connect_data (_tmp21_, "done", (GCallback) ___lambda128__adw_animation_done, block28_data_ref (_data28_), (GClosureNotify) block28_data_unref, 0);
	_tmp22_ = animation;
	adw_animation_play (_tmp22_);
	_g_object_unref0 (animation);
	block28_data_unref (_data28_);
	_data28_ = NULL;
}

static AdwAnimation*
dino_ui_conversation_summary_conversation_view_scroll_animation (DinoUiConversationSummaryConversationView* self,
                                                                 gdouble target)
{
	GtkScrolledWindow* _tmp0_;
	GtkScrolledWindow* _tmp1_;
	GtkAdjustment* _tmp2_;
	GtkAdjustment* _tmp3_;
	gdouble _tmp4_;
	gdouble _tmp5_;
	GtkScrolledWindow* _tmp6_;
	GtkAdjustment* _tmp7_;
	GtkAdjustment* _tmp8_;
	AdwPropertyAnimationTarget* _tmp9_;
	AdwTimedAnimation* _tmp10_;
	AdwAnimation* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->scrolled;
	_tmp1_ = self->scrolled;
	_tmp2_ = gtk_scrolled_window_get_vadjustment (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = gtk_adjustment_get_value (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = self->scrolled;
	_tmp7_ = gtk_scrolled_window_get_vadjustment (_tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = (AdwPropertyAnimationTarget*) adw_property_animation_target_new ((GObject*) _tmp8_, "value");
	_tmp10_ = (AdwTimedAnimation*) adw_timed_animation_new ((GtkWidget*) _tmp0_, _tmp5_, target, (guint) 500, (AdwAnimationTarget*) _tmp9_);
	result = (AdwAnimation*) _tmp10_;
	return result;
}

static Block29Data*
block29_data_ref (Block29Data* _data29_)
{
	g_atomic_int_inc (&_data29_->_ref_count_);
	return _data29_;
}

static void
block29_data_unref (void * _userdata_)
{
	Block29Data* _data29_;
	_data29_ = (Block29Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data29_->_ref_count_)) {
		DinoUiConversationSummaryConversationView* self;
		self = _data29_->self;
		_g_object_unref0 (_data29_->meta_item);
		_g_object_unref0 (_data29_->content_item);
		_g_object_unref0 (self);
		g_slice_free (Block29Data, _data29_);
	}
}

static gboolean
___lambda130_ (Block29Data* _data29_,
               DinoUiConversationSummaryContentMetaItem* it)
{
	DinoUiConversationSummaryConversationView* self;
	DinoContentItem* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	gboolean result;
	self = _data29_->self;
	g_return_val_if_fail (it != NULL, FALSE);
	_tmp0_ = it->content_item;
	_tmp1_ = dino_content_item_get_id (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = dino_content_item_get_id (_data29_->content_item);
	_tmp4_ = _tmp3_;
	result = _tmp2_ == _tmp4_;
	return result;
}

static gboolean
____lambda130__gee_predicate (gconstpointer g,
                              gpointer self)
{
	gboolean result;
	result = ___lambda130_ (self, (DinoUiConversationSummaryContentMetaItem*) g);
	return result;
}

static gboolean
__lambda131_ (Block29Data* _data29_)
{
	DinoUiConversationSummaryConversationView* self;
	DinoUiConversationSummaryContentMetaItem* _tmp0_;
	gboolean result;
	self = _data29_->self;
	_tmp0_ = _data29_->meta_item;
	dino_ui_conversation_summary_conversation_view_scroll_and_highlight_item (self, (DinoPluginsMetaConversationItem*) _tmp0_, (guint) 300);
	self->priv->reload_messages = TRUE;
	result = FALSE;
	return result;
}

static gboolean
___lambda131__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda131_ (self);
	return result;
}

void
dino_ui_conversation_summary_conversation_view_initialize_around_message (DinoUiConversationSummaryConversationView* self,
                                                                          DinoEntitiesConversation* conversation,
                                                                          DinoContentItem* content_item)
{
	Block29Data* _data29_;
	DinoContentItem* _tmp0_;
	DinoEntitiesConversation* _tmp1_;
	GeeList* before_items = NULL;
	DinoUiConversationSummaryContentProvider* _tmp6_;
	GeeList* _tmp7_;
	DinoUiConversationSummaryContentProvider* _tmp17_;
	DinoUiConversationSummaryContentMetaItem* _tmp18_;
	DinoUiConversationSummaryContentMetaItem* _tmp19_;
	GtkWidget* _tmp20_;
	GtkWidget* _tmp21_;
	GeeTreeSet* _tmp22_;
	DinoUiConversationSummaryContentMetaItem* _tmp23_;
	GeeTreeSet* _tmp24_;
	DinoUiConversationSummaryContentMetaItem* _tmp25_;
	GeeList* after_items = NULL;
	DinoUiConversationSummaryContentProvider* _tmp26_;
	GeeList* _tmp27_;
	GeeList* _tmp37_;
	gint _tmp38_;
	gint _tmp39_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (conversation != NULL);
	g_return_if_fail (content_item != NULL);
	_data29_ = g_slice_new0 (Block29Data);
	_data29_->_ref_count_ = 1;
	_data29_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (content_item);
	_g_object_unref0 (_data29_->content_item);
	_data29_->content_item = _tmp0_;
	_tmp1_ = self->priv->_conversation;
	if (conversation == _tmp1_) {
		DinoUiConversationSummaryContentMetaItem* matching_item = NULL;
		GeeTreeSet* _tmp2_;
		gpointer _tmp3_;
		DinoUiConversationSummaryContentMetaItem* _tmp4_;
		_tmp2_ = self->priv->content_items;
		_tmp3_ = gee_traversable_first_match ((GeeTraversable*) _tmp2_, ____lambda130__gee_predicate, block29_data_ref (_data29_), block29_data_unref);
		matching_item = (DinoUiConversationSummaryContentMetaItem*) _tmp3_;
		_tmp4_ = matching_item;
		if (_tmp4_ != NULL) {
			DinoUiConversationSummaryContentMetaItem* _tmp5_;
			_tmp5_ = matching_item;
			dino_ui_conversation_summary_conversation_view_scroll_and_highlight_item (self, (DinoPluginsMetaConversationItem*) _tmp5_, (guint) 500);
			_g_object_unref0 (matching_item);
			block29_data_unref (_data29_);
			_data29_ = NULL;
			return;
		}
		_g_object_unref0 (matching_item);
	}
	dino_ui_conversation_summary_conversation_view_clear (self);
	dino_ui_conversation_summary_conversation_view_initialize_for_conversation_ (self, conversation);
	_tmp6_ = self->priv->content_populator;
	_tmp7_ = dino_ui_conversation_summary_content_provider_populate_before (_tmp6_, conversation, _data29_->content_item, 40);
	before_items = _tmp7_;
	{
		GeeList* _item_list = NULL;
		GeeList* _tmp8_;
		gint _item_size = 0;
		GeeList* _tmp9_;
		gint _tmp10_;
		gint _tmp11_;
		gint _item_index = 0;
		_tmp8_ = before_items;
		_item_list = _tmp8_;
		_tmp9_ = _item_list;
		_tmp10_ = gee_collection_get_size ((GeeCollection*) _tmp9_);
		_tmp11_ = _tmp10_;
		_item_size = _tmp11_;
		_item_index = -1;
		while (TRUE) {
			gint _tmp12_;
			gint _tmp13_;
			DinoUiConversationSummaryContentMetaItem* item = NULL;
			GeeList* _tmp14_;
			gpointer _tmp15_;
			DinoUiConversationSummaryContentMetaItem* _tmp16_;
			_item_index = _item_index + 1;
			_tmp12_ = _item_index;
			_tmp13_ = _item_size;
			if (!(_tmp12_ < _tmp13_)) {
				break;
			}
			_tmp14_ = _item_list;
			_tmp15_ = gee_list_get (_tmp14_, _item_index);
			item = (DinoUiConversationSummaryContentMetaItem*) _tmp15_;
			_tmp16_ = item;
			dino_ui_conversation_summary_conversation_view_do_insert_item (self, (DinoPluginsMetaConversationItem*) _tmp16_);
			_g_object_unref0 (item);
		}
	}
	_tmp17_ = self->priv->content_populator;
	_tmp18_ = dino_ui_conversation_summary_content_provider_get_content_meta_item (_tmp17_, _data29_->content_item);
	_data29_->meta_item = _tmp18_;
	_tmp19_ = _data29_->meta_item;
	_tmp20_ = dino_ui_conversation_summary_conversation_view_insert_new (self, (DinoPluginsMetaConversationItem*) _tmp19_);
	_tmp21_ = _tmp20_;
	_g_object_unref0 (_tmp21_);
	_tmp22_ = self->priv->content_items;
	_tmp23_ = _data29_->meta_item;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp22_, _tmp23_);
	_tmp24_ = self->priv->meta_items;
	_tmp25_ = _data29_->meta_item;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp24_, (DinoPluginsMetaConversationItem*) _tmp25_);
	_tmp26_ = self->priv->content_populator;
	_tmp27_ = dino_ui_conversation_summary_content_provider_populate_after (_tmp26_, conversation, _data29_->content_item, 40);
	after_items = _tmp27_;
	{
		GeeList* _item_list = NULL;
		GeeList* _tmp28_;
		gint _item_size = 0;
		GeeList* _tmp29_;
		gint _tmp30_;
		gint _tmp31_;
		gint _item_index = 0;
		_tmp28_ = after_items;
		_item_list = _tmp28_;
		_tmp29_ = _item_list;
		_tmp30_ = gee_collection_get_size ((GeeCollection*) _tmp29_);
		_tmp31_ = _tmp30_;
		_item_size = _tmp31_;
		_item_index = -1;
		while (TRUE) {
			gint _tmp32_;
			gint _tmp33_;
			DinoUiConversationSummaryContentMetaItem* item = NULL;
			GeeList* _tmp34_;
			gpointer _tmp35_;
			DinoUiConversationSummaryContentMetaItem* _tmp36_;
			_item_index = _item_index + 1;
			_tmp32_ = _item_index;
			_tmp33_ = _item_size;
			if (!(_tmp32_ < _tmp33_)) {
				break;
			}
			_tmp34_ = _item_list;
			_tmp35_ = gee_list_get (_tmp34_, _item_index);
			item = (DinoUiConversationSummaryContentMetaItem*) _tmp35_;
			_tmp36_ = item;
			dino_ui_conversation_summary_conversation_view_do_insert_item (self, (DinoPluginsMetaConversationItem*) _tmp36_);
			_g_object_unref0 (item);
		}
	}
	_tmp37_ = after_items;
	_tmp38_ = gee_collection_get_size ((GeeCollection*) _tmp37_);
	_tmp39_ = _tmp38_;
	if (_tmp39_ == 40) {
		self->priv->at_current_content = FALSE;
	}
	self->priv->reload_messages = FALSE;
	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 700, ___lambda131__gsource_func, block29_data_ref (_data29_), block29_data_unref);
	_g_object_unref0 (after_items);
	_g_object_unref0 (before_items);
	block29_data_unref (_data29_);
	_data29_ = NULL;
}

static void
dino_ui_conversation_summary_conversation_view_initialize_for_conversation_ (DinoUiConversationSummaryConversationView* self,
                                                                             DinoEntitiesConversation* conversation)
{
	DinoEntitiesConversation* _tmp0_;
	DinoApplication* app = NULL;
	DinoApplication* _tmp8_;
	DinoApplication* _tmp9_;
	DinoEntitiesConversation* _tmp10_;
	DinoUiConversationSummaryContentProvider* _tmp47_;
	DinoUiConversationSummarySubscriptionNotitication* _tmp48_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_conversation;
	if (_tmp0_ == conversation) {
		XmppJid* _tmp1_;
		XmppJid* _tmp2_;
		XmppJid* _tmp3_;
		XmppJid* _tmp4_;
		XmppJid* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp1_ = dino_entities_conversation_get_counterpart (conversation);
		_tmp2_ = _tmp1_;
		_tmp3_ = xmpp_jid_get_bare_jid (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp5_ = _tmp4_;
		_tmp6_ = xmpp_jid_to_string (_tmp5_);
		_tmp7_ = _tmp6_;
		g_debug ("conversation_view.vala:348: Re-initialized for %s", _tmp7_);
		_g_free0 (_tmp7_);
		_xmpp_jid_unref0 (_tmp5_);
	}
	_tmp8_ = dino_application_get_default ();
	_tmp9_ = _g_object_ref0 (_tmp8_);
	app = _tmp9_;
	_tmp10_ = self->priv->_conversation;
	if (_tmp10_ != NULL) {
		{
			GeeList* _populator_list = NULL;
			DinoApplication* _tmp11_;
			DinoPluginsRegistry* _tmp12_;
			DinoPluginsRegistry* _tmp13_;
			GeeList* _tmp14_;
			gint _populator_size = 0;
			GeeList* _tmp15_;
			gint _tmp16_;
			gint _tmp17_;
			gint _populator_index = 0;
			_tmp11_ = app;
			_tmp12_ = dino_application_get_plugin_registry (_tmp11_);
			_tmp13_ = _tmp12_;
			_tmp14_ = _tmp13_->conversation_addition_populators;
			_populator_list = _tmp14_;
			_tmp15_ = _populator_list;
			_tmp16_ = gee_collection_get_size ((GeeCollection*) _tmp15_);
			_tmp17_ = _tmp16_;
			_populator_size = _tmp17_;
			_populator_index = -1;
			while (TRUE) {
				gint _tmp18_;
				gint _tmp19_;
				DinoPluginsConversationItemPopulator* populator = NULL;
				GeeList* _tmp20_;
				gpointer _tmp21_;
				DinoPluginsConversationItemPopulator* _tmp22_;
				_populator_index = _populator_index + 1;
				_tmp18_ = _populator_index;
				_tmp19_ = _populator_size;
				if (!(_tmp18_ < _tmp19_)) {
					break;
				}
				_tmp20_ = _populator_list;
				_tmp21_ = gee_list_get (_tmp20_, _populator_index);
				populator = (DinoPluginsConversationItemPopulator*) ((DinoPluginsConversationAdditionPopulator*) _tmp21_);
				_tmp22_ = populator;
				dino_plugins_conversation_item_populator_close (_tmp22_, conversation);
				_g_object_unref0 (populator);
			}
		}
		{
			GeeList* _populator_list = NULL;
			DinoApplication* _tmp23_;
			DinoPluginsRegistry* _tmp24_;
			DinoPluginsRegistry* _tmp25_;
			GeeList* _tmp26_;
			gint _populator_size = 0;
			GeeList* _tmp27_;
			gint _tmp28_;
			gint _tmp29_;
			gint _populator_index = 0;
			_tmp23_ = app;
			_tmp24_ = dino_application_get_plugin_registry (_tmp23_);
			_tmp25_ = _tmp24_;
			_tmp26_ = _tmp25_->notification_populators;
			_populator_list = _tmp26_;
			_tmp27_ = _populator_list;
			_tmp28_ = gee_collection_get_size ((GeeCollection*) _tmp27_);
			_tmp29_ = _tmp28_;
			_populator_size = _tmp29_;
			_populator_index = -1;
			while (TRUE) {
				gint _tmp30_;
				gint _tmp31_;
				DinoPluginsNotificationPopulator* populator = NULL;
				GeeList* _tmp32_;
				gpointer _tmp33_;
				DinoPluginsNotificationPopulator* _tmp34_;
				_populator_index = _populator_index + 1;
				_tmp30_ = _populator_index;
				_tmp31_ = _populator_size;
				if (!(_tmp30_ < _tmp31_)) {
					break;
				}
				_tmp32_ = _populator_list;
				_tmp33_ = gee_list_get (_tmp32_, _populator_index);
				populator = (DinoPluginsNotificationPopulator*) _tmp33_;
				_tmp34_ = populator;
				dino_plugins_notification_populator_close (_tmp34_, conversation);
				_g_object_unref0 (populator);
			}
		}
	}
	dino_ui_conversation_summary_conversation_view_clear_notifications (self);
	dino_ui_conversation_summary_conversation_view_set_conversation (self, conversation);
	{
		GeeList* _populator_list = NULL;
		DinoApplication* _tmp35_;
		DinoPluginsRegistry* _tmp36_;
		DinoPluginsRegistry* _tmp37_;
		GeeList* _tmp38_;
		gint _populator_size = 0;
		GeeList* _tmp39_;
		gint _tmp40_;
		gint _tmp41_;
		gint _populator_index = 0;
		_tmp35_ = app;
		_tmp36_ = dino_application_get_plugin_registry (_tmp35_);
		_tmp37_ = _tmp36_;
		_tmp38_ = _tmp37_->conversation_addition_populators;
		_populator_list = _tmp38_;
		_tmp39_ = _populator_list;
		_tmp40_ = gee_collection_get_size ((GeeCollection*) _tmp39_);
		_tmp41_ = _tmp40_;
		_populator_size = _tmp41_;
		_populator_index = -1;
		while (TRUE) {
			gint _tmp42_;
			gint _tmp43_;
			DinoPluginsConversationItemPopulator* populator = NULL;
			GeeList* _tmp44_;
			gpointer _tmp45_;
			DinoPluginsConversationItemPopulator* _tmp46_;
			_populator_index = _populator_index + 1;
			_tmp42_ = _populator_index;
			_tmp43_ = _populator_size;
			if (!(_tmp42_ < _tmp43_)) {
				break;
			}
			_tmp44_ = _populator_list;
			_tmp45_ = gee_list_get (_tmp44_, _populator_index);
			populator = (DinoPluginsConversationItemPopulator*) ((DinoPluginsConversationAdditionPopulator*) _tmp45_);
			_tmp46_ = populator;
			dino_plugins_conversation_item_populator_init (_tmp46_, conversation, (DinoPluginsConversationItemCollection*) self, DINO_PLUGINS_WIDGET_TYPE_GTK4);
			_g_object_unref0 (populator);
		}
	}
	_tmp47_ = self->priv->content_populator;
	dino_ui_conversation_summary_content_provider_init (_tmp47_, (DinoPluginsConversationItemCollection*) self, conversation, DINO_PLUGINS_WIDGET_TYPE_GTK4);
	_tmp48_ = self->priv->subscription_notification;
	dino_ui_conversation_summary_subscription_notitication_init (_tmp48_, conversation, self);
	_g_object_unref0 (app);
}

static gboolean
__lambda127_ (DinoUiConversationSummaryConversationView* self)
{
	gboolean result;
	dino_ui_conversation_summary_conversation_view_on_value_notify (self);
	result = FALSE;
	return result;
}

static gboolean
___lambda127__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda127_ ((DinoUiConversationSummaryConversationView*) self);
	return result;
}

static void
dino_ui_conversation_summary_conversation_view_display_latest (DinoUiConversationSummaryConversationView* self)
{
	GeeList* items = NULL;
	DinoUiConversationSummaryContentProvider* _tmp0_;
	DinoEntitiesConversation* _tmp1_;
	GeeList* _tmp2_;
	DinoUiApplication* app = NULL;
	GApplication* _tmp12_;
	DinoUiApplication* _tmp13_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->content_populator;
	_tmp1_ = self->priv->_conversation;
	_tmp2_ = dino_ui_conversation_summary_content_provider_populate_latest (_tmp0_, _tmp1_, 40);
	items = _tmp2_;
	{
		GeeList* _item_list = NULL;
		GeeList* _tmp3_;
		gint _item_size = 0;
		GeeList* _tmp4_;
		gint _tmp5_;
		gint _tmp6_;
		gint _item_index = 0;
		_tmp3_ = items;
		_item_list = _tmp3_;
		_tmp4_ = _item_list;
		_tmp5_ = gee_collection_get_size ((GeeCollection*) _tmp4_);
		_tmp6_ = _tmp5_;
		_item_size = _tmp6_;
		_item_index = -1;
		while (TRUE) {
			gint _tmp7_;
			gint _tmp8_;
			DinoUiConversationSummaryContentMetaItem* item = NULL;
			GeeList* _tmp9_;
			gpointer _tmp10_;
			DinoUiConversationSummaryContentMetaItem* _tmp11_;
			_item_index = _item_index + 1;
			_tmp7_ = _item_index;
			_tmp8_ = _item_size;
			if (!(_tmp7_ < _tmp8_)) {
				break;
			}
			_tmp9_ = _item_list;
			_tmp10_ = gee_list_get (_tmp9_, _item_index);
			item = (DinoUiConversationSummaryContentMetaItem*) _tmp10_;
			_tmp11_ = item;
			dino_ui_conversation_summary_conversation_view_do_insert_item (self, (DinoPluginsMetaConversationItem*) _tmp11_);
			_g_object_unref0 (item);
		}
	}
	_tmp12_ = g_application_get_default ();
	_tmp13_ = _g_object_ref0 (DINO_UI_IS_APPLICATION (_tmp12_) ? ((DinoUiApplication*) _tmp12_) : NULL);
	app = _tmp13_;
	{
		GeeList* _populator_list = NULL;
		DinoUiApplication* _tmp14_;
		DinoPluginsRegistry* _tmp15_;
		DinoPluginsRegistry* _tmp16_;
		GeeList* _tmp17_;
		gint _populator_size = 0;
		GeeList* _tmp18_;
		gint _tmp19_;
		gint _tmp20_;
		gint _populator_index = 0;
		_tmp14_ = app;
		_tmp15_ = dino_application_get_plugin_registry ((DinoApplication*) _tmp14_);
		_tmp16_ = _tmp15_;
		_tmp17_ = _tmp16_->notification_populators;
		_populator_list = _tmp17_;
		_tmp18_ = _populator_list;
		_tmp19_ = gee_collection_get_size ((GeeCollection*) _tmp18_);
		_tmp20_ = _tmp19_;
		_populator_size = _tmp20_;
		_populator_index = -1;
		while (TRUE) {
			gint _tmp21_;
			gint _tmp22_;
			DinoPluginsNotificationPopulator* populator = NULL;
			GeeList* _tmp23_;
			gpointer _tmp24_;
			DinoPluginsNotificationPopulator* _tmp25_;
			DinoEntitiesConversation* _tmp26_;
			_populator_index = _populator_index + 1;
			_tmp21_ = _populator_index;
			_tmp22_ = _populator_size;
			if (!(_tmp21_ < _tmp22_)) {
				break;
			}
			_tmp23_ = _populator_list;
			_tmp24_ = gee_list_get (_tmp23_, _populator_index);
			populator = (DinoPluginsNotificationPopulator*) _tmp24_;
			_tmp25_ = populator;
			_tmp26_ = self->priv->_conversation;
			dino_plugins_notification_populator_init (_tmp25_, _tmp26_, (DinoPluginsNotificationCollection*) self, DINO_PLUGINS_WIDGET_TYPE_GTK4);
			_g_object_unref0 (populator);
		}
	}
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda127__gsource_func, g_object_ref (self), g_object_unref);
	_g_object_unref0 (app);
	_g_object_unref0 (items);
}

static void
dino_ui_conversation_summary_conversation_view_real_insert_item (DinoPluginsConversationItemCollection* base,
                                                                 DinoPluginsMetaConversationItem* item)
{
	DinoUiConversationSummaryConversationView * self;
	GeeTreeSet* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	self = (DinoUiConversationSummaryConversationView*) base;
	g_return_if_fail (item != NULL);
	_tmp0_ = self->priv->meta_items;
	_tmp1_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ > 0) {
		gboolean after_last = FALSE;
		GeeTreeSet* _tmp3_;
		gpointer _tmp4_;
		DinoPluginsMetaConversationItem* _tmp5_;
		GDateTime* _tmp6_;
		GDateTime* _tmp7_;
		GDateTime* _tmp8_;
		GDateTime* _tmp9_;
		gboolean _tmp10_;
		gboolean _tmp11_ = FALSE;
		GeeTreeSet* _tmp12_;
		gpointer _tmp13_;
		DinoPluginsMetaConversationItem* _tmp14_;
		GDateTime* _tmp15_;
		GDateTime* _tmp16_;
		GDateTime* _tmp17_;
		GDateTime* _tmp18_;
		gboolean _tmp19_;
		gboolean within_range = FALSE;
		gboolean _tmp27_ = FALSE;
		gboolean accept = FALSE;
		_tmp3_ = self->priv->meta_items;
		_tmp4_ = gee_abstract_sorted_set_last ((GeeAbstractSortedSet*) _tmp3_);
		_tmp5_ = (DinoPluginsMetaConversationItem*) _tmp4_;
		_tmp6_ = dino_plugins_meta_conversation_item_get_time (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = dino_plugins_meta_conversation_item_get_time (item);
		_tmp9_ = _tmp8_;
		_tmp10_ = g_date_time_compare (_tmp7_, _tmp9_) <= 0;
		_g_object_unref0 (_tmp5_);
		after_last = _tmp10_;
		_tmp12_ = self->priv->meta_items;
		_tmp13_ = gee_abstract_sorted_set_last ((GeeAbstractSortedSet*) _tmp12_);
		_tmp14_ = (DinoPluginsMetaConversationItem*) _tmp13_;
		_tmp15_ = dino_plugins_meta_conversation_item_get_time (_tmp14_);
		_tmp16_ = _tmp15_;
		_tmp17_ = dino_plugins_meta_conversation_item_get_time (item);
		_tmp18_ = _tmp17_;
		_tmp19_ = g_date_time_compare (_tmp16_, _tmp18_) > 0;
		_g_object_unref0 (_tmp14_);
		if (_tmp19_) {
			GeeTreeSet* _tmp20_;
			gpointer _tmp21_;
			DinoPluginsMetaConversationItem* _tmp22_;
			GDateTime* _tmp23_;
			GDateTime* _tmp24_;
			GDateTime* _tmp25_;
			GDateTime* _tmp26_;
			_tmp20_ = self->priv->meta_items;
			_tmp21_ = gee_abstract_sorted_set_first ((GeeAbstractSortedSet*) _tmp20_);
			_tmp22_ = (DinoPluginsMetaConversationItem*) _tmp21_;
			_tmp23_ = dino_plugins_meta_conversation_item_get_time (_tmp22_);
			_tmp24_ = _tmp23_;
			_tmp25_ = dino_plugins_meta_conversation_item_get_time (item);
			_tmp26_ = _tmp25_;
			_tmp11_ = g_date_time_compare (_tmp24_, _tmp26_) < 0;
			_g_object_unref0 (_tmp22_);
		} else {
			_tmp11_ = FALSE;
		}
		within_range = _tmp11_;
		if (within_range) {
			_tmp27_ = TRUE;
		} else {
			gboolean _tmp28_ = FALSE;
			if (self->priv->at_current_content) {
				_tmp28_ = after_last;
			} else {
				_tmp28_ = FALSE;
			}
			_tmp27_ = _tmp28_;
		}
		accept = _tmp27_;
		if (!accept) {
			return;
		}
	}
	dino_ui_conversation_summary_conversation_view_do_insert_item (self, item);
}

void
dino_ui_conversation_summary_conversation_view_do_insert_item (DinoUiConversationSummaryConversationView* self,
                                                               DinoPluginsMetaConversationItem* item)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	{
		GeeTreeSet* _tmp0_;
		_tmp0_ = self->priv->meta_items;
		g_rec_mutex_lock (&self->priv->__lock_meta_items);
		{
			GtkWidget* _tmp1_;
			GtkWidget* _tmp2_;
			GeeTreeSet* _tmp4_;
			_tmp1_ = dino_ui_conversation_summary_conversation_view_insert_new (self, item);
			_tmp2_ = _tmp1_;
			_g_object_unref0 (_tmp2_);
			if (DINO_UI_CONVERSATION_SUMMARY_IS_CONTENT_META_ITEM (item)) {
				GeeTreeSet* _tmp3_;
				_tmp3_ = self->priv->content_items;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp3_, G_TYPE_CHECK_INSTANCE_CAST (item, DINO_UI_CONVERSATION_SUMMARY_TYPE_CONTENT_META_ITEM, DinoUiConversationSummaryContentMetaItem));
			}
			_tmp4_ = self->priv->meta_items;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp4_, item);
		}
		__finally0:
		{
			GeeTreeSet* _tmp5_;
			_tmp5_ = self->priv->meta_items;
			g_rec_mutex_unlock (&self->priv->__lock_meta_items);
		}
		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;
		}
	}
	g_signal_emit_by_name ((DinoPluginsConversationItemCollection*) self, "inserted-item", item);
}

static void
dino_ui_conversation_summary_conversation_view_real_remove_item (DinoPluginsConversationItemCollection* base,
                                                                 DinoPluginsMetaConversationItem* item)
{
	DinoUiConversationSummaryConversationView * self;
	DinoUiConversationSummaryConversationItemSkeleton* skeleton = NULL;
	GeeHashMap* _tmp0_;
	gpointer _tmp1_;
	DinoUiConversationSummaryConversationItemSkeleton* _tmp2_;
	self = (DinoUiConversationSummaryConversationView*) base;
	g_return_if_fail (item != NULL);
	_tmp0_ = self->priv->item_item_skeletons;
	_tmp1_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp0_, item);
	skeleton = (DinoUiConversationSummaryConversationItemSkeleton*) _tmp1_;
	_tmp2_ = skeleton;
	if (_tmp2_ != NULL) {
		GtkBox* _tmp3_;
		DinoUiConversationSummaryConversationItemSkeleton* _tmp4_;
		GtkWidget* _tmp5_;
		GtkWidget* _tmp6_;
		GeeHashMap* _tmp7_;
		GeeList* _tmp8_;
		DinoUiConversationSummaryConversationItemSkeleton* _tmp9_;
		GtkWidget* _tmp10_;
		GtkWidget* _tmp11_;
		GeeHashMap* _tmp12_;
		GeeTreeSet* _tmp14_;
		DinoUiConversationSummaryConversationItemSkeleton* _tmp15_;
		_tmp3_ = self->priv->main;
		_tmp4_ = skeleton;
		_tmp5_ = dino_ui_conversation_summary_conversation_item_skeleton_get_widget (_tmp4_);
		_tmp6_ = _tmp5_;
		gtk_box_remove (_tmp3_, _tmp6_);
		_g_object_unref0 (_tmp6_);
		_tmp7_ = self->priv->widgets;
		gee_abstract_map_unset ((GeeAbstractMap*) _tmp7_, item, NULL);
		_tmp8_ = self->priv->widget_order;
		_tmp9_ = skeleton;
		_tmp10_ = dino_ui_conversation_summary_conversation_item_skeleton_get_widget (_tmp9_);
		_tmp11_ = _tmp10_;
		gee_collection_remove ((GeeCollection*) _tmp8_, _tmp11_);
		_g_object_unref0 (_tmp11_);
		_tmp12_ = self->priv->item_item_skeletons;
		gee_abstract_map_unset ((GeeAbstractMap*) _tmp12_, item, NULL);
		if (DINO_UI_CONVERSATION_SUMMARY_IS_CONTENT_META_ITEM (item)) {
			GeeTreeSet* _tmp13_;
			_tmp13_ = self->priv->content_items;
			gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp13_, G_TYPE_CHECK_INSTANCE_CAST (item, DINO_UI_CONVERSATION_SUMMARY_TYPE_CONTENT_META_ITEM, DinoUiConversationSummaryContentMetaItem));
		}
		_tmp14_ = self->priv->meta_items;
		gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp14_, item);
		_tmp15_ = skeleton;
		g_object_run_dispose ((GObject*) _tmp15_);
	}
	g_signal_emit_by_name ((DinoPluginsConversationItemCollection*) self, "removed-item", item);
	_g_object_unref0 (skeleton);
}

void
dino_ui_conversation_summary_conversation_view_on_add_meta_notification (DinoUiConversationSummaryConversationView* self,
                                                                         DinoPluginsMetaConversationNotification* notification)
{
	GtkWidget* widget = NULL;
	GObject* _tmp0_;
	GtkWidget* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (notification != NULL);
	_tmp0_ = dino_plugins_meta_conversation_notification_get_widget (notification, DINO_PLUGINS_WIDGET_TYPE_GTK4);
	widget = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget);
	_tmp1_ = widget;
	if (_tmp1_ != NULL) {
		GtkWidget* _tmp2_;
		_tmp2_ = widget;
		dino_ui_conversation_summary_conversation_view_add_notification (self, _tmp2_);
	}
	_g_object_unref0 (widget);
}

void
dino_ui_conversation_summary_conversation_view_on_remove_meta_notification (DinoUiConversationSummaryConversationView* self,
                                                                            DinoPluginsMetaConversationNotification* notification)
{
	GtkWidget* widget = NULL;
	GObject* _tmp0_;
	GtkWidget* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (notification != NULL);
	_tmp0_ = dino_plugins_meta_conversation_notification_get_widget (notification, DINO_PLUGINS_WIDGET_TYPE_GTK4);
	widget = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget);
	_tmp1_ = widget;
	if (_tmp1_ != NULL) {
		GtkWidget* _tmp2_;
		_tmp2_ = widget;
		dino_ui_conversation_summary_conversation_view_remove_notification (self, _tmp2_);
	}
	_g_object_unref0 (widget);
}

static gboolean
__lambda117_ (DinoUiConversationSummaryConversationView* self)
{
	GtkRevealer* _tmp0_;
	GtkRevealer* _tmp1_;
	gboolean result;
	_tmp0_ = self->priv->notification_revealer;
	gtk_revealer_set_transition_duration (_tmp0_, (guint) 200);
	_tmp1_ = self->priv->notification_revealer;
	gtk_revealer_set_reveal_child (_tmp1_, TRUE);
	result = FALSE;
	return result;
}

static gboolean
___lambda117__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda117_ ((DinoUiConversationSummaryConversationView*) self);
	return result;
}

void
dino_ui_conversation_summary_conversation_view_add_notification (DinoUiConversationSummaryConversationView* self,
                                                                 GtkWidget* widget)
{
	GtkBox* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (widget != NULL);
	_tmp0_ = self->priv->notifications;
	gtk_box_append (_tmp0_, widget);
	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 20, ___lambda117__gsource_func, g_object_ref (self), g_object_unref);
}

void
dino_ui_conversation_summary_conversation_view_remove_notification (DinoUiConversationSummaryConversationView* self,
                                                                    GtkWidget* widget)
{
	GtkRevealer* _tmp0_;
	GtkBox* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (widget != NULL);
	_tmp0_ = self->priv->notification_revealer;
	gtk_revealer_set_reveal_child (_tmp0_, FALSE);
	_tmp1_ = self->priv->notifications;
	gtk_box_remove (_tmp1_, widget);
}

static GtkWidget*
dino_ui_conversation_summary_conversation_view_insert_new (DinoUiConversationSummaryConversationView* self,
                                                           DinoPluginsMetaConversationItem* item)
{
	DinoPluginsMetaConversationItem* lower_item = NULL;
	GeeTreeSet* _tmp0_;
	gpointer _tmp1_;
	DinoUiConversationSummaryConversationItemSkeleton* item_skeleton = NULL;
	DinoStreamInteractor* _tmp2_;
	DinoEntitiesConversation* _tmp3_;
	DinoUiConversationSummaryConversationItemSkeleton* _tmp4_;
	GeeHashMap* _tmp5_;
	DinoUiConversationSummaryConversationItemSkeleton* _tmp6_;
	gint _tmp7_ = 0;
	DinoPluginsMetaConversationItem* _tmp8_;
	gint index = 0;
	GeeList* _tmp16_;
	DinoUiConversationSummaryConversationItemSkeleton* _tmp17_;
	GtkWidget* _tmp18_;
	GtkWidget* _tmp19_;
	GeeHashMap* _tmp20_;
	DinoUiConversationSummaryConversationItemSkeleton* _tmp21_;
	GtkWidget* _tmp22_;
	GtkWidget* _tmp23_;
	GtkWidget* _tmp24_ = NULL;
	GeeHashMap* _tmp25_;
	DinoPluginsMetaConversationItem* _tmp26_;
	GeeHashMap* _tmp32_;
	gpointer _tmp33_;
	GtkWidget* _tmp34_;
	GtkBox* _tmp35_;
	DinoPluginsMetaConversationItem* _tmp36_;
	DinoPluginsMetaConversationItem* upper_item = NULL;
	GeeTreeSet* _tmp41_;
	gpointer _tmp42_;
	DinoPluginsMetaConversationItem* _tmp43_;
	DinoUiConversationSummaryConversationItemSkeleton* _tmp91_;
	GtkWidget* _tmp92_;
	GtkWidget* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (item != NULL, NULL);
	_tmp0_ = self->priv->meta_items;
	_tmp1_ = gee_abstract_sorted_set_lower ((GeeAbstractSortedSet*) _tmp0_, item);
	lower_item = (DinoPluginsMetaConversationItem*) _tmp1_;
	_tmp2_ = self->priv->stream_interactor;
	_tmp3_ = self->priv->_conversation;
	_tmp4_ = dino_ui_conversation_summary_conversation_item_skeleton_new (_tmp2_, _tmp3_, item);
	item_skeleton = _tmp4_;
	_tmp5_ = self->priv->item_item_skeletons;
	_tmp6_ = item_skeleton;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp5_, item, _tmp6_);
	_tmp8_ = lower_item;
	if (_tmp8_ != NULL) {
		GeeList* _tmp9_;
		GeeHashMap* _tmp10_;
		DinoPluginsMetaConversationItem* _tmp11_;
		gpointer _tmp12_;
		DinoUiConversationSummaryConversationItemSkeleton* _tmp13_;
		GtkWidget* _tmp14_;
		GtkWidget* _tmp15_;
		_tmp9_ = self->priv->widget_order;
		_tmp10_ = self->priv->item_item_skeletons;
		_tmp11_ = lower_item;
		_tmp12_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp10_, _tmp11_);
		_tmp13_ = (DinoUiConversationSummaryConversationItemSkeleton*) _tmp12_;
		_tmp14_ = dino_ui_conversation_summary_conversation_item_skeleton_get_widget (_tmp13_);
		_tmp15_ = _tmp14_;
		_tmp7_ = gee_list_index_of (_tmp9_, _tmp15_) + 1;
		_g_object_unref0 (_tmp15_);
		_g_object_unref0 (_tmp13_);
	} else {
		_tmp7_ = 0;
	}
	index = _tmp7_;
	_tmp16_ = self->priv->widget_order;
	_tmp17_ = item_skeleton;
	_tmp18_ = dino_ui_conversation_summary_conversation_item_skeleton_get_widget (_tmp17_);
	_tmp19_ = _tmp18_;
	gee_list_insert (_tmp16_, index, _tmp19_);
	_g_object_unref0 (_tmp19_);
	_tmp20_ = self->priv->widgets;
	_tmp21_ = item_skeleton;
	_tmp22_ = dino_ui_conversation_summary_conversation_item_skeleton_get_widget (_tmp21_);
	_tmp23_ = _tmp22_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp20_, item, _tmp23_);
	_g_object_unref0 (_tmp23_);
	_tmp25_ = self->priv->item_item_skeletons;
	_tmp26_ = lower_item;
	if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp25_, _tmp26_)) {
		GeeHashMap* _tmp27_;
		DinoPluginsMetaConversationItem* _tmp28_;
		gpointer _tmp29_;
		DinoUiConversationSummaryConversationItemSkeleton* _tmp30_;
		GtkWidget* _tmp31_;
		_tmp27_ = self->priv->item_item_skeletons;
		_tmp28_ = lower_item;
		_tmp29_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp27_, _tmp28_);
		_tmp30_ = (DinoUiConversationSummaryConversationItemSkeleton*) _tmp29_;
		_tmp31_ = dino_ui_conversation_summary_conversation_item_skeleton_get_widget (_tmp30_);
		_g_object_unref0 (_tmp24_);
		_tmp24_ = _tmp31_;
		_g_object_unref0 (_tmp30_);
	} else {
		_g_object_unref0 (_tmp24_);
		_tmp24_ = NULL;
	}
	_tmp32_ = self->priv->widgets;
	_tmp33_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp32_, item);
	_tmp34_ = (GtkWidget*) _tmp33_;
	_tmp35_ = self->priv->main;
	gtk_widget_insert_after (_tmp34_, (GtkWidget*) _tmp35_, _tmp24_);
	_g_object_unref0 (_tmp34_);
	_tmp36_ = lower_item;
	if (_tmp36_ != NULL) {
		DinoPluginsMetaConversationItem* _tmp37_;
		_tmp37_ = lower_item;
		if (dino_ui_conversation_summary_conversation_view_can_merge (self, item, _tmp37_)) {
			DinoUiConversationSummaryConversationItemSkeleton* _tmp38_;
			_tmp38_ = item_skeleton;
			dino_ui_conversation_summary_conversation_item_skeleton_set_show_skeleton (_tmp38_, FALSE);
		} else {
			DinoUiConversationSummaryConversationItemSkeleton* _tmp39_;
			_tmp39_ = item_skeleton;
			dino_ui_conversation_summary_conversation_item_skeleton_set_show_skeleton (_tmp39_, TRUE);
		}
	} else {
		DinoUiConversationSummaryConversationItemSkeleton* _tmp40_;
		_tmp40_ = item_skeleton;
		dino_ui_conversation_summary_conversation_item_skeleton_set_show_skeleton (_tmp40_, TRUE);
	}
	_tmp41_ = self->priv->meta_items;
	_tmp42_ = gee_abstract_sorted_set_higher ((GeeAbstractSortedSet*) _tmp41_, item);
	upper_item = (DinoPluginsMetaConversationItem*) _tmp42_;
	_tmp43_ = upper_item;
	if (_tmp43_ != NULL) {
		DinoPluginsMetaConversationItem* _tmp44_;
		_tmp44_ = upper_item;
		if (!dino_ui_conversation_summary_conversation_view_can_merge (self, _tmp44_, item)) {
			DinoUiConversationSummaryConversationItemSkeleton* upper_skeleton = NULL;
			GeeHashMap* _tmp45_;
			DinoPluginsMetaConversationItem* _tmp46_;
			gpointer _tmp47_;
			DinoUiConversationSummaryConversationItemSkeleton* _tmp48_;
			_tmp45_ = self->priv->item_item_skeletons;
			_tmp46_ = upper_item;
			_tmp47_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp45_, _tmp46_);
			upper_skeleton = (DinoUiConversationSummaryConversationItemSkeleton*) _tmp47_;
			_tmp48_ = upper_skeleton;
			dino_ui_conversation_summary_conversation_item_skeleton_set_show_skeleton (_tmp48_, TRUE);
			_g_object_unref0 (upper_skeleton);
		}
	}
	if (index == 0) {
		DinoApplication* app = NULL;
		DinoApplication* _tmp49_;
		DinoApplication* _tmp50_;
		GeeList* _tmp51_;
		gint _tmp52_;
		gint _tmp53_;
		_tmp49_ = dino_application_get_default ();
		_tmp50_ = _g_object_ref0 (_tmp49_);
		app = _tmp50_;
		_tmp51_ = self->priv->widget_order;
		_tmp52_ = gee_collection_get_size ((GeeCollection*) _tmp51_);
		_tmp53_ = _tmp52_;
		if (_tmp53_ == 1) {
			{
				GeeList* _populator_list = NULL;
				DinoApplication* _tmp54_;
				DinoPluginsRegistry* _tmp55_;
				DinoPluginsRegistry* _tmp56_;
				GeeList* _tmp57_;
				gint _populator_size = 0;
				GeeList* _tmp58_;
				gint _tmp59_;
				gint _tmp60_;
				gint _populator_index = 0;
				_tmp54_ = app;
				_tmp55_ = dino_application_get_plugin_registry (_tmp54_);
				_tmp56_ = _tmp55_;
				_tmp57_ = _tmp56_->conversation_addition_populators;
				_populator_list = _tmp57_;
				_tmp58_ = _populator_list;
				_tmp59_ = gee_collection_get_size ((GeeCollection*) _tmp58_);
				_tmp60_ = _tmp59_;
				_populator_size = _tmp60_;
				_populator_index = -1;
				while (TRUE) {
					gint _tmp61_;
					gint _tmp62_;
					DinoPluginsConversationAdditionPopulator* populator = NULL;
					GeeList* _tmp63_;
					gpointer _tmp64_;
					DinoPluginsConversationAdditionPopulator* _tmp65_;
					DinoEntitiesConversation* _tmp66_;
					GDateTime* _tmp67_;
					GDateTime* _tmp68_;
					GDateTime* _tmp69_;
					GDateTime* _tmp70_;
					_populator_index = _populator_index + 1;
					_tmp61_ = _populator_index;
					_tmp62_ = _populator_size;
					if (!(_tmp61_ < _tmp62_)) {
						break;
					}
					_tmp63_ = _populator_list;
					_tmp64_ = gee_list_get (_tmp63_, _populator_index);
					populator = (DinoPluginsConversationAdditionPopulator*) _tmp64_;
					_tmp65_ = populator;
					_tmp66_ = self->priv->_conversation;
					_tmp67_ = dino_plugins_meta_conversation_item_get_time (item);
					_tmp68_ = _tmp67_;
					_tmp69_ = g_date_time_new_now_utc ();
					_tmp70_ = _tmp69_;
					dino_plugins_conversation_addition_populator_populate_timespan (_tmp65_, _tmp66_, _tmp68_, _tmp70_);
					_g_date_time_unref0 (_tmp70_);
					_g_object_unref0 (populator);
				}
			}
		} else {
			{
				GeeList* _populator_list = NULL;
				DinoApplication* _tmp71_;
				DinoPluginsRegistry* _tmp72_;
				DinoPluginsRegistry* _tmp73_;
				GeeList* _tmp74_;
				gint _populator_size = 0;
				GeeList* _tmp75_;
				gint _tmp76_;
				gint _tmp77_;
				gint _populator_index = 0;
				_tmp71_ = app;
				_tmp72_ = dino_application_get_plugin_registry (_tmp71_);
				_tmp73_ = _tmp72_;
				_tmp74_ = _tmp73_->conversation_addition_populators;
				_populator_list = _tmp74_;
				_tmp75_ = _populator_list;
				_tmp76_ = gee_collection_get_size ((GeeCollection*) _tmp75_);
				_tmp77_ = _tmp76_;
				_populator_size = _tmp77_;
				_populator_index = -1;
				while (TRUE) {
					gint _tmp78_;
					gint _tmp79_;
					DinoPluginsConversationAdditionPopulator* populator = NULL;
					GeeList* _tmp80_;
					gpointer _tmp81_;
					DinoPluginsConversationAdditionPopulator* _tmp82_;
					DinoEntitiesConversation* _tmp83_;
					GDateTime* _tmp84_;
					GDateTime* _tmp85_;
					GeeTreeSet* _tmp86_;
					gpointer _tmp87_;
					DinoPluginsMetaConversationItem* _tmp88_;
					GDateTime* _tmp89_;
					GDateTime* _tmp90_;
					_populator_index = _populator_index + 1;
					_tmp78_ = _populator_index;
					_tmp79_ = _populator_size;
					if (!(_tmp78_ < _tmp79_)) {
						break;
					}
					_tmp80_ = _populator_list;
					_tmp81_ = gee_list_get (_tmp80_, _populator_index);
					populator = (DinoPluginsConversationAdditionPopulator*) _tmp81_;
					_tmp82_ = populator;
					_tmp83_ = self->priv->_conversation;
					_tmp84_ = dino_plugins_meta_conversation_item_get_time (item);
					_tmp85_ = _tmp84_;
					_tmp86_ = self->priv->meta_items;
					_tmp87_ = gee_abstract_sorted_set_higher ((GeeAbstractSortedSet*) _tmp86_, item);
					_tmp88_ = (DinoPluginsMetaConversationItem*) _tmp87_;
					_tmp89_ = dino_plugins_meta_conversation_item_get_time (_tmp88_);
					_tmp90_ = _tmp89_;
					dino_plugins_conversation_addition_populator_populate_timespan (_tmp82_, _tmp83_, _tmp85_, _tmp90_);
					_g_object_unref0 (_tmp88_);
					_g_object_unref0 (populator);
				}
			}
		}
		_g_object_unref0 (app);
	}
	_tmp91_ = item_skeleton;
	_tmp92_ = dino_ui_conversation_summary_conversation_item_skeleton_get_widget (_tmp91_);
	result = _tmp92_;
	_g_object_unref0 (upper_item);
	_g_object_unref0 (_tmp24_);
	_g_object_unref0 (item_skeleton);
	_g_object_unref0 (lower_item);
	return result;
}

static gboolean
dino_ui_conversation_summary_conversation_view_can_merge (DinoUiConversationSummaryConversationView* self,
                                                          DinoPluginsMetaConversationItem* upper_item,
                                                          DinoPluginsMetaConversationItem* lower_item)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	gboolean _tmp6_ = FALSE;
	GDateTime* _tmp7_;
	GDateTime* _tmp8_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (upper_item != NULL, FALSE);
	g_return_val_if_fail (lower_item != NULL, FALSE);
	_tmp7_ = dino_plugins_meta_conversation_item_get_time (upper_item);
	_tmp8_ = _tmp7_;
	if (_tmp8_ != NULL) {
		GDateTime* _tmp9_;
		GDateTime* _tmp10_;
		_tmp9_ = dino_plugins_meta_conversation_item_get_time (lower_item);
		_tmp10_ = _tmp9_;
		_tmp6_ = _tmp10_ != NULL;
	} else {
		_tmp6_ = FALSE;
	}
	if (_tmp6_) {
		GDateTime* _tmp11_;
		GDateTime* _tmp12_;
		GDateTime* _tmp13_;
		GDateTime* _tmp14_;
		_tmp11_ = dino_plugins_meta_conversation_item_get_time (upper_item);
		_tmp12_ = _tmp11_;
		_tmp13_ = dino_plugins_meta_conversation_item_get_time (lower_item);
		_tmp14_ = _tmp13_;
		_tmp5_ = g_date_time_difference (_tmp12_, _tmp14_) < G_TIME_SPAN_MINUTE;
	} else {
		_tmp5_ = FALSE;
	}
	if (_tmp5_) {
		XmppJid* _tmp15_;
		XmppJid* _tmp16_;
		_tmp15_ = dino_plugins_meta_conversation_item_get_jid (upper_item);
		_tmp16_ = _tmp15_;
		_tmp4_ = _tmp16_ != NULL;
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		XmppJid* _tmp17_;
		XmppJid* _tmp18_;
		_tmp17_ = dino_plugins_meta_conversation_item_get_jid (lower_item);
		_tmp18_ = _tmp17_;
		_tmp3_ = _tmp18_ != NULL;
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		XmppJid* _tmp19_;
		XmppJid* _tmp20_;
		XmppJid* _tmp21_;
		XmppJid* _tmp22_;
		_tmp19_ = dino_plugins_meta_conversation_item_get_jid (upper_item);
		_tmp20_ = _tmp19_;
		_tmp21_ = dino_plugins_meta_conversation_item_get_jid (lower_item);
		_tmp22_ = _tmp21_;
		_tmp2_ = xmpp_jid_equals (_tmp20_, _tmp22_);
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		DinoEntitiesEncryption _tmp23_;
		DinoEntitiesEncryption _tmp24_;
		DinoEntitiesEncryption _tmp25_;
		DinoEntitiesEncryption _tmp26_;
		_tmp23_ = dino_plugins_meta_conversation_item_get_encryption (upper_item);
		_tmp24_ = _tmp23_;
		_tmp25_ = dino_plugins_meta_conversation_item_get_encryption (lower_item);
		_tmp26_ = _tmp25_;
		_tmp1_ = _tmp24_ == _tmp26_;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		DinoEntitiesMessageMarked _tmp27_;
		DinoEntitiesMessageMarked _tmp28_;
		DinoEntitiesMessageMarked _tmp29_;
		DinoEntitiesMessageMarked _tmp30_;
		_tmp27_ = dino_plugins_meta_conversation_item_get_mark (upper_item);
		_tmp28_ = _tmp27_;
		_tmp29_ = dino_plugins_meta_conversation_item_get_mark (lower_item);
		_tmp30_ = _tmp29_;
		_tmp0_ = (_tmp28_ == DINO_ENTITIES_MESSAGE_MARKED_WONTSEND) == (_tmp30_ == DINO_ENTITIES_MESSAGE_MARKED_WONTSEND);
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

static void
dino_ui_conversation_summary_conversation_view_on_action_button_clicked (DinoUiConversationSummaryConversationView* self,
                                                                         GtkWidget* widget,
                                                                         GVariant* variant)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (widget != NULL);
	{
		GeeList* _action_list = NULL;
		GeeList* _tmp0_;
		gint _action_size = 0;
		GeeList* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gint _action_index = 0;
		_tmp0_ = self->priv->message_actions;
		_action_list = _tmp0_;
		_tmp1_ = _action_list;
		_tmp2_ = gee_collection_get_size ((GeeCollection*) _tmp1_);
		_tmp3_ = _tmp2_;
		_action_size = _tmp3_;
		_action_index = -1;
		while (TRUE) {
			gint _tmp4_;
			gint _tmp5_;
			DinoPluginsMessageAction* action = NULL;
			GeeList* _tmp6_;
			gpointer _tmp7_;
			DinoPluginsMessageAction* _tmp8_;
			const gchar* _tmp9_;
			const gchar* _tmp10_;
			const gchar* _tmp11_;
			DinoPluginsMessageAction* _tmp12_;
			DinoPluginsMessageActionEvoked _tmp13_;
			gpointer _tmp13__target;
			_action_index = _action_index + 1;
			_tmp4_ = _action_index;
			_tmp5_ = _action_size;
			if (!(_tmp4_ < _tmp5_)) {
				break;
			}
			_tmp6_ = _action_list;
			_tmp7_ = gee_list_get (_tmp6_, _action_index);
			action = (DinoPluginsMessageAction*) _tmp7_;
			_tmp8_ = action;
			_tmp9_ = _tmp8_->name;
			_tmp10_ = gtk_widget_get_name (widget);
			_tmp11_ = _tmp10_;
			if (g_strcmp0 (_tmp9_, _tmp11_) != 0) {
				_g_object_unref0 (action);
				continue;
			}
			_tmp12_ = action;
			_tmp13_ = _tmp12_->callback;
			_tmp13__target = _tmp12_->callback_target;
			_tmp13_ (variant, _tmp13__target);
			_g_object_unref0 (action);
		}
	}
}

static gboolean
____lambda119_ (DinoUiConversationSummaryConversationView* self)
{
	GtkScrolledWindow* _tmp0_;
	GtkAdjustment* _tmp1_;
	GtkAdjustment* _tmp2_;
	GtkScrolledWindow* _tmp3_;
	GtkAdjustment* _tmp4_;
	GtkAdjustment* _tmp5_;
	gdouble _tmp6_;
	gdouble _tmp7_;
	GtkScrolledWindow* _tmp8_;
	GtkAdjustment* _tmp9_;
	GtkAdjustment* _tmp10_;
	gdouble _tmp11_;
	gdouble _tmp12_;
	gboolean result;
	_tmp0_ = self->scrolled;
	_tmp1_ = gtk_scrolled_window_get_vadjustment (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = self->scrolled;
	_tmp4_ = gtk_scrolled_window_get_vadjustment (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = gtk_adjustment_get_upper (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = self->scrolled;
	_tmp9_ = gtk_scrolled_window_get_vadjustment (_tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = gtk_adjustment_get_page_size (_tmp10_);
	_tmp12_ = _tmp11_;
	gtk_adjustment_set_value (_tmp2_, _tmp7_ - _tmp12_);
	result = FALSE;
	return result;
}

static gboolean
_____lambda119__gsource_func (gpointer self)
{
	gboolean result;
	result = ____lambda119_ ((DinoUiConversationSummaryConversationView*) self);
	return result;
}

static gdouble*
_double_dup (gdouble* self)
{
	gdouble* dup;
	dup = g_new0 (gdouble, 1);
	memcpy (dup, self, sizeof (gdouble));
	return dup;
}

static gpointer
__double_dup0 (gpointer self)
{
	return self ? _double_dup (self) : NULL;
}

static void
dino_ui_conversation_summary_conversation_view_on_upper_notify (DinoUiConversationSummaryConversationView* self)
{
	gboolean _tmp0_ = FALSE;
	gdouble* _tmp1_;
	GtkScrolledWindow* _tmp38_;
	GtkAdjustment* _tmp39_;
	GtkAdjustment* _tmp40_;
	gdouble _tmp41_;
	gdouble _tmp42_;
	gdouble* _tmp43_;
	GtkScrolledWindow* _tmp44_;
	GtkAdjustment* _tmp45_;
	GtkAdjustment* _tmp46_;
	gdouble _tmp47_;
	gdouble _tmp48_;
	gdouble* _tmp49_;
	GtkScrolledWindow* _tmp50_;
	GtkAdjustment* _tmp51_;
	GtkAdjustment* _tmp52_;
	gdouble _tmp53_;
	gdouble _tmp54_;
	gdouble* _tmp55_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->was_upper;
	if (_tmp1_ == NULL) {
		_tmp0_ = TRUE;
	} else {
		GtkScrolledWindow* _tmp2_;
		GtkAdjustment* _tmp3_;
		GtkAdjustment* _tmp4_;
		gdouble _tmp5_;
		gdouble _tmp6_;
		gdouble* _tmp7_;
		gdouble* _tmp8_;
		_tmp2_ = self->scrolled;
		_tmp3_ = gtk_scrolled_window_get_vadjustment (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp5_ = gtk_adjustment_get_value (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = self->priv->was_upper;
		_tmp8_ = self->priv->was_page_size;
		_tmp0_ = _tmp6_ > (((*_tmp7_) - (*_tmp8_)) - 1);
	}
	if (_tmp0_) {
		if (self->priv->at_current_content) {
			g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _____lambda119__gsource_func, g_object_ref (self), g_object_unref);
		}
	} else {
		GtkScrolledWindow* _tmp9_;
		GtkAdjustment* _tmp10_;
		GtkAdjustment* _tmp11_;
		gdouble _tmp12_;
		gdouble _tmp13_;
		GtkScrolledWindow* _tmp14_;
		GtkAdjustment* _tmp15_;
		GtkAdjustment* _tmp16_;
		gdouble _tmp17_;
		gdouble _tmp18_;
		GtkScrolledWindow* _tmp19_;
		GtkAdjustment* _tmp20_;
		GtkAdjustment* _tmp21_;
		gdouble _tmp22_;
		gdouble _tmp23_;
		_tmp9_ = self->scrolled;
		_tmp10_ = gtk_scrolled_window_get_vadjustment (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = gtk_adjustment_get_value (_tmp11_);
		_tmp13_ = _tmp12_;
		_tmp14_ = self->scrolled;
		_tmp15_ = gtk_scrolled_window_get_vadjustment (_tmp14_);
		_tmp16_ = _tmp15_;
		_tmp17_ = gtk_adjustment_get_upper (_tmp16_);
		_tmp18_ = _tmp17_;
		_tmp19_ = self->scrolled;
		_tmp20_ = gtk_scrolled_window_get_vadjustment (_tmp19_);
		_tmp21_ = _tmp20_;
		_tmp22_ = gtk_adjustment_get_page_size (_tmp21_);
		_tmp23_ = _tmp22_;
		if (_tmp13_ < ((_tmp18_ - _tmp23_) - 1)) {
			GtkScrolledWindow* _tmp24_;
			GtkAdjustment* _tmp25_;
			GtkAdjustment* _tmp26_;
			GtkScrolledWindow* _tmp27_;
			GtkAdjustment* _tmp28_;
			GtkAdjustment* _tmp29_;
			gdouble _tmp30_;
			gdouble _tmp31_;
			gdouble* _tmp32_;
			GtkScrolledWindow* _tmp33_;
			GtkAdjustment* _tmp34_;
			GtkAdjustment* _tmp35_;
			gdouble _tmp36_;
			gdouble _tmp37_;
			_tmp24_ = self->scrolled;
			_tmp25_ = gtk_scrolled_window_get_vadjustment (_tmp24_);
			_tmp26_ = _tmp25_;
			_tmp27_ = self->scrolled;
			_tmp28_ = gtk_scrolled_window_get_vadjustment (_tmp27_);
			_tmp29_ = _tmp28_;
			_tmp30_ = gtk_adjustment_get_upper (_tmp29_);
			_tmp31_ = _tmp30_;
			_tmp32_ = self->priv->was_upper;
			_tmp33_ = self->scrolled;
			_tmp34_ = gtk_scrolled_window_get_vadjustment (_tmp33_);
			_tmp35_ = _tmp34_;
			_tmp36_ = gtk_adjustment_get_value (_tmp35_);
			_tmp37_ = _tmp36_;
			gtk_adjustment_set_value (_tmp26_, (_tmp31_ - (*_tmp32_)) + _tmp37_);
		}
	}
	_tmp38_ = self->scrolled;
	_tmp39_ = gtk_scrolled_window_get_vadjustment (_tmp38_);
	_tmp40_ = _tmp39_;
	_tmp41_ = gtk_adjustment_get_upper (_tmp40_);
	_tmp42_ = _tmp41_;
	_tmp43_ = __double_dup0 (&_tmp42_);
	_g_free0 (self->priv->was_upper);
	self->priv->was_upper = _tmp43_;
	_tmp44_ = self->scrolled;
	_tmp45_ = gtk_scrolled_window_get_vadjustment (_tmp44_);
	_tmp46_ = _tmp45_;
	_tmp47_ = gtk_adjustment_get_page_size (_tmp46_);
	_tmp48_ = _tmp47_;
	_tmp49_ = __double_dup0 (&_tmp48_);
	_g_free0 (self->priv->was_page_size);
	self->priv->was_page_size = _tmp49_;
	_tmp50_ = self->scrolled;
	_tmp51_ = gtk_scrolled_window_get_vadjustment (_tmp50_);
	_tmp52_ = _tmp51_;
	_tmp53_ = gtk_adjustment_get_value (_tmp52_);
	_tmp54_ = _tmp53_;
	_tmp55_ = __double_dup0 (&_tmp54_);
	_g_free0 (self->priv->was_value);
	self->priv->was_value = _tmp55_;
	g_mutex_trylock (&self->priv->reloading_mutex);
	g_mutex_unlock (&self->priv->reloading_mutex);
}

static void
dino_ui_conversation_summary_conversation_view_on_value_notify (DinoUiConversationSummaryConversationView* self)
{
	GtkScrolledWindow* _tmp0_;
	GtkAdjustment* _tmp1_;
	GtkAdjustment* _tmp2_;
	gdouble _tmp3_;
	gdouble _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->scrolled;
	_tmp1_ = gtk_scrolled_window_get_vadjustment (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = gtk_adjustment_get_value (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_ < ((gdouble) 400)) {
		dino_ui_conversation_summary_conversation_view_load_earlier_messages (self);
	} else {
		GtkScrolledWindow* _tmp5_;
		GtkAdjustment* _tmp6_;
		GtkAdjustment* _tmp7_;
		gdouble _tmp8_;
		gdouble _tmp9_;
		GtkScrolledWindow* _tmp10_;
		GtkAdjustment* _tmp11_;
		GtkAdjustment* _tmp12_;
		gdouble _tmp13_;
		gdouble _tmp14_;
		GtkScrolledWindow* _tmp15_;
		GtkAdjustment* _tmp16_;
		GtkAdjustment* _tmp17_;
		gdouble _tmp18_;
		gdouble _tmp19_;
		_tmp5_ = self->scrolled;
		_tmp6_ = gtk_scrolled_window_get_vadjustment (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = gtk_adjustment_get_upper (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = self->scrolled;
		_tmp11_ = gtk_scrolled_window_get_vadjustment (_tmp10_);
		_tmp12_ = _tmp11_;
		_tmp13_ = gtk_adjustment_get_value (_tmp12_);
		_tmp14_ = _tmp13_;
		_tmp15_ = self->scrolled;
		_tmp16_ = gtk_scrolled_window_get_vadjustment (_tmp15_);
		_tmp17_ = _tmp16_;
		_tmp18_ = gtk_adjustment_get_page_size (_tmp17_);
		_tmp19_ = _tmp18_;
		if ((_tmp9_ - (_tmp14_ + _tmp19_)) < ((gdouble) 400)) {
			dino_ui_conversation_summary_conversation_view_load_later_messages (self);
		}
	}
}

static void
dino_ui_conversation_summary_conversation_view_load_earlier_messages (DinoUiConversationSummaryConversationView* self)
{
	GtkScrolledWindow* _tmp0_;
	GtkAdjustment* _tmp1_;
	GtkAdjustment* _tmp2_;
	gdouble _tmp3_;
	gdouble _tmp4_;
	gdouble* _tmp5_;
	GeeTreeSet* _tmp6_;
	gint _tmp7_;
	gint _tmp8_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->scrolled;
	_tmp1_ = gtk_scrolled_window_get_vadjustment (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = gtk_adjustment_get_value (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = __double_dup0 (&_tmp4_);
	_g_free0 (self->priv->was_value);
	self->priv->was_value = _tmp5_;
	if (!g_mutex_trylock (&self->priv->reloading_mutex)) {
		return;
	}
	_tmp6_ = self->priv->content_items;
	_tmp7_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp6_);
	_tmp8_ = _tmp7_;
	if (_tmp8_ > 0) {
		GeeList* items = NULL;
		DinoUiConversationSummaryContentProvider* _tmp9_;
		DinoEntitiesConversation* _tmp10_;
		GeeTreeSet* _tmp11_;
		gpointer _tmp12_;
		DinoUiConversationSummaryContentMetaItem* _tmp13_;
		DinoContentItem* _tmp14_;
		GeeList* _tmp15_;
		GeeList* _tmp16_;
		_tmp9_ = self->priv->content_populator;
		_tmp10_ = self->priv->_conversation;
		_tmp11_ = self->priv->content_items;
		_tmp12_ = gee_abstract_sorted_set_first ((GeeAbstractSortedSet*) _tmp11_);
		_tmp13_ = G_TYPE_CHECK_INSTANCE_CAST ((DinoUiConversationSummaryContentMetaItem*) _tmp12_, DINO_UI_CONVERSATION_SUMMARY_TYPE_CONTENT_META_ITEM, DinoUiConversationSummaryContentMetaItem);
		_tmp14_ = _tmp13_->content_item;
		_tmp15_ = dino_ui_conversation_summary_content_provider_populate_before (_tmp9_, _tmp10_, _tmp14_, 20);
		_tmp16_ = _tmp15_;
		_g_object_unref0 (_tmp13_);
		items = _tmp16_;
		{
			GeeList* _item_list = NULL;
			GeeList* _tmp17_;
			gint _item_size = 0;
			GeeList* _tmp18_;
			gint _tmp19_;
			gint _tmp20_;
			gint _item_index = 0;
			_tmp17_ = items;
			_item_list = _tmp17_;
			_tmp18_ = _item_list;
			_tmp19_ = gee_collection_get_size ((GeeCollection*) _tmp18_);
			_tmp20_ = _tmp19_;
			_item_size = _tmp20_;
			_item_index = -1;
			while (TRUE) {
				gint _tmp21_;
				gint _tmp22_;
				DinoUiConversationSummaryContentMetaItem* item = NULL;
				GeeList* _tmp23_;
				gpointer _tmp24_;
				DinoUiConversationSummaryContentMetaItem* _tmp25_;
				_item_index = _item_index + 1;
				_tmp21_ = _item_index;
				_tmp22_ = _item_size;
				if (!(_tmp21_ < _tmp22_)) {
					break;
				}
				_tmp23_ = _item_list;
				_tmp24_ = gee_list_get (_tmp23_, _item_index);
				item = (DinoUiConversationSummaryContentMetaItem*) _tmp24_;
				_tmp25_ = item;
				dino_ui_conversation_summary_conversation_view_do_insert_item (self, (DinoPluginsMetaConversationItem*) _tmp25_);
				_g_object_unref0 (item);
			}
		}
		_g_object_unref0 (items);
	} else {
		g_mutex_unlock (&self->priv->reloading_mutex);
	}
}

static void
dino_ui_conversation_summary_conversation_view_load_later_messages (DinoUiConversationSummaryConversationView* self)
{
	gboolean _tmp0_ = FALSE;
	GeeTreeSet* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	g_return_if_fail (self != NULL);
	if (!g_mutex_trylock (&self->priv->reloading_mutex)) {
		return;
	}
	_tmp1_ = self->priv->content_items;
	_tmp2_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_ > 0) {
		_tmp0_ = !self->priv->at_current_content;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GeeList* items = NULL;
		DinoUiConversationSummaryContentProvider* _tmp4_;
		DinoEntitiesConversation* _tmp5_;
		GeeTreeSet* _tmp6_;
		gpointer _tmp7_;
		DinoUiConversationSummaryContentMetaItem* _tmp8_;
		DinoContentItem* _tmp9_;
		GeeList* _tmp10_;
		GeeList* _tmp11_;
		GeeList* _tmp12_;
		gint _tmp13_;
		gint _tmp14_;
		_tmp4_ = self->priv->content_populator;
		_tmp5_ = self->priv->_conversation;
		_tmp6_ = self->priv->content_items;
		_tmp7_ = gee_abstract_sorted_set_last ((GeeAbstractSortedSet*) _tmp6_);
		_tmp8_ = G_TYPE_CHECK_INSTANCE_CAST ((DinoUiConversationSummaryContentMetaItem*) _tmp7_, DINO_UI_CONVERSATION_SUMMARY_TYPE_CONTENT_META_ITEM, DinoUiConversationSummaryContentMetaItem);
		_tmp9_ = _tmp8_->content_item;
		_tmp10_ = dino_ui_conversation_summary_content_provider_populate_after (_tmp4_, _tmp5_, _tmp9_, 20);
		_tmp11_ = _tmp10_;
		_g_object_unref0 (_tmp8_);
		items = _tmp11_;
		_tmp12_ = items;
		_tmp13_ = gee_collection_get_size ((GeeCollection*) _tmp12_);
		_tmp14_ = _tmp13_;
		if (_tmp14_ == 0) {
			self->priv->at_current_content = TRUE;
		}
		{
			GeeList* _item_list = NULL;
			GeeList* _tmp15_;
			gint _item_size = 0;
			GeeList* _tmp16_;
			gint _tmp17_;
			gint _tmp18_;
			gint _item_index = 0;
			_tmp15_ = items;
			_item_list = _tmp15_;
			_tmp16_ = _item_list;
			_tmp17_ = gee_collection_get_size ((GeeCollection*) _tmp16_);
			_tmp18_ = _tmp17_;
			_item_size = _tmp18_;
			_item_index = -1;
			while (TRUE) {
				gint _tmp19_;
				gint _tmp20_;
				DinoUiConversationSummaryContentMetaItem* item = NULL;
				GeeList* _tmp21_;
				gpointer _tmp22_;
				DinoUiConversationSummaryContentMetaItem* _tmp23_;
				_item_index = _item_index + 1;
				_tmp19_ = _item_index;
				_tmp20_ = _item_size;
				if (!(_tmp19_ < _tmp20_)) {
					break;
				}
				_tmp21_ = _item_list;
				_tmp22_ = gee_list_get (_tmp21_, _item_index);
				item = (DinoUiConversationSummaryContentMetaItem*) _tmp22_;
				_tmp23_ = item;
				dino_ui_conversation_summary_conversation_view_do_insert_item (self, (DinoPluginsMetaConversationItem*) _tmp23_);
				_g_object_unref0 (item);
			}
		}
		_g_object_unref0 (items);
	} else {
		g_mutex_unlock (&self->priv->reloading_mutex);
	}
}

static gint
dino_ui_conversation_summary_conversation_view_compare_content_meta_items (DinoUiConversationSummaryContentMetaItem* a,
                                                                           DinoUiConversationSummaryContentMetaItem* b)
{
	gint result;
	g_return_val_if_fail (a != NULL, -1);
	g_return_val_if_fail (b != NULL, -1);
	result = dino_ui_conversation_summary_conversation_view_compare_meta_items ((DinoPluginsMetaConversationItem*) a, (DinoPluginsMetaConversationItem*) b);
	return result;
}

static gint
dino_ui_conversation_summary_conversation_view_compare_meta_items (DinoPluginsMetaConversationItem* a,
                                                                   DinoPluginsMetaConversationItem* b)
{
	gint cmp1 = 0;
	GDateTime* _tmp0_;
	GDateTime* _tmp1_;
	GDateTime* _tmp2_;
	GDateTime* _tmp3_;
	gint _tmp4_;
	gint _tmp5_;
	gint _tmp6_;
	gint _tmp7_;
	gint result;
	g_return_val_if_fail (a != NULL, -1);
	g_return_val_if_fail (b != NULL, -1);
	_tmp0_ = dino_plugins_meta_conversation_item_get_time (a);
	_tmp1_ = _tmp0_;
	_tmp2_ = dino_plugins_meta_conversation_item_get_time (b);
	_tmp3_ = _tmp2_;
	cmp1 = g_date_time_compare (_tmp1_, _tmp3_);
	if (cmp1 != 0) {
		result = cmp1;
		return result;
	}
	_tmp4_ = dino_plugins_meta_conversation_item_get_secondary_sort_indicator (a);
	_tmp5_ = _tmp4_;
	_tmp6_ = dino_plugins_meta_conversation_item_get_secondary_sort_indicator (b);
	_tmp7_ = _tmp6_;
	result = _tmp5_ - _tmp7_;
	return result;
}

static void
dino_ui_conversation_summary_conversation_view_clear (DinoUiConversationSummaryConversationView* self)
{
	GeeTreeSet* _tmp6_;
	GeeTreeSet* _tmp7_;
	GeeList* _tmp8_;
	GeeHashMap* _tmp19_;
	GeeHashMap* _tmp31_;
	GtkWidget* notification = NULL;
	GtkBox* _tmp32_;
	GtkWidget* _tmp33_;
	GtkWidget* _tmp34_;
	g_return_if_fail (self != NULL);
	_g_free0 (self->priv->was_upper);
	self->priv->was_upper = NULL;
	_g_free0 (self->priv->was_page_size);
	self->priv->was_page_size = NULL;
	{
		GeeIterator* _item_it = NULL;
		GeeTreeSet* _tmp0_;
		GeeIterator* _tmp1_;
		_tmp0_ = self->priv->content_items;
		_tmp1_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp0_);
		_item_it = _tmp1_;
		while (TRUE) {
			GeeIterator* _tmp2_;
			DinoUiConversationSummaryContentMetaItem* item = NULL;
			GeeIterator* _tmp3_;
			gpointer _tmp4_;
			DinoUiConversationSummaryContentMetaItem* _tmp5_;
			_tmp2_ = _item_it;
			if (!gee_iterator_next (_tmp2_)) {
				break;
			}
			_tmp3_ = _item_it;
			_tmp4_ = gee_iterator_get (_tmp3_);
			item = (DinoUiConversationSummaryContentMetaItem*) _tmp4_;
			_tmp5_ = item;
			g_object_run_dispose ((GObject*) _tmp5_);
			_g_object_unref0 (item);
		}
		_g_object_unref0 (_item_it);
	}
	_tmp6_ = self->priv->content_items;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp6_);
	_tmp7_ = self->priv->meta_items;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp7_);
	_tmp8_ = self->priv->widget_order;
	gee_collection_clear ((GeeCollection*) _tmp8_);
	{
		GeeIterator* _skeleton_it = NULL;
		GeeHashMap* _tmp9_;
		GeeCollection* _tmp10_;
		GeeCollection* _tmp11_;
		GeeCollection* _tmp12_;
		GeeIterator* _tmp13_;
		GeeIterator* _tmp14_;
		_tmp9_ = self->priv->item_item_skeletons;
		_tmp10_ = gee_abstract_map_get_values ((GeeAbstractMap*) _tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = _tmp11_;
		_tmp13_ = gee_iterable_iterator ((GeeIterable*) _tmp12_);
		_tmp14_ = _tmp13_;
		_g_object_unref0 (_tmp12_);
		_skeleton_it = _tmp14_;
		while (TRUE) {
			GeeIterator* _tmp15_;
			DinoUiConversationSummaryConversationItemSkeleton* skeleton = NULL;
			GeeIterator* _tmp16_;
			gpointer _tmp17_;
			DinoUiConversationSummaryConversationItemSkeleton* _tmp18_;
			_tmp15_ = _skeleton_it;
			if (!gee_iterator_next (_tmp15_)) {
				break;
			}
			_tmp16_ = _skeleton_it;
			_tmp17_ = gee_iterator_get (_tmp16_);
			skeleton = (DinoUiConversationSummaryConversationItemSkeleton*) _tmp17_;
			_tmp18_ = skeleton;
			g_object_run_dispose ((GObject*) _tmp18_);
			_g_object_unref0 (skeleton);
		}
		_g_object_unref0 (_skeleton_it);
	}
	_tmp19_ = self->priv->item_item_skeletons;
	gee_abstract_map_clear ((GeeAbstractMap*) _tmp19_);
	{
		GeeIterator* _widget_it = NULL;
		GeeHashMap* _tmp20_;
		GeeCollection* _tmp21_;
		GeeCollection* _tmp22_;
		GeeCollection* _tmp23_;
		GeeIterator* _tmp24_;
		GeeIterator* _tmp25_;
		_tmp20_ = self->priv->widgets;
		_tmp21_ = gee_abstract_map_get_values ((GeeAbstractMap*) _tmp20_);
		_tmp22_ = _tmp21_;
		_tmp23_ = _tmp22_;
		_tmp24_ = gee_iterable_iterator ((GeeIterable*) _tmp23_);
		_tmp25_ = _tmp24_;
		_g_object_unref0 (_tmp23_);
		_widget_it = _tmp25_;
		while (TRUE) {
			GeeIterator* _tmp26_;
			GtkWidget* widget = NULL;
			GeeIterator* _tmp27_;
			gpointer _tmp28_;
			GtkWidget* _tmp29_;
			GtkWidget* _tmp30_;
			_tmp26_ = _widget_it;
			if (!gee_iterator_next (_tmp26_)) {
				break;
			}
			_tmp27_ = _widget_it;
			_tmp28_ = gee_iterator_get (_tmp27_);
			widget = (GtkWidget*) _tmp28_;
			_tmp29_ = widget;
			gtk_widget_unparent (_tmp29_);
			_tmp30_ = widget;
			g_object_run_dispose ((GObject*) _tmp30_);
			_g_object_unref0 (widget);
		}
		_g_object_unref0 (_widget_it);
	}
	_tmp31_ = self->priv->widgets;
	gee_abstract_map_clear ((GeeAbstractMap*) _tmp31_);
	_tmp32_ = self->priv->notifications;
	_tmp33_ = gtk_widget_get_first_child ((GtkWidget*) _tmp32_);
	_tmp34_ = _g_object_ref0 (_tmp33_);
	notification = _tmp34_;
	while (TRUE) {
		GtkWidget* _tmp35_;
		GtkBox* _tmp36_;
		GtkWidget* _tmp37_;
		GtkBox* _tmp38_;
		GtkWidget* _tmp39_;
		GtkWidget* _tmp40_;
		_tmp35_ = notification;
		if (!(_tmp35_ != NULL)) {
			break;
		}
		_tmp36_ = self->priv->notifications;
		_tmp37_ = notification;
		gtk_box_remove (_tmp36_, _tmp37_);
		_tmp38_ = self->priv->notifications;
		_tmp39_ = gtk_widget_get_first_child ((GtkWidget*) _tmp38_);
		_tmp40_ = _g_object_ref0 (_tmp39_);
		_g_object_unref0 (notification);
		notification = _tmp40_;
	}
	_g_object_unref0 (notification);
}

static void
dino_ui_conversation_summary_conversation_view_clear_notifications (DinoUiConversationSummaryConversationView* self)
{
	GtkRevealer* _tmp0_;
	GtkRevealer* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->notification_revealer;
	gtk_revealer_set_transition_duration (_tmp0_, (guint) 0);
	_tmp1_ = self->priv->notification_revealer;
	gtk_revealer_set_reveal_child (_tmp1_, FALSE);
}

DinoUiConversationSummaryConversationView*
dino_ui_conversation_summary_conversation_view_construct (GType object_type)
{
	DinoUiConversationSummaryConversationView * self = NULL;
	self = (DinoUiConversationSummaryConversationView*) g_object_new (object_type, NULL);
	return self;
}

DinoUiConversationSummaryConversationView*
dino_ui_conversation_summary_conversation_view_new (void)
{
	return dino_ui_conversation_summary_conversation_view_construct (DINO_UI_CONVERSATION_SUMMARY_TYPE_CONVERSATION_VIEW);
}

DinoEntitiesConversation*
dino_ui_conversation_summary_conversation_view_get_conversation (DinoUiConversationSummaryConversationView* self)
{
	DinoEntitiesConversation* result;
	DinoEntitiesConversation* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_conversation;
	result = _tmp0_;
	return result;
}

static void
dino_ui_conversation_summary_conversation_view_set_conversation (DinoUiConversationSummaryConversationView* self,
                                                                 DinoEntitiesConversation* value)
{
	DinoEntitiesConversation* old_value;
	g_return_if_fail (self != NULL);
	old_value = dino_ui_conversation_summary_conversation_view_get_conversation (self);
	if (old_value != value) {
		DinoEntitiesConversation* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_conversation);
		self->priv->_conversation = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, dino_ui_conversation_summary_conversation_view_properties[DINO_UI_CONVERSATION_SUMMARY_CONVERSATION_VIEW_CONVERSATION_PROPERTY]);
	}
}

static Block30Data*
block30_data_ref (Block30Data* _data30_)
{
	g_atomic_int_inc (&_data30_->_ref_count_);
	return _data30_;
}

static void
block30_data_unref (void * _userdata_)
{
	Block30Data* _data30_;
	_data30_ = (Block30Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data30_->_ref_count_)) {
		DinoUiConversationSummaryConversationView* self;
		self = _data30_->self;
		_g_object_unref0 (_data30_->reaction_button);
		_g_object_unref0 (self);
		g_slice_free (Block30Data, _data30_);
	}
}

static void
_dino_ui_conversation_summary_conversation_view___lambda132_ (DinoUiConversationSummaryConversationView* self,
                                                              GtkButton* button)
{
	g_return_if_fail (button != NULL);
	dino_ui_conversation_summary_conversation_view_on_action_button_clicked (self, (GtkWidget*) button, NULL);
}

static void
__dino_ui_conversation_summary_conversation_view___lambda132__gtk_button_clicked (GtkButton* _sender,
                                                                                  gpointer self)
{
	_dino_ui_conversation_summary_conversation_view___lambda132_ ((DinoUiConversationSummaryConversationView*) self, _sender);
}

static void
_dino_ui_conversation_summary_conversation_view___lambda133_ (DinoUiConversationSummaryConversationView* self,
                                                              GtkButton* button)
{
	g_return_if_fail (button != NULL);
	dino_ui_conversation_summary_conversation_view_on_action_button_clicked (self, (GtkWidget*) button, NULL);
}

static void
__dino_ui_conversation_summary_conversation_view___lambda133__gtk_button_clicked (GtkButton* _sender,
                                                                                  gpointer self)
{
	_dino_ui_conversation_summary_conversation_view___lambda133_ ((DinoUiConversationSummaryConversationView*) self, _sender);
}

static void
_dino_ui_conversation_summary_conversation_view___lambda134_ (Block30Data* _data30_,
                                                              const gchar* emoji)
{
	DinoUiConversationSummaryConversationView* self;
	GtkMenuButton* _tmp0_;
	GVariant* _tmp1_;
	GVariant* _tmp2_;
	self = _data30_->self;
	g_return_if_fail (emoji != NULL);
	_tmp0_ = _data30_->reaction_button;
	_tmp1_ = g_variant_new_string (emoji);
	g_variant_ref_sink (_tmp1_);
	_tmp2_ = _tmp1_;
	dino_ui_conversation_summary_conversation_view_on_action_button_clicked (self, (GtkWidget*) _tmp0_, _tmp2_);
	_g_variant_unref0 (_tmp2_);
}

static void
__dino_ui_conversation_summary_conversation_view___lambda134__gtk_emoji_chooser_emoji_picked (GtkEmojiChooser* _sender,
                                                                                              const gchar* text,
                                                                                              gpointer self)
{
	_dino_ui_conversation_summary_conversation_view___lambda134_ (self, text);
}

static GObject *
dino_ui_conversation_summary_conversation_view_constructor (GType type,
                                                            guint n_construct_properties,
                                                            GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	DinoUiConversationSummaryConversationView * self;
	Block30Data* _data30_;
	GtkBinLayout* _tmp0_;
	GtkWidget* _tmp1_;
	GtkBinLayout* _tmp2_;
	GtkButton* correction_button = NULL;
	gchar* _tmp3_;
	GtkButton* _tmp4_ = NULL;
	GtkButton* _tmp5_;
	GeeHashMap* _tmp6_;
	GtkButton* _tmp7_;
	GtkBox* _tmp8_;
	GtkButton* _tmp9_;
	GtkButton* reply_button = NULL;
	gchar* _tmp10_;
	GtkButton* _tmp11_ = NULL;
	GtkButton* _tmp12_;
	GeeHashMap* _tmp13_;
	GtkButton* _tmp14_;
	GtkBox* _tmp15_;
	GtkButton* _tmp16_;
	gchar* _tmp17_;
	GtkMenuButton* _tmp18_ = NULL;
	GtkEmojiChooser* chooser = NULL;
	GtkEmojiChooser* _tmp19_;
	GtkEmojiChooser* _tmp20_;
	GtkMenuButton* _tmp21_;
	GtkEmojiChooser* _tmp22_;
	GeeHashMap* _tmp23_;
	GtkMenuButton* _tmp24_;
	GtkBox* _tmp25_;
	GtkMenuButton* _tmp26_;
	parent_class = G_OBJECT_CLASS (dino_ui_conversation_summary_conversation_view_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_UI_CONVERSATION_SUMMARY_TYPE_CONVERSATION_VIEW, DinoUiConversationSummaryConversationView);
	_data30_ = g_slice_new0 (Block30Data);
	_data30_->_ref_count_ = 1;
	_data30_->self = g_object_ref (self);
	_tmp0_ = (GtkBinLayout*) gtk_bin_layout_new ();
	gtk_widget_set_layout_manager ((GtkWidget*) self, (GtkLayoutManager*) _tmp0_);
	_tmp1_ = self->priv->main_wrap_box;
	_tmp2_ = (GtkBinLayout*) gtk_bin_layout_new ();
	gtk_widget_set_layout_manager (_tmp1_, (GtkLayoutManager*) _tmp2_);
	_tmp3_ = g_strdup ("correction");
	_tmp4_ = (GtkButton*) gtk_button_new ();
	gtk_widget_set_name ((GtkWidget*) _tmp4_, _tmp3_);
	_g_free0 (_tmp3_);
	g_object_ref_sink (_tmp4_);
	correction_button = _tmp4_;
	_tmp5_ = correction_button;
	g_signal_connect_object (_tmp5_, "clicked", (GCallback) __dino_ui_conversation_summary_conversation_view___lambda132__gtk_button_clicked, self, 0);
	_tmp6_ = self->priv->action_buttons;
	_tmp7_ = correction_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp6_, "correction", (GtkWidget*) _tmp7_);
	_tmp8_ = self->priv->message_menu_box;
	_tmp9_ = correction_button;
	gtk_box_append (_tmp8_, (GtkWidget*) _tmp9_);
	_tmp10_ = g_strdup ("reply");
	_tmp11_ = (GtkButton*) gtk_button_new ();
	gtk_widget_set_name ((GtkWidget*) _tmp11_, _tmp10_);
	_g_free0 (_tmp10_);
	g_object_ref_sink (_tmp11_);
	reply_button = _tmp11_;
	_tmp12_ = reply_button;
	g_signal_connect_object (_tmp12_, "clicked", (GCallback) __dino_ui_conversation_summary_conversation_view___lambda133__gtk_button_clicked, self, 0);
	_tmp13_ = self->priv->action_buttons;
	_tmp14_ = reply_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp13_, "reply", (GtkWidget*) _tmp14_);
	_tmp15_ = self->priv->message_menu_box;
	_tmp16_ = reply_button;
	gtk_box_append (_tmp15_, (GtkWidget*) _tmp16_);
	_tmp17_ = g_strdup ("reaction");
	_tmp18_ = (GtkMenuButton*) gtk_menu_button_new ();
	gtk_widget_set_name ((GtkWidget*) _tmp18_, _tmp17_);
	_g_free0 (_tmp17_);
	g_object_ref_sink (_tmp18_);
	_data30_->reaction_button = _tmp18_;
	_tmp19_ = (GtkEmojiChooser*) gtk_emoji_chooser_new ();
	g_object_ref_sink (_tmp19_);
	chooser = _tmp19_;
	_tmp20_ = chooser;
	g_signal_connect_data (_tmp20_, "emoji-picked", (GCallback) __dino_ui_conversation_summary_conversation_view___lambda134__gtk_emoji_chooser_emoji_picked, block30_data_ref (_data30_), (GClosureNotify) block30_data_unref, 0);
	_tmp21_ = _data30_->reaction_button;
	_tmp22_ = chooser;
	gtk_menu_button_set_popover (_tmp21_, (GtkPopover*) _tmp22_);
	_tmp23_ = self->priv->action_buttons;
	_tmp24_ = _data30_->reaction_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp23_, "reaction", (GtkWidget*) _tmp24_);
	_tmp25_ = self->priv->message_menu_box;
	_tmp26_ = _data30_->reaction_button;
	gtk_box_append (_tmp25_, (GtkWidget*) _tmp26_);
	_g_object_unref0 (chooser);
	_g_object_unref0 (reply_button);
	_g_object_unref0 (correction_button);
	block30_data_unref (_data30_);
	_data30_ = NULL;
	return obj;
}

static void
dino_ui_conversation_summary_conversation_view_class_init (DinoUiConversationSummaryConversationViewClass * klass,
                                                           gpointer klass_data)
{
	dino_ui_conversation_summary_conversation_view_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DinoUiConversationSummaryConversationView_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_dino_ui_conversation_summary_conversation_view_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_dino_ui_conversation_summary_conversation_view_set_property;
	G_OBJECT_CLASS (klass)->constructor = dino_ui_conversation_summary_conversation_view_constructor;
	G_OBJECT_CLASS (klass)->finalize = dino_ui_conversation_summary_conversation_view_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_CONVERSATION_SUMMARY_CONVERSATION_VIEW_CONVERSATION_PROPERTY, dino_ui_conversation_summary_conversation_view_properties[DINO_UI_CONVERSATION_SUMMARY_CONVERSATION_VIEW_CONVERSATION_PROPERTY] = g_param_spec_object ("conversation", "conversation", "conversation", DINO_ENTITIES_TYPE_CONVERSATION, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/im/dino/Dino/conversation_content_view/view.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "scrolled", FALSE, G_STRUCT_OFFSET (DinoUiConversationSummaryConversationView, scrolled));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "notification_revealer", FALSE, DinoUiConversationSummaryConversationView_private_offset + G_STRUCT_OFFSET (DinoUiConversationSummaryConversationViewPrivate, notification_revealer));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "message_menu_box", FALSE, DinoUiConversationSummaryConversationView_private_offset + G_STRUCT_OFFSET (DinoUiConversationSummaryConversationViewPrivate, message_menu_box));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "notifications", FALSE, DinoUiConversationSummaryConversationView_private_offset + G_STRUCT_OFFSET (DinoUiConversationSummaryConversationViewPrivate, notifications));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "main", FALSE, DinoUiConversationSummaryConversationView_private_offset + G_STRUCT_OFFSET (DinoUiConversationSummaryConversationViewPrivate, main));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "main_wrap_box", FALSE, DinoUiConversationSummaryConversationView_private_offset + G_STRUCT_OFFSET (DinoUiConversationSummaryConversationViewPrivate, main_wrap_box));
}

static void
dino_ui_conversation_summary_conversation_view_dino_plugins_conversation_item_collection_interface_init (DinoPluginsConversationItemCollectionIface * iface,
                                                                                                         gpointer iface_data)
{
	dino_ui_conversation_summary_conversation_view_dino_plugins_conversation_item_collection_parent_iface = g_type_interface_peek_parent (iface);
	iface->insert_item = (void (*) (DinoPluginsConversationItemCollection*, DinoPluginsMetaConversationItem*)) dino_ui_conversation_summary_conversation_view_real_insert_item;
	iface->remove_item = (void (*) (DinoPluginsConversationItemCollection*, DinoPluginsMetaConversationItem*)) dino_ui_conversation_summary_conversation_view_real_remove_item;
}

static void
dino_ui_conversation_summary_conversation_view_dino_plugins_notification_collection_interface_init (DinoPluginsNotificationCollectionIface * iface,
                                                                                                    gpointer iface_data)
{
	dino_ui_conversation_summary_conversation_view_dino_plugins_notification_collection_parent_iface = g_type_interface_peek_parent (iface);
}

static void
dino_ui_conversation_summary_conversation_view_instance_init (DinoUiConversationSummaryConversationView * self,
                                                              gpointer klass)
{
	GeeHashMap* _tmp0_;
	GeeTreeSet* _tmp1_;
	GeeTreeSet* _tmp2_;
	GeeHashMap* _tmp3_;
	GeeHashMap* _tmp4_;
	GeeArrayList* _tmp5_;
	self->priv = dino_ui_conversation_summary_conversation_view_get_instance_private (self);
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, gtk_widget_get_type (), (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->priv->action_buttons = _tmp0_;
	self->priv->message_actions = NULL;
	_tmp1_ = gee_tree_set_new (DINO_UI_CONVERSATION_SUMMARY_TYPE_CONTENT_META_ITEM, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _dino_ui_conversation_summary_conversation_view_compare_content_meta_items_gcompare_data_func, NULL, NULL);
	self->priv->content_items = _tmp1_;
	g_rec_mutex_init (&self->priv->__lock_meta_items);
	_tmp2_ = gee_tree_set_new (DINO_PLUGINS_TYPE_META_CONVERSATION_ITEM, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _dino_ui_conversation_summary_conversation_view_compare_meta_items_gcompare_data_func, NULL, NULL);
	self->priv->meta_items = _tmp2_;
	_tmp3_ = gee_hash_map_new (DINO_PLUGINS_TYPE_META_CONVERSATION_ITEM, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, DINO_UI_CONVERSATION_SUMMARY_TYPE_CONVERSATION_ITEM_SKELETON, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->priv->item_item_skeletons = _tmp3_;
	_tmp4_ = gee_hash_map_new (DINO_PLUGINS_TYPE_META_CONVERSATION_ITEM, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, gtk_widget_get_type (), (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->priv->widgets = _tmp4_;
	_tmp5_ = gee_array_list_new (gtk_widget_get_type (), (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	self->priv->widget_order = (GeeList*) _tmp5_;
	g_mutex_init (&self->priv->reloading_mutex);
	self->priv->firstLoad = TRUE;
	self->priv->at_current_content = TRUE;
	self->priv->reload_messages = TRUE;
	self->priv->currently_highlighted = NULL;
	self->priv->current_meta_item = NULL;
	self->priv->last_y = (gdouble) -1;
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
dino_ui_conversation_summary_conversation_view_finalize (GObject * obj)
{
	DinoUiConversationSummaryConversationView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_UI_CONVERSATION_SUMMARY_TYPE_CONVERSATION_VIEW, DinoUiConversationSummaryConversationView);
	_g_object_unref0 (self->priv->_conversation);
	_g_object_unref0 (self->priv->action_buttons);
	_g_object_unref0 (self->priv->message_actions);
	_g_object_unref0 (self->priv->stream_interactor);
	_g_object_unref0 (self->priv->content_items);
	g_rec_mutex_clear (&self->priv->__lock_meta_items);
	_g_object_unref0 (self->priv->meta_items);
	_g_object_unref0 (self->priv->item_item_skeletons);
	_g_object_unref0 (self->priv->widgets);
	_g_object_unref0 (self->priv->widget_order);
	_g_object_unref0 (self->priv->content_populator);
	_g_object_unref0 (self->priv->subscription_notification);
	_g_free0 (self->priv->was_value);
	_g_free0 (self->priv->was_upper);
	_g_free0 (self->priv->was_page_size);
	_vala_clear_GMutex (&self->priv->reloading_mutex);
	_g_object_unref0 (self->priv->currently_highlighted);
	_g_object_unref0 (self->priv->current_meta_item);
	G_OBJECT_CLASS (dino_ui_conversation_summary_conversation_view_parent_class)->finalize (obj);
}

static GType
dino_ui_conversation_summary_conversation_view_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DinoUiConversationSummaryConversationViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dino_ui_conversation_summary_conversation_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DinoUiConversationSummaryConversationView), 0, (GInstanceInitFunc) dino_ui_conversation_summary_conversation_view_instance_init, NULL };
	static const GInterfaceInfo dino_plugins_conversation_item_collection_info = { (GInterfaceInitFunc) dino_ui_conversation_summary_conversation_view_dino_plugins_conversation_item_collection_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo dino_plugins_notification_collection_info = { (GInterfaceInitFunc) dino_ui_conversation_summary_conversation_view_dino_plugins_notification_collection_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType dino_ui_conversation_summary_conversation_view_type_id;
	dino_ui_conversation_summary_conversation_view_type_id = g_type_register_static (gtk_widget_get_type (), "DinoUiConversationSummaryConversationView", &g_define_type_info, 0);
	g_type_add_interface_static (dino_ui_conversation_summary_conversation_view_type_id, DINO_PLUGINS_TYPE_CONVERSATION_ITEM_COLLECTION, &dino_plugins_conversation_item_collection_info);
	g_type_add_interface_static (dino_ui_conversation_summary_conversation_view_type_id, DINO_PLUGINS_TYPE_NOTIFICATION_COLLECTION, &dino_plugins_notification_collection_info);
	DinoUiConversationSummaryConversationView_private_offset = g_type_add_instance_private (dino_ui_conversation_summary_conversation_view_type_id, sizeof (DinoUiConversationSummaryConversationViewPrivate));
	return dino_ui_conversation_summary_conversation_view_type_id;
}

GType
dino_ui_conversation_summary_conversation_view_get_type (void)
{
	static volatile gsize dino_ui_conversation_summary_conversation_view_type_id__once = 0;
	if (g_once_init_enter (&dino_ui_conversation_summary_conversation_view_type_id__once)) {
		GType dino_ui_conversation_summary_conversation_view_type_id;
		dino_ui_conversation_summary_conversation_view_type_id = dino_ui_conversation_summary_conversation_view_get_type_once ();
		g_once_init_leave (&dino_ui_conversation_summary_conversation_view_type_id__once, dino_ui_conversation_summary_conversation_view_type_id);
	}
	return dino_ui_conversation_summary_conversation_view_type_id__once;
}

static void
_vala_dino_ui_conversation_summary_conversation_view_get_property (GObject * object,
                                                                   guint property_id,
                                                                   GValue * value,
                                                                   GParamSpec * pspec)
{
	DinoUiConversationSummaryConversationView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DINO_UI_CONVERSATION_SUMMARY_TYPE_CONVERSATION_VIEW, DinoUiConversationSummaryConversationView);
	switch (property_id) {
		case DINO_UI_CONVERSATION_SUMMARY_CONVERSATION_VIEW_CONVERSATION_PROPERTY:
		g_value_set_object (value, dino_ui_conversation_summary_conversation_view_get_conversation (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_dino_ui_conversation_summary_conversation_view_set_property (GObject * object,
                                                                   guint property_id,
                                                                   const GValue * value,
                                                                   GParamSpec * pspec)
{
	DinoUiConversationSummaryConversationView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DINO_UI_CONVERSATION_SUMMARY_TYPE_CONVERSATION_VIEW, DinoUiConversationSummaryConversationView);
	switch (property_id) {
		case DINO_UI_CONVERSATION_SUMMARY_CONVERSATION_VIEW_CONVERSATION_PROPERTY:
		dino_ui_conversation_summary_conversation_view_set_conversation (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_clear_GMutex (GMutex * mutex)
{
	GMutex zero_mutex = { 0 };
	if (memcmp (mutex, &zero_mutex, sizeof (GMutex))) {
		g_mutex_clear (mutex);
		memset (mutex, 0, sizeof (GMutex));
	}
}

static void
_vala_clear_GRecMutex (GRecMutex * mutex)
{
	GRecMutex zero_mutex = { 0 };
	if (memcmp (mutex, &zero_mutex, sizeof (GRecMutex))) {
		g_rec_mutex_clear (mutex);
		memset (mutex, 0, sizeof (GRecMutex));
	}
}

static void
_vala_clear_GRWLock (GRWLock * mutex)
{
	GRWLock zero_mutex = { 0 };
	if (memcmp (mutex, &zero_mutex, sizeof (GRWLock))) {
		g_rw_lock_clear (mutex);
		memset (mutex, 0, sizeof (GRWLock));
	}
}

static void
_vala_clear_GCond (GCond * mutex)
{
	GCond zero_mutex = { 0 };
	if (memcmp (mutex, &zero_mutex, sizeof (GCond))) {
		g_cond_clear (mutex);
		memset (mutex, 0, sizeof (GCond));
	}
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

