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

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

#define DINO_UI_CONVERSATION_SELECTOR_ROW_AVATAR_SIZE 40
#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_TYPE_CONVERSATION_SELECTOR_ROW (dino_ui_conversation_selector_row_get_type ())
#define DINO_UI_CONVERSATION_SELECTOR_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_CONVERSATION_SELECTOR_ROW, DinoUiConversationSelectorRow))
#define DINO_UI_CONVERSATION_SELECTOR_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_CONVERSATION_SELECTOR_ROW, DinoUiConversationSelectorRowClass))
#define DINO_UI_IS_CONVERSATION_SELECTOR_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_CONVERSATION_SELECTOR_ROW))
#define DINO_UI_IS_CONVERSATION_SELECTOR_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_CONVERSATION_SELECTOR_ROW))
#define DINO_UI_CONVERSATION_SELECTOR_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_CONVERSATION_SELECTOR_ROW, DinoUiConversationSelectorRowClass))

typedef struct _DinoUiConversationSelectorRow DinoUiConversationSelectorRow;
typedef struct _DinoUiConversationSelectorRowClass DinoUiConversationSelectorRowClass;
typedef struct _DinoUiConversationSelectorRowPrivate DinoUiConversationSelectorRowPrivate;

#define DINO_UI_TYPE_AVATAR_PICTURE (dino_ui_avatar_picture_get_type ())
#define DINO_UI_AVATAR_PICTURE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_AVATAR_PICTURE, DinoUiAvatarPicture))
#define DINO_UI_AVATAR_PICTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_AVATAR_PICTURE, DinoUiAvatarPictureClass))
#define DINO_UI_IS_AVATAR_PICTURE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_AVATAR_PICTURE))
#define DINO_UI_IS_AVATAR_PICTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_AVATAR_PICTURE))
#define DINO_UI_AVATAR_PICTURE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_AVATAR_PICTURE, DinoUiAvatarPictureClass))

typedef struct _DinoUiAvatarPicture DinoUiAvatarPicture;
typedef struct _DinoUiAvatarPictureClass DinoUiAvatarPictureClass;
enum  {
	DINO_UI_CONVERSATION_SELECTOR_ROW_0_PROPERTY,
	DINO_UI_CONVERSATION_SELECTOR_ROW_CONVERSATION_PROPERTY,
	DINO_UI_CONVERSATION_SELECTOR_ROW_NUM_PROPERTIES
};
static GParamSpec* dino_ui_conversation_selector_row_properties[DINO_UI_CONVERSATION_SELECTOR_ROW_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block51Data Block51Data;
#define _xmpp_jid_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_jid_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL (dino_ui_view_model_avatar_picture_model_get_type ())
#define DINO_UI_VIEW_MODEL_AVATAR_PICTURE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL, DinoUiViewModelAvatarPictureModel))
#define DINO_UI_VIEW_MODEL_AVATAR_PICTURE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL, DinoUiViewModelAvatarPictureModelClass))
#define DINO_UI_VIEW_MODEL_IS_AVATAR_PICTURE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL))
#define DINO_UI_VIEW_MODEL_IS_AVATAR_PICTURE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL))
#define DINO_UI_VIEW_MODEL_AVATAR_PICTURE_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL, DinoUiViewModelAvatarPictureModelClass))

typedef struct _DinoUiViewModelAvatarPictureModel DinoUiViewModelAvatarPictureModel;
typedef struct _DinoUiViewModelAvatarPictureModelClass DinoUiViewModelAvatarPictureModelClass;

#define DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL (dino_ui_view_model_compat_avatar_picture_model_get_type ())
#define DINO_UI_VIEW_MODEL_COMPAT_AVATAR_PICTURE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL, DinoUiViewModelCompatAvatarPictureModel))
#define DINO_UI_VIEW_MODEL_COMPAT_AVATAR_PICTURE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL, DinoUiViewModelCompatAvatarPictureModelClass))
#define DINO_UI_VIEW_MODEL_IS_COMPAT_AVATAR_PICTURE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL))
#define DINO_UI_VIEW_MODEL_IS_COMPAT_AVATAR_PICTURE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL))
#define DINO_UI_VIEW_MODEL_COMPAT_AVATAR_PICTURE_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL, DinoUiViewModelCompatAvatarPictureModelClass))

typedef struct _DinoUiViewModelCompatAvatarPictureModel DinoUiViewModelCompatAvatarPictureModel;
typedef struct _DinoUiViewModelCompatAvatarPictureModelClass DinoUiViewModelCompatAvatarPictureModelClass;
typedef struct _Block52Data Block52Data;
typedef struct _DinoUiConversationSelectorRowColapseData DinoUiConversationSelectorRowColapseData;
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))
#define _pango_attr_list_unref0(var) ((var == NULL) ? NULL : (var = (pango_attr_list_unref (var), NULL)))
#define _pango_attribute_destroy0(var) ((var == NULL) ? NULL : (var = (pango_attribute_destroy (var), NULL)))
typedef struct _Block53Data Block53Data;
typedef struct _Block54Data Block54Data;
#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))
#define _xmpp_xep_service_discovery_identity_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_xep_service_discovery_identity_unref (var), NULL)))

struct _DinoUiConversationSelectorRow {
	GtkListBoxRow parent_instance;
	DinoUiConversationSelectorRowPrivate * priv;
	DinoUiAvatarPicture* picture;
	GtkLabel* name_label;
	GtkLabel* time_label;
	GtkLabel* nick_label;
	GtkLabel* message_label;
	GtkLabel* unread_count_label;
	GtkImage* pinned_image;
	GtkRevealer* main_revealer;
	DinoContentItem* last_content_item;
	gint num_unread;
	DinoStreamInteractor* stream_interactor;
};

struct _DinoUiConversationSelectorRowClass {
	GtkListBoxRowClass parent_class;
};

struct _DinoUiConversationSelectorRowPrivate {
	DinoEntitiesConversation* _conversation;
	gboolean update_read_pending;
	gboolean update_read_pending_force;
};

struct _Block51Data {
	int _ref_count_;
	DinoUiConversationSelectorRow* self;
	DinoEntitiesConversation* conversation;
};

struct _Block52Data {
	int _ref_count_;
	DinoUiConversationSelectorRow* self;
	gpointer _async_data_;
};

struct _DinoUiConversationSelectorRowColapseData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DinoUiConversationSelectorRow* self;
	Block52Data* _data52_;
	GtkRevealer* _tmp0_;
	GtkRevealer* _tmp1_;
	GtkRevealer* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	GtkRevealer* _tmp5_;
};

struct _Block53Data {
	int _ref_count_;
	DinoUiConversationSelectorRow* self;
	GtkGrid* grid;
};

struct _Block54Data {
	int _ref_count_;
	Block53Data * _data53_;
	XmppJid* full_jid;
	gchar* show;
	gint i_cache;
};

static gint DinoUiConversationSelectorRow_private_offset;
static gpointer dino_ui_conversation_selector_row_parent_class = NULL;
static GRegex* dino_ui_conversation_selector_row_dino_resource_regex;
static GRegex* dino_ui_conversation_selector_row_dino_resource_regex = NULL;

VALA_EXTERN GType dino_ui_conversation_selector_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiConversationSelectorRow, g_object_unref)
VALA_EXTERN GType dino_ui_avatar_picture_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiAvatarPicture, g_object_unref)
VALA_EXTERN DinoUiConversationSelectorRow* dino_ui_conversation_selector_row_new (DinoStreamInteractor* stream_interactor,
                                                                      DinoEntitiesConversation* conversation);
VALA_EXTERN DinoUiConversationSelectorRow* dino_ui_conversation_selector_row_construct (GType object_type,
                                                                            DinoStreamInteractor* stream_interactor,
                                                                            DinoEntitiesConversation* conversation);
static Block51Data* block51_data_ref (Block51Data* _data51_);
static void block51_data_unref (void * _userdata_);
static void dino_ui_conversation_selector_row_set_conversation (DinoUiConversationSelectorRow* self,
                                                         DinoEntitiesConversation* value);
static void ___lambda135_ (Block51Data* _data51_,
                    DinoEntitiesAccount* account,
                    XmppJid* jid,
                    XmppRosterItem* roster_item);
VALA_EXTERN void dino_ui_conversation_selector_row_update_name_label (DinoUiConversationSelectorRow* self);
static void ____lambda135__dino_roster_manager_updated_roster_item (DinoRosterManager* _sender,
                                                             DinoEntitiesAccount* account,
                                                             XmppJid* jid,
                                                             XmppRosterItem* roster_item,
                                                             gpointer self);
static void ___lambda136_ (Block51Data* _data51_,
                    DinoEntitiesAccount* account,
                    XmppJid* jid);
VALA_EXTERN void dino_ui_conversation_selector_row_update_read (DinoUiConversationSelectorRow* self,
                                                    gboolean force_update);
static void ____lambda136__dino_muc_manager_room_info_updated (DinoMucManager* _sender,
                                                        DinoEntitiesAccount* account,
                                                        XmppJid* muc_jid,
                                                        gpointer self);
static void ___lambda138_ (Block51Data* _data51_,
                    DinoEntitiesAccount* account,
                    XmppJid* room,
                    XmppJid* occupant);
static void ____lambda138__dino_muc_manager_private_room_occupant_updated (DinoMucManager* _sender,
                                                                    DinoEntitiesAccount* account,
                                                                    XmppJid* room,
                                                                    XmppJid* occupant,
                                                                    gpointer self);
VALA_EXTERN gboolean dino_ui_util_use_tooltips (void);
static gboolean ___lambda139_ (DinoUiConversationSelectorRow* self,
                        gint x,
                        gint y,
                        gboolean keyboard_tooltip,
                        GtkTooltip* tooltip);
VALA_EXTERN GtkWidget* dino_ui_util_widget_if_tooltips_active (GtkWidget* w);
static GtkWidget* dino_ui_conversation_selector_row_generate_tooltip (DinoUiConversationSelectorRow* self);
static gboolean ____lambda139__gtk_widget_query_tooltip (GtkWidget* _sender,
                                                  gint x,
                                                  gint y,
                                                  gboolean keyboard_tooltip,
                                                  GtkTooltip* tooltip,
                                                  gpointer self);
VALA_EXTERN gchar* dino_ui_util_string_if_tooltips_active (const gchar* s);
static void __lambda141_ (Block51Data* _data51_,
                   DinoContentItem* item,
                   DinoEntitiesConversation* c);
VALA_EXTERN void dino_ui_conversation_selector_row_content_item_received (DinoUiConversationSelectorRow* self,
                                                              DinoContentItem* ci);
static void ___lambda141__dino_content_item_store_new_item (DinoContentItemStore* _sender,
                                                     DinoContentItem* item,
                                                     DinoEntitiesConversation* conversation,
                                                     gpointer self);
static void __lambda142_ (DinoUiConversationSelectorRow* self,
                   DinoContentItem* item);
static void ___lambda142__dino_message_correction_received_correction (DinoMessageCorrection* _sender,
                                                                DinoContentItem* content_item,
                                                                gpointer self);
VALA_EXTERN DinoUiViewModelCompatAvatarPictureModel* dino_ui_view_model_compat_avatar_picture_model_new (DinoStreamInteractor* stream_interactor);
VALA_EXTERN DinoUiViewModelCompatAvatarPictureModel* dino_ui_view_model_compat_avatar_picture_model_construct (GType object_type,
                                                                                                   DinoStreamInteractor* stream_interactor);
VALA_EXTERN GType dino_ui_view_model_avatar_picture_model_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiViewModelAvatarPictureModel, g_object_unref)
VALA_EXTERN GType dino_ui_view_model_compat_avatar_picture_model_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiViewModelCompatAvatarPictureModel, g_object_unref)
VALA_EXTERN DinoUiViewModelCompatAvatarPictureModel* dino_ui_view_model_compat_avatar_picture_model_set_conversation (DinoUiViewModelCompatAvatarPictureModel* self,
                                                                                                          DinoEntitiesConversation* conversation);
VALA_EXTERN void dino_ui_avatar_picture_set_model (DinoUiAvatarPicture* self,
                                       DinoUiViewModelAvatarPictureModel* value);
static void __lambda143_ (DinoUiConversationSelectorRow* self);
static void ___lambda143__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
static void __lambda144_ (DinoUiConversationSelectorRow* self);
static void dino_ui_conversation_selector_row_update_pinned_icon (DinoUiConversationSelectorRow* self);
static void ___lambda144__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
VALA_EXTERN void dino_ui_conversation_selector_row_update (DinoUiConversationSelectorRow* self);
VALA_EXTERN void dino_ui_conversation_selector_row_update_time_label (DinoUiConversationSelectorRow* self,
                                                          GDateTime* new_time);
VALA_EXTERN DinoEntitiesConversation* dino_ui_conversation_selector_row_get_conversation (DinoUiConversationSelectorRow* self);
VALA_EXTERN void dino_ui_conversation_selector_row_update_message_label (DinoUiConversationSelectorRow* self);
static void dino_ui_conversation_selector_row_colapse_data_free (gpointer _data);
VALA_EXTERN void dino_ui_conversation_selector_row_colapse (DinoUiConversationSelectorRow* self,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_);
VALA_EXTERN void dino_ui_conversation_selector_row_colapse_finish (DinoUiConversationSelectorRow* self,
                                                       GAsyncResult* _res_);
static gboolean dino_ui_conversation_selector_row_colapse_co (DinoUiConversationSelectorRowColapseData* _data_);
static Block52Data* block52_data_ref (Block52Data* _data52_);
static void block52_data_unref (void * _userdata_);
static void ___lambda145_ (Block52Data* _data52_);
static gboolean _dino_ui_conversation_selector_row_colapse_co_gsource_func (gpointer self);
static void ____lambda145__g_object_notify (GObject* _sender,
                                     GParamSpec* pspec,
                                     gpointer self);
VALA_EXTERN gchar* dino_ui_util_get_conversation_display_name (DinoStreamInteractor* stream_interactor,
                                                   DinoEntitiesConversation* conversation);
static gchar* dino_ui_conversation_selector_row_get_relative_time (GDateTime* datetime);
VALA_EXTERN gchar* dino_ui_util_get_participant_display_name (DinoStreamInteractor* stream_interactor,
                                                  DinoEntitiesConversation* conversation,
                                                  XmppJid* participant,
                                                  gboolean me_is_me);
static void dino_ui_conversation_selector_row_change_label_attribute (GtkLabel* label,
                                                               PangoAttribute* attribute);
VALA_EXTERN gchar* dino_ui_util_summarize_whitespaces_to_space (const gchar* s);
static gboolean __lambda137_ (DinoUiConversationSelectorRow* self);
static void dino_ui_conversation_selector_row_update_read_idle (DinoUiConversationSelectorRow* self,
                                                         gboolean force_update);
static gboolean ___lambda137__gsource_func (gpointer self);
static Block53Data* block53_data_ref (Block53Data* _data53_);
static void block53_data_unref (void * _userdata_);
static Block54Data* block54_data_ref (Block54Data* _data54_);
static void block54_data_unref (void * _userdata_);
static void _____lambda140_ (Block54Data* _data54_,
                      GObject* _,
                      GAsyncResult* res);
VALA_EXTERN GtkCssProvider* dino_ui_util_force_color (GtkWidget* widget,
                                          const gchar* color,
                                          const gchar* selector);
static void ______lambda140__gasync_ready_callback (GObject* source_object,
                                             GAsyncResult* res,
                                             gpointer self);
VALA_EXTERN gboolean dino_ui_util_is_24h_format (void);
static GObject * dino_ui_conversation_selector_row_constructor (GType type,
                                                         guint n_construct_properties,
                                                         GObjectConstructParam * construct_properties);
static void dino_ui_conversation_selector_row_finalize (GObject * obj);
static GType dino_ui_conversation_selector_row_get_type_once (void);
static void _vala_dino_ui_conversation_selector_row_get_property (GObject * object,
                                                           guint property_id,
                                                           GValue * value,
                                                           GParamSpec * pspec);
static void _vala_dino_ui_conversation_selector_row_set_property (GObject * object,
                                                           guint property_id,
                                                           const GValue * value,
                                                           GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static GRegex* _tmp_regex_0 = NULL;

static inline gpointer
dino_ui_conversation_selector_row_get_instance_private (DinoUiConversationSelectorRow* self)
{
	return G_STRUCT_MEMBER_P (self, DinoUiConversationSelectorRow_private_offset);
}

static inline GRegex*
_thread_safe_regex_init (GRegex** re,
                         const gchar * pattern,
                         GRegexCompileFlags compile_flags)
{
	if (g_once_init_enter ((volatile gsize*) re)) {
		GRegex* val = g_regex_new (pattern, compile_flags, 0, NULL);
		g_once_init_leave ((volatile gsize*) re, (gsize) val);
	}
	return *re;
}

static gpointer
_g_regex_ref0 (gpointer self)
{
	return self ? g_regex_ref (self) : NULL;
}

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

static Block51Data*
block51_data_ref (Block51Data* _data51_)
{
	g_atomic_int_inc (&_data51_->_ref_count_);
	return _data51_;
}

static void
block51_data_unref (void * _userdata_)
{
	Block51Data* _data51_;
	_data51_ = (Block51Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data51_->_ref_count_)) {
		DinoUiConversationSelectorRow* self;
		self = _data51_->self;
		_g_object_unref0 (_data51_->conversation);
		_g_object_unref0 (self);
		g_slice_free (Block51Data, _data51_);
	}
}

static void
___lambda135_ (Block51Data* _data51_,
               DinoEntitiesAccount* account,
               XmppJid* jid,
               XmppRosterItem* roster_item)
{
	DinoUiConversationSelectorRow* self;
	gboolean _tmp0_ = FALSE;
	DinoEntitiesAccount* _tmp1_;
	DinoEntitiesAccount* _tmp2_;
	self = _data51_->self;
	g_return_if_fail (account != NULL);
	g_return_if_fail (jid != NULL);
	g_return_if_fail (roster_item != NULL);
	_tmp1_ = dino_entities_conversation_get_account (_data51_->conversation);
	_tmp2_ = _tmp1_;
	if (dino_entities_account_equals (_tmp2_, account)) {
		XmppJid* _tmp3_;
		XmppJid* _tmp4_;
		_tmp3_ = dino_entities_conversation_get_counterpart (_data51_->conversation);
		_tmp4_ = _tmp3_;
		_tmp0_ = xmpp_jid_equals (_tmp4_, jid);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		dino_ui_conversation_selector_row_update_name_label (self);
	}
}

static void
____lambda135__dino_roster_manager_updated_roster_item (DinoRosterManager* _sender,
                                                        DinoEntitiesAccount* account,
                                                        XmppJid* jid,
                                                        XmppRosterItem* roster_item,
                                                        gpointer self)
{
	___lambda135_ (self, account, jid, roster_item);
}

static void
___lambda136_ (Block51Data* _data51_,
               DinoEntitiesAccount* account,
               XmppJid* jid)
{
	DinoUiConversationSelectorRow* self;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	self = _data51_->self;
	g_return_if_fail (account != NULL);
	g_return_if_fail (jid != NULL);
	if (_data51_->conversation != NULL) {
		XmppJid* _tmp2_;
		XmppJid* _tmp3_;
		_tmp2_ = dino_entities_conversation_get_counterpart (_data51_->conversation);
		_tmp3_ = _tmp2_;
		_tmp1_ = xmpp_jid_equals_bare (_tmp3_, jid);
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		DinoEntitiesAccount* _tmp4_;
		DinoEntitiesAccount* _tmp5_;
		_tmp4_ = dino_entities_conversation_get_account (_data51_->conversation);
		_tmp5_ = _tmp4_;
		_tmp0_ = dino_entities_account_equals (_tmp5_, account);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		dino_ui_conversation_selector_row_update_name_label (self);
		dino_ui_conversation_selector_row_update_read (self, TRUE);
	}
}

static void
____lambda136__dino_muc_manager_room_info_updated (DinoMucManager* _sender,
                                                   DinoEntitiesAccount* account,
                                                   XmppJid* muc_jid,
                                                   gpointer self)
{
	___lambda136_ (self, account, muc_jid);
}

static void
___lambda138_ (Block51Data* _data51_,
               DinoEntitiesAccount* account,
               XmppJid* room,
               XmppJid* occupant)
{
	DinoUiConversationSelectorRow* self;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	self = _data51_->self;
	g_return_if_fail (account != NULL);
	g_return_if_fail (room != NULL);
	g_return_if_fail (occupant != NULL);
	if (_data51_->conversation != NULL) {
		XmppJid* _tmp2_;
		XmppJid* _tmp3_;
		XmppJid* _tmp4_;
		XmppJid* _tmp5_;
		XmppJid* _tmp6_;
		_tmp2_ = dino_entities_conversation_get_counterpart (_data51_->conversation);
		_tmp3_ = _tmp2_;
		_tmp4_ = xmpp_jid_get_bare_jid (room);
		_tmp5_ = _tmp4_;
		_tmp6_ = _tmp5_;
		_tmp1_ = xmpp_jid_equals_bare (_tmp3_, _tmp6_);
		_xmpp_jid_unref0 (_tmp6_);
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		DinoEntitiesAccount* _tmp7_;
		DinoEntitiesAccount* _tmp8_;
		_tmp7_ = dino_entities_conversation_get_account (_data51_->conversation);
		_tmp8_ = _tmp7_;
		_tmp0_ = dino_entities_account_equals (_tmp8_, account);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		dino_ui_conversation_selector_row_update_name_label (self);
	}
}

static void
____lambda138__dino_muc_manager_private_room_occupant_updated (DinoMucManager* _sender,
                                                               DinoEntitiesAccount* account,
                                                               XmppJid* room,
                                                               XmppJid* occupant,
                                                               gpointer self)
{
	___lambda138_ (self, account, room, occupant);
}

static gboolean
___lambda139_ (DinoUiConversationSelectorRow* self,
               gint x,
               gint y,
               gboolean keyboard_tooltip,
               GtkTooltip* tooltip)
{
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	GtkWidget* _tmp3_;
	gboolean result;
	g_return_val_if_fail (tooltip != NULL, FALSE);
	_tmp0_ = dino_ui_conversation_selector_row_generate_tooltip (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = dino_ui_util_widget_if_tooltips_active (_tmp1_);
	_tmp3_ = _tmp2_;
	gtk_tooltip_set_custom (tooltip, _tmp3_);
	_g_object_unref0 (_tmp3_);
	_g_object_unref0 (_tmp1_);
	result = TRUE;
	return result;
}

static gboolean
____lambda139__gtk_widget_query_tooltip (GtkWidget* _sender,
                                         gint x,
                                         gint y,
                                         gboolean keyboard_tooltip,
                                         GtkTooltip* tooltip,
                                         gpointer self)
{
	gboolean result;
	result = ___lambda139_ ((DinoUiConversationSelectorRow*) self, x, y, keyboard_tooltip, tooltip);
	return result;
}

static void
__lambda141_ (Block51Data* _data51_,
              DinoContentItem* item,
              DinoEntitiesConversation* c)
{
	DinoUiConversationSelectorRow* self;
	self = _data51_->self;
	g_return_if_fail (item != NULL);
	g_return_if_fail (c != NULL);
	if (dino_entities_conversation_equals (_data51_->conversation, c)) {
		dino_ui_conversation_selector_row_content_item_received (self, item);
	}
}

static void
___lambda141__dino_content_item_store_new_item (DinoContentItemStore* _sender,
                                                DinoContentItem* item,
                                                DinoEntitiesConversation* conversation,
                                                gpointer self)
{
	__lambda141_ (self, item, conversation);
}

static void
__lambda142_ (DinoUiConversationSelectorRow* self,
              DinoContentItem* item)
{
	gboolean _tmp0_ = FALSE;
	DinoContentItem* _tmp1_;
	g_return_if_fail (item != NULL);
	_tmp1_ = self->last_content_item;
	if (_tmp1_ != NULL) {
		DinoContentItem* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		gint _tmp6_;
		_tmp2_ = self->last_content_item;
		_tmp3_ = dino_content_item_get_id (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp5_ = dino_content_item_get_id (item);
		_tmp6_ = _tmp5_;
		_tmp0_ = _tmp4_ == _tmp6_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		dino_ui_conversation_selector_row_content_item_received (self, item);
	}
}

static void
___lambda142__dino_message_correction_received_correction (DinoMessageCorrection* _sender,
                                                           DinoContentItem* content_item,
                                                           gpointer self)
{
	__lambda142_ ((DinoUiConversationSelectorRow*) self, content_item);
}

static void
__lambda143_ (DinoUiConversationSelectorRow* self)
{
	dino_ui_conversation_selector_row_update_read (self, FALSE);
}

static void
___lambda143__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	__lambda143_ ((DinoUiConversationSelectorRow*) self);
}

static void
__lambda144_ (DinoUiConversationSelectorRow* self)
{
	dino_ui_conversation_selector_row_update_pinned_icon (self);
}

static void
___lambda144__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	__lambda144_ ((DinoUiConversationSelectorRow*) self);
}

DinoUiConversationSelectorRow*
dino_ui_conversation_selector_row_construct (GType object_type,
                                             DinoStreamInteractor* stream_interactor,
                                             DinoEntitiesConversation* conversation)
{
	DinoUiConversationSelectorRow * self = NULL;
	Block51Data* _data51_;
	DinoEntitiesConversation* _tmp0_;
	DinoStreamInteractor* _tmp1_;
	DinoEntitiesConversationType _tmp2_;
	DinoEntitiesConversationType _tmp3_;
	DinoEntitiesConversationType _tmp13_;
	DinoEntitiesConversationType _tmp14_;
	DinoModuleIdentity* _tmp24_;
	gpointer _tmp25_;
	DinoContentItemStore* _tmp26_;
	DinoModuleIdentity* _tmp27_;
	gpointer _tmp28_;
	DinoMessageCorrection* _tmp29_;
	DinoModuleIdentity* _tmp30_;
	gpointer _tmp31_;
	DinoContentItemStore* _tmp32_;
	DinoContentItem* _tmp33_;
	DinoUiAvatarPicture* _tmp34_;
	DinoUiViewModelCompatAvatarPictureModel* _tmp35_;
	DinoUiViewModelCompatAvatarPictureModel* _tmp36_;
	DinoUiViewModelCompatAvatarPictureModel* _tmp37_;
	DinoUiViewModelCompatAvatarPictureModel* _tmp38_;
	g_return_val_if_fail (stream_interactor != NULL, NULL);
	g_return_val_if_fail (conversation != NULL, NULL);
	_data51_ = g_slice_new0 (Block51Data);
	_data51_->_ref_count_ = 1;
	_tmp0_ = _g_object_ref0 (conversation);
	_g_object_unref0 (_data51_->conversation);
	_data51_->conversation = _tmp0_;
	self = (DinoUiConversationSelectorRow*) g_object_new (object_type, NULL);
	_data51_->self = g_object_ref (self);
	dino_ui_conversation_selector_row_set_conversation (self, _data51_->conversation);
	_tmp1_ = _g_object_ref0 (stream_interactor);
	_g_object_unref0 (self->stream_interactor);
	self->stream_interactor = _tmp1_;
	_tmp2_ = dino_entities_conversation_get_type_ (_data51_->conversation);
	_tmp3_ = _tmp2_;
	switch (_tmp3_) {
		case DINO_ENTITIES_CONVERSATION_TYPE_CHAT:
		{
			DinoModuleIdentity* _tmp4_;
			gpointer _tmp5_;
			DinoRosterManager* _tmp6_;
			_tmp4_ = dino_roster_manager_IDENTITY;
			_tmp5_ = dino_stream_interactor_get_module (stream_interactor, DINO_TYPE_ROSTER_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp4_);
			_tmp6_ = (DinoRosterManager*) _tmp5_;
			g_signal_connect_data (_tmp6_, "updated-roster-item", (GCallback) ____lambda135__dino_roster_manager_updated_roster_item, block51_data_ref (_data51_), (GClosureNotify) block51_data_unref, 0);
			_g_object_unref0 (_tmp6_);
			break;
		}
		case DINO_ENTITIES_CONVERSATION_TYPE_GROUPCHAT:
		{
			DinoModuleIdentity* _tmp7_;
			gpointer _tmp8_;
			DinoMucManager* _tmp9_;
			DinoModuleIdentity* _tmp10_;
			gpointer _tmp11_;
			DinoMucManager* _tmp12_;
			_tmp7_ = dino_muc_manager_IDENTITY;
			_tmp8_ = dino_stream_interactor_get_module (stream_interactor, DINO_TYPE_MUC_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp7_);
			_tmp9_ = (DinoMucManager*) _tmp8_;
			g_signal_connect_data (_tmp9_, "room-info-updated", (GCallback) ____lambda136__dino_muc_manager_room_info_updated, block51_data_ref (_data51_), (GClosureNotify) block51_data_unref, 0);
			_g_object_unref0 (_tmp9_);
			_tmp10_ = dino_muc_manager_IDENTITY;
			_tmp11_ = dino_stream_interactor_get_module (stream_interactor, DINO_TYPE_MUC_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp10_);
			_tmp12_ = (DinoMucManager*) _tmp11_;
			g_signal_connect_data (_tmp12_, "private-room-occupant-updated", (GCallback) ____lambda138__dino_muc_manager_private_room_occupant_updated, block51_data_ref (_data51_), (GClosureNotify) block51_data_unref, 0);
			_g_object_unref0 (_tmp12_);
			break;
		}
		case DINO_ENTITIES_CONVERSATION_TYPE_GROUPCHAT_PM:
		{
			break;
		}
		default:
		break;
	}
	_tmp13_ = dino_entities_conversation_get_type_ (_data51_->conversation);
	_tmp14_ = _tmp13_;
	switch (_tmp14_) {
		case DINO_ENTITIES_CONVERSATION_TYPE_CHAT:
		{
			gtk_widget_set_has_tooltip ((GtkWidget*) self, dino_ui_util_use_tooltips ());
			g_signal_connect_object ((GtkWidget*) self, "query-tooltip", (GCallback) ____lambda139__gtk_widget_query_tooltip, self, 0);
			break;
		}
		case DINO_ENTITIES_CONVERSATION_TYPE_GROUPCHAT:
		{
			XmppJid* _tmp15_;
			XmppJid* _tmp16_;
			XmppJid* _tmp17_;
			XmppJid* _tmp18_;
			XmppJid* _tmp19_;
			gchar* _tmp20_;
			gchar* _tmp21_;
			gchar* _tmp22_;
			gchar* _tmp23_;
			gtk_widget_set_has_tooltip ((GtkWidget*) self, dino_ui_util_use_tooltips ());
			_tmp15_ = dino_entities_conversation_get_counterpart (_data51_->conversation);
			_tmp16_ = _tmp15_;
			_tmp17_ = xmpp_jid_get_bare_jid (_tmp16_);
			_tmp18_ = _tmp17_;
			_tmp19_ = _tmp18_;
			_tmp20_ = xmpp_jid_to_string (_tmp19_);
			_tmp21_ = _tmp20_;
			_tmp22_ = dino_ui_util_string_if_tooltips_active (_tmp21_);
			_tmp23_ = _tmp22_;
			gtk_widget_set_tooltip_text ((GtkWidget*) self, _tmp23_);
			_g_free0 (_tmp23_);
			_g_free0 (_tmp21_);
			_xmpp_jid_unref0 (_tmp19_);
			break;
		}
		case DINO_ENTITIES_CONVERSATION_TYPE_GROUPCHAT_PM:
		{
			break;
		}
		default:
		break;
	}
	_tmp24_ = dino_content_item_store_IDENTITY;
	_tmp25_ = dino_stream_interactor_get_module (stream_interactor, DINO_TYPE_CONTENT_ITEM_STORE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp24_);
	_tmp26_ = (DinoContentItemStore*) _tmp25_;
	g_signal_connect_data (_tmp26_, "new-item", (GCallback) ___lambda141__dino_content_item_store_new_item, block51_data_ref (_data51_), (GClosureNotify) block51_data_unref, 0);
	_g_object_unref0 (_tmp26_);
	_tmp27_ = dino_message_correction_IDENTITY;
	_tmp28_ = dino_stream_interactor_get_module (stream_interactor, DINO_TYPE_MESSAGE_CORRECTION, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp27_);
	_tmp29_ = (DinoMessageCorrection*) _tmp28_;
	g_signal_connect_object (_tmp29_, "received-correction", (GCallback) ___lambda142__dino_message_correction_received_correction, self, 0);
	_g_object_unref0 (_tmp29_);
	_tmp30_ = dino_content_item_store_IDENTITY;
	_tmp31_ = dino_stream_interactor_get_module (stream_interactor, DINO_TYPE_CONTENT_ITEM_STORE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp30_);
	_tmp32_ = (DinoContentItemStore*) _tmp31_;
	_tmp33_ = dino_content_item_store_get_latest (_tmp32_, _data51_->conversation);
	_g_object_unref0 (self->last_content_item);
	self->last_content_item = _tmp33_;
	_g_object_unref0 (_tmp32_);
	_tmp34_ = self->picture;
	_tmp35_ = dino_ui_view_model_compat_avatar_picture_model_new (stream_interactor);
	_tmp36_ = _tmp35_;
	_tmp37_ = dino_ui_view_model_compat_avatar_picture_model_set_conversation (_tmp36_, _data51_->conversation);
	_tmp38_ = _tmp37_;
	dino_ui_avatar_picture_set_model (_tmp34_, (DinoUiViewModelAvatarPictureModel*) _tmp38_);
	_g_object_unref0 (_tmp38_);
	_g_object_unref0 (_tmp36_);
	g_signal_connect_object ((GObject*) _data51_->conversation, "notify::read-up-to-item", (GCallback) ___lambda143__g_object_notify, self, 0);
	g_signal_connect_object ((GObject*) _data51_->conversation, "notify::pinned", (GCallback) ___lambda144__g_object_notify, self, 0);
	dino_ui_conversation_selector_row_update_name_label (self);
	dino_ui_conversation_selector_row_update_pinned_icon (self);
	dino_ui_conversation_selector_row_content_item_received (self, NULL);
	block51_data_unref (_data51_);
	_data51_ = NULL;
	return self;
}

DinoUiConversationSelectorRow*
dino_ui_conversation_selector_row_new (DinoStreamInteractor* stream_interactor,
                                       DinoEntitiesConversation* conversation)
{
	return dino_ui_conversation_selector_row_construct (DINO_UI_TYPE_CONVERSATION_SELECTOR_ROW, stream_interactor, conversation);
}

void
dino_ui_conversation_selector_row_update (DinoUiConversationSelectorRow* self)
{
	g_return_if_fail (self != NULL);
	dino_ui_conversation_selector_row_update_time_label (self, NULL);
}

void
dino_ui_conversation_selector_row_content_item_received (DinoUiConversationSelectorRow* self,
                                                         DinoContentItem* ci)
{
	DinoContentItem* _tmp0_ = NULL;
	DinoStreamInteractor* _tmp1_;
	DinoModuleIdentity* _tmp2_;
	gpointer _tmp3_;
	DinoContentItemStore* _tmp4_;
	DinoEntitiesConversation* _tmp5_;
	DinoContentItem* _tmp6_;
	DinoContentItem* _tmp7_;
	DinoContentItem* _tmp9_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->stream_interactor;
	_tmp2_ = dino_content_item_store_IDENTITY;
	_tmp3_ = dino_stream_interactor_get_module (_tmp1_, DINO_TYPE_CONTENT_ITEM_STORE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp2_);
	_tmp4_ = (DinoContentItemStore*) _tmp3_;
	_tmp5_ = self->priv->_conversation;
	_tmp6_ = dino_content_item_store_get_latest (_tmp4_, _tmp5_);
	_tmp7_ = _tmp6_;
	_g_object_unref0 (_tmp4_);
	_tmp0_ = _tmp7_;
	if (_tmp0_ == NULL) {
		DinoContentItem* _tmp8_;
		_tmp8_ = _g_object_ref0 (ci);
		_g_object_unref0 (_tmp0_);
		_tmp0_ = _tmp8_;
	}
	_tmp9_ = _tmp0_;
	_tmp0_ = NULL;
	_g_object_unref0 (self->last_content_item);
	self->last_content_item = _tmp9_;
	dino_ui_conversation_selector_row_update_message_label (self);
	dino_ui_conversation_selector_row_update_time_label (self, NULL);
	dino_ui_conversation_selector_row_update_read (self, FALSE);
	_g_object_unref0 (_tmp0_);
}

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

void
dino_ui_conversation_selector_row_colapse (DinoUiConversationSelectorRow* self,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_)
{
	DinoUiConversationSelectorRowColapseData* _data_;
	DinoUiConversationSelectorRow* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (DinoUiConversationSelectorRowColapseData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, dino_ui_conversation_selector_row_colapse_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	dino_ui_conversation_selector_row_colapse_co (_data_);
}

void
dino_ui_conversation_selector_row_colapse_finish (DinoUiConversationSelectorRow* self,
                                                  GAsyncResult* _res_)
{
	DinoUiConversationSelectorRowColapseData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static Block52Data*
block52_data_ref (Block52Data* _data52_)
{
	g_atomic_int_inc (&_data52_->_ref_count_);
	return _data52_;
}

static void
block52_data_unref (void * _userdata_)
{
	Block52Data* _data52_;
	_data52_ = (Block52Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data52_->_ref_count_)) {
		DinoUiConversationSelectorRow* self;
		self = _data52_->self;
		_g_object_unref0 (self);
		g_slice_free (Block52Data, _data52_);
	}
}

static gboolean
_dino_ui_conversation_selector_row_colapse_co_gsource_func (gpointer self)
{
	gboolean result;
	result = dino_ui_conversation_selector_row_colapse_co (self);
	return result;
}

static void
___lambda145_ (Block52Data* _data52_)
{
	DinoUiConversationSelectorRow* self;
	self = _data52_->self;
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _dino_ui_conversation_selector_row_colapse_co_gsource_func, _data52_->_async_data_, NULL);
}

static void
____lambda145__g_object_notify (GObject* _sender,
                                GParamSpec* pspec,
                                gpointer self)
{
	___lambda145_ (self);
}

static gboolean
dino_ui_conversation_selector_row_colapse_co (DinoUiConversationSelectorRowColapseData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data52_ = g_slice_new0 (Block52Data);
	_data_->_data52_->_ref_count_ = 1;
	_data_->_data52_->self = g_object_ref (_data_->self);
	_data_->_data52_->_async_data_ = _data_;
	_data_->_tmp0_ = _data_->self->main_revealer;
	gtk_revealer_set_transition_type (_data_->_tmp0_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP);
	_data_->_tmp1_ = _data_->self->main_revealer;
	gtk_revealer_set_reveal_child (_data_->_tmp1_, FALSE);
	_data_->_tmp2_ = _data_->self->main_revealer;
	_data_->_tmp3_ = gtk_revealer_get_child_revealed (_data_->_tmp2_);
	_data_->_tmp4_ = _data_->_tmp3_;
	if (_data_->_tmp4_) {
		_data_->_tmp5_ = _data_->self->main_revealer;
		g_signal_connect_data ((GObject*) _data_->_tmp5_, "notify::child-revealed", (GCallback) ____lambda145__g_object_notify, block52_data_ref (_data_->_data52_), (GClosureNotify) block52_data_unref, 0);
		_data_->_state_ = 1;
		return FALSE;
		_state_1:
		;
	}
	block52_data_unref (_data_->_data52_);
	_data_->_data52_ = NULL;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

void
dino_ui_conversation_selector_row_update_name_label (DinoUiConversationSelectorRow* self)
{
	GtkLabel* _tmp0_;
	DinoStreamInteractor* _tmp1_;
	DinoEntitiesConversation* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->name_label;
	_tmp1_ = self->stream_interactor;
	_tmp2_ = self->priv->_conversation;
	_tmp3_ = dino_ui_util_get_conversation_display_name (_tmp1_, _tmp2_);
	_tmp4_ = _tmp3_;
	gtk_label_set_label (_tmp0_, _tmp4_);
	_g_free0 (_tmp4_);
}

static void
dino_ui_conversation_selector_row_update_pinned_icon (DinoUiConversationSelectorRow* self)
{
	GtkImage* _tmp0_;
	DinoEntitiesConversation* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->pinned_image;
	_tmp1_ = self->priv->_conversation;
	_tmp2_ = dino_entities_conversation_get_pinned (_tmp1_);
	_tmp3_ = _tmp2_;
	gtk_widget_set_visible ((GtkWidget*) _tmp0_, _tmp3_ != 0);
}

void
dino_ui_conversation_selector_row_update_time_label (DinoUiConversationSelectorRow* self,
                                                     GDateTime* new_time)
{
	DinoContentItem* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->last_content_item;
	if (_tmp0_ != NULL) {
		GtkLabel* _tmp1_;
		GtkLabel* _tmp2_;
		DinoContentItem* _tmp3_;
		GDateTime* _tmp4_;
		GDateTime* _tmp5_;
		GDateTime* _tmp6_;
		GDateTime* _tmp7_;
		gchar* _tmp8_;
		gchar* _tmp9_;
		_tmp1_ = self->time_label;
		gtk_widget_set_visible ((GtkWidget*) _tmp1_, TRUE);
		_tmp2_ = self->time_label;
		_tmp3_ = self->last_content_item;
		_tmp4_ = dino_content_item_get_time (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = g_date_time_to_local (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = dino_ui_conversation_selector_row_get_relative_time (_tmp7_);
		_tmp9_ = _tmp8_;
		gtk_label_set_label (_tmp2_, _tmp9_);
		_g_free0 (_tmp9_);
		_g_date_time_unref0 (_tmp7_);
	}
}

static gchar*
string_slice (const gchar* self,
              glong start,
              glong end)
{
	glong string_length = 0L;
	gint _tmp0_;
	gint _tmp1_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gchar* _tmp4_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = strlen (self);
	_tmp1_ = _tmp0_;
	string_length = (glong) _tmp1_;
	if (start < ((glong) 0)) {
		start = string_length + start;
	}
	if (end < ((glong) 0)) {
		end = string_length + end;
	}
	if (start >= ((glong) 0)) {
		_tmp2_ = start <= string_length;
	} else {
		_tmp2_ = FALSE;
	}
	g_return_val_if_fail (_tmp2_, NULL);
	if (end >= ((glong) 0)) {
		_tmp3_ = end <= string_length;
	} else {
		_tmp3_ = FALSE;
	}
	g_return_val_if_fail (_tmp3_, NULL);
	g_return_val_if_fail (start <= end, NULL);
	_tmp4_ = g_strndup (((gchar*) self) + start, (gsize) (end - start));
	result = _tmp4_;
	return result;
}

void
dino_ui_conversation_selector_row_update_message_label (DinoUiConversationSelectorRow* self)
{
	DinoContentItem* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->last_content_item;
	if (_tmp0_ != NULL) {
		DinoContentItem* _tmp1_;
		const gchar* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		GQuark _tmp6_ = 0U;
		static GQuark _tmp5_label0 = 0;
		static GQuark _tmp5_label1 = 0;
		static GQuark _tmp5_label2 = 0;
		GtkLabel* _tmp126_;
		GtkLabel* _tmp127_;
		_tmp1_ = self->last_content_item;
		_tmp2_ = dino_content_item_get_type_ (_tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = _tmp3_;
		_tmp6_ = (NULL == _tmp4_) ? 0 : g_quark_from_string (_tmp4_);
		if (_tmp6_ == ((0 != _tmp5_label0) ? _tmp5_label0 : (_tmp5_label0 = g_quark_from_static_string (DINO_MESSAGE_ITEM_TYPE)))) {
			switch (0) {
				default:
				{
					DinoMessageItem* message_item = NULL;
					DinoContentItem* _tmp7_;
					DinoMessageItem* _tmp8_;
					DinoEntitiesMessage* last_message = NULL;
					DinoMessageItem* _tmp9_;
					DinoEntitiesMessage* _tmp10_;
					DinoEntitiesMessage* _tmp11_;
					gchar* body = NULL;
					DinoEntitiesMessage* _tmp12_;
					gchar* _tmp13_;
					gboolean me_command = FALSE;
					const gchar* _tmp14_;
					gboolean _tmp15_ = FALSE;
					DinoEntitiesConversation* _tmp16_;
					DinoEntitiesConversationType _tmp17_;
					DinoEntitiesConversationType _tmp18_;
					GtkLabel* _tmp51_;
					PangoAttribute* _tmp52_;
					GtkLabel* _tmp53_;
					const gchar* _tmp54_;
					gchar* _tmp55_;
					gchar* _tmp56_;
					_tmp7_ = self->last_content_item;
					_tmp8_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, DINO_TYPE_MESSAGE_ITEM) ? ((DinoMessageItem*) _tmp7_) : NULL);
					message_item = _tmp8_;
					_tmp9_ = message_item;
					_tmp10_ = _tmp9_->message;
					_tmp11_ = _g_object_ref0 (_tmp10_);
					last_message = _tmp11_;
					_tmp12_ = last_message;
					_tmp13_ = dino_message_body_without_reply_fallback (_tmp12_);
					body = _tmp13_;
					_tmp14_ = body;
					me_command = g_str_has_prefix (_tmp14_, "/me ");
					_tmp16_ = self->priv->_conversation;
					_tmp17_ = dino_entities_conversation_get_type_ (_tmp16_);
					_tmp18_ = _tmp17_;
					if (_tmp18_ == DINO_ENTITIES_CONVERSATION_TYPE_GROUPCHAT) {
						_tmp15_ = TRUE;
					} else {
						_tmp15_ = me_command;
					}
					if (_tmp15_) {
						GtkLabel* _tmp19_;
						DinoStreamInteractor* _tmp20_;
						DinoEntitiesConversation* _tmp21_;
						DinoEntitiesMessage* _tmp22_;
						XmppJid* _tmp23_;
						XmppJid* _tmp24_;
						gchar* _tmp25_;
						gchar* _tmp26_;
						_tmp19_ = self->nick_label;
						_tmp20_ = self->stream_interactor;
						_tmp21_ = self->priv->_conversation;
						_tmp22_ = last_message;
						_tmp23_ = dino_entities_message_get_from (_tmp22_);
						_tmp24_ = _tmp23_;
						_tmp25_ = dino_ui_util_get_participant_display_name (_tmp20_, _tmp21_, _tmp24_, !me_command);
						_tmp26_ = _tmp25_;
						gtk_label_set_label (_tmp19_, _tmp26_);
						_g_free0 (_tmp26_);
					} else {
						DinoEntitiesMessage* _tmp27_;
						gboolean _tmp28_;
						gboolean _tmp29_;
						_tmp27_ = last_message;
						_tmp28_ = dino_entities_message_get_direction (_tmp27_);
						_tmp29_ = _tmp28_;
						if (_tmp29_ == DINO_ENTITIES_MESSAGE_DIRECTION_SENT) {
							GtkLabel* _tmp30_;
							const gchar* _tmp31_;
							_tmp30_ = self->nick_label;
							_tmp31_ = dino_gettext ("Me");
							gtk_label_set_label (_tmp30_, _tmp31_);
						} else {
							GtkLabel* _tmp32_;
							_tmp32_ = self->nick_label;
							gtk_label_set_label (_tmp32_, "");
						}
					}
					if (me_command) {
						const gchar* _tmp33_;
						gint _tmp34_;
						gint _tmp35_;
						const gchar* _tmp36_;
						gint _tmp37_;
						gint _tmp38_;
						gchar* _tmp39_;
						_tmp33_ = body;
						_tmp34_ = strlen ("/me");
						_tmp35_ = _tmp34_;
						_tmp36_ = body;
						_tmp37_ = strlen (_tmp36_);
						_tmp38_ = _tmp37_;
						_tmp39_ = string_slice (_tmp33_, (glong) _tmp35_, (glong) _tmp38_);
						_g_free0 (body);
						body = _tmp39_;
					} else {
						GtkLabel* _tmp40_;
						const gchar* _tmp41_;
						const gchar* _tmp42_;
						gint _tmp43_;
						gint _tmp44_;
						_tmp40_ = self->nick_label;
						_tmp41_ = gtk_label_get_label (_tmp40_);
						_tmp42_ = _tmp41_;
						_tmp43_ = strlen (_tmp42_);
						_tmp44_ = _tmp43_;
						if (_tmp44_ > 0) {
							GtkLabel* _tmp45_;
							GtkLabel* _tmp46_;
							const gchar* _tmp47_;
							const gchar* _tmp48_;
							gchar* _tmp49_;
							gchar* _tmp50_;
							_tmp45_ = self->nick_label;
							_tmp46_ = self->nick_label;
							_tmp47_ = gtk_label_get_label (_tmp46_);
							_tmp48_ = _tmp47_;
							_tmp49_ = g_strconcat (_tmp48_, ": ", NULL);
							_tmp50_ = _tmp49_;
							gtk_label_set_label (_tmp46_, _tmp50_);
							_g_free0 (_tmp50_);
						}
					}
					_tmp51_ = self->message_label;
					_tmp52_ = pango_attr_style_new (PANGO_STYLE_NORMAL);
					dino_ui_conversation_selector_row_change_label_attribute (_tmp51_, _tmp52_);
					_tmp53_ = self->message_label;
					_tmp54_ = body;
					_tmp55_ = dino_ui_util_summarize_whitespaces_to_space (_tmp54_);
					_tmp56_ = _tmp55_;
					gtk_label_set_label (_tmp53_, _tmp56_);
					_g_free0 (_tmp56_);
					_g_free0 (body);
					_g_object_unref0 (last_message);
					_g_object_unref0 (message_item);
					break;
				}
			}
		} else if (_tmp6_ == ((0 != _tmp5_label1) ? _tmp5_label1 : (_tmp5_label1 = g_quark_from_static_string (DINO_FILE_ITEM_TYPE)))) {
			switch (0) {
				default:
				{
					DinoFileItem* file_item = NULL;
					DinoContentItem* _tmp57_;
					DinoFileItem* _tmp58_;
					DinoEntitiesFileTransfer* transfer = NULL;
					DinoFileItem* _tmp59_;
					DinoEntitiesFileTransfer* _tmp60_;
					DinoEntitiesFileTransfer* _tmp61_;
					DinoEntitiesConversation* _tmp62_;
					DinoEntitiesConversationType _tmp63_;
					DinoEntitiesConversationType _tmp64_;
					gboolean _tmp84_ = FALSE;
					DinoEntitiesFileTransfer* _tmp85_;
					const gchar* _tmp86_;
					const gchar* _tmp87_;
					gboolean file_is_image = FALSE;
					GtkLabel* _tmp91_;
					PangoAttribute* _tmp92_;
					DinoEntitiesFileTransfer* _tmp93_;
					gboolean _tmp94_;
					gboolean _tmp95_;
					_tmp57_ = self->last_content_item;
					_tmp58_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp57_, DINO_TYPE_FILE_ITEM) ? ((DinoFileItem*) _tmp57_) : NULL);
					file_item = _tmp58_;
					_tmp59_ = file_item;
					_tmp60_ = _tmp59_->file_transfer;
					_tmp61_ = _g_object_ref0 (_tmp60_);
					transfer = _tmp61_;
					_tmp62_ = self->priv->_conversation;
					_tmp63_ = dino_entities_conversation_get_type_ (_tmp62_);
					_tmp64_ = _tmp63_;
					if (_tmp64_ == DINO_ENTITIES_CONVERSATION_TYPE_GROUPCHAT) {
						GtkLabel* _tmp65_;
						DinoStreamInteractor* _tmp66_;
						DinoEntitiesConversation* _tmp67_;
						DinoFileItem* _tmp68_;
						DinoEntitiesFileTransfer* _tmp69_;
						XmppJid* _tmp70_;
						XmppJid* _tmp71_;
						gchar* _tmp72_;
						gchar* _tmp73_;
						gchar* _tmp74_;
						gchar* _tmp75_;
						_tmp65_ = self->nick_label;
						_tmp66_ = self->stream_interactor;
						_tmp67_ = self->priv->_conversation;
						_tmp68_ = file_item;
						_tmp69_ = _tmp68_->file_transfer;
						_tmp70_ = dino_entities_file_transfer_get_from (_tmp69_);
						_tmp71_ = _tmp70_;
						_tmp72_ = dino_ui_util_get_participant_display_name (_tmp66_, _tmp67_, _tmp71_, TRUE);
						_tmp73_ = _tmp72_;
						_tmp74_ = g_strconcat (_tmp73_, ": ", NULL);
						_tmp75_ = _tmp74_;
						gtk_label_set_label (_tmp65_, _tmp75_);
						_g_free0 (_tmp75_);
						_g_free0 (_tmp73_);
					} else {
						gchar* _tmp76_ = NULL;
						DinoEntitiesFileTransfer* _tmp77_;
						gboolean _tmp78_;
						gboolean _tmp79_;
						GtkLabel* _tmp83_;
						_tmp77_ = transfer;
						_tmp78_ = dino_entities_file_transfer_get_direction (_tmp77_);
						_tmp79_ = _tmp78_;
						if (_tmp79_ == DINO_ENTITIES_MESSAGE_DIRECTION_SENT) {
							const gchar* _tmp80_;
							gchar* _tmp81_;
							_tmp80_ = dino_gettext ("Me");
							_tmp81_ = g_strconcat (_tmp80_, ": ", NULL);
							_g_free0 (_tmp76_);
							_tmp76_ = _tmp81_;
						} else {
							gchar* _tmp82_;
							_tmp82_ = g_strdup ("");
							_g_free0 (_tmp76_);
							_tmp76_ = _tmp82_;
						}
						_tmp83_ = self->nick_label;
						gtk_label_set_label (_tmp83_, _tmp76_);
						_g_free0 (_tmp76_);
					}
					_tmp85_ = transfer;
					_tmp86_ = dino_entities_file_transfer_get_mime_type (_tmp85_);
					_tmp87_ = _tmp86_;
					if (_tmp87_ != NULL) {
						DinoEntitiesFileTransfer* _tmp88_;
						const gchar* _tmp89_;
						const gchar* _tmp90_;
						_tmp88_ = transfer;
						_tmp89_ = dino_entities_file_transfer_get_mime_type (_tmp88_);
						_tmp90_ = _tmp89_;
						_tmp84_ = g_str_has_prefix (_tmp90_, "image");
					} else {
						_tmp84_ = FALSE;
					}
					file_is_image = _tmp84_;
					_tmp91_ = self->message_label;
					_tmp92_ = pango_attr_style_new (PANGO_STYLE_ITALIC);
					dino_ui_conversation_selector_row_change_label_attribute (_tmp91_, _tmp92_);
					_tmp93_ = transfer;
					_tmp94_ = dino_entities_file_transfer_get_direction (_tmp93_);
					_tmp95_ = _tmp94_;
					if (_tmp95_ == DINO_ENTITIES_MESSAGE_DIRECTION_SENT) {
						const gchar* _tmp96_ = NULL;
						GtkLabel* _tmp99_;
						if (file_is_image) {
							const gchar* _tmp97_;
							_tmp97_ = dino_gettext ("Image sent");
							_tmp96_ = _tmp97_;
						} else {
							const gchar* _tmp98_;
							_tmp98_ = dino_gettext ("File sent");
							_tmp96_ = _tmp98_;
						}
						_tmp99_ = self->message_label;
						gtk_label_set_label (_tmp99_, _tmp96_);
					} else {
						const gchar* _tmp100_ = NULL;
						GtkLabel* _tmp103_;
						if (file_is_image) {
							const gchar* _tmp101_;
							_tmp101_ = dino_gettext ("Image received");
							_tmp100_ = _tmp101_;
						} else {
							const gchar* _tmp102_;
							_tmp102_ = dino_gettext ("File received");
							_tmp100_ = _tmp102_;
						}
						_tmp103_ = self->message_label;
						gtk_label_set_label (_tmp103_, _tmp100_);
					}
					_g_object_unref0 (transfer);
					_g_object_unref0 (file_item);
					break;
				}
			}
		} else if (_tmp6_ == ((0 != _tmp5_label2) ? _tmp5_label2 : (_tmp5_label2 = g_quark_from_static_string (DINO_CALL_ITEM_TYPE)))) {
			switch (0) {
				default:
				{
					DinoCallItem* call_item = NULL;
					DinoContentItem* _tmp104_;
					DinoCallItem* _tmp105_;
					DinoEntitiesCall* call = NULL;
					DinoCallItem* _tmp106_;
					DinoEntitiesCall* _tmp107_;
					DinoEntitiesCall* _tmp108_;
					gchar* _tmp109_ = NULL;
					DinoEntitiesCall* _tmp110_;
					gboolean _tmp111_;
					gboolean _tmp112_;
					GtkLabel* _tmp116_;
					GtkLabel* _tmp117_;
					PangoAttribute* _tmp118_;
					const gchar* _tmp119_ = NULL;
					DinoEntitiesCall* _tmp120_;
					gboolean _tmp121_;
					gboolean _tmp122_;
					GtkLabel* _tmp125_;
					_tmp104_ = self->last_content_item;
					_tmp105_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp104_, DINO_TYPE_CALL_ITEM, DinoCallItem));
					call_item = _tmp105_;
					_tmp106_ = call_item;
					_tmp107_ = _tmp106_->call;
					_tmp108_ = _g_object_ref0 (_tmp107_);
					call = _tmp108_;
					_tmp110_ = call;
					_tmp111_ = dino_entities_call_get_direction (_tmp110_);
					_tmp112_ = _tmp111_;
					if (_tmp112_ == DINO_ENTITIES_CALL_DIRECTION_OUTGOING) {
						const gchar* _tmp113_;
						gchar* _tmp114_;
						_tmp113_ = dino_gettext ("Me");
						_tmp114_ = g_strconcat (_tmp113_, ": ", NULL);
						_g_free0 (_tmp109_);
						_tmp109_ = _tmp114_;
					} else {
						gchar* _tmp115_;
						_tmp115_ = g_strdup ("");
						_g_free0 (_tmp109_);
						_tmp109_ = _tmp115_;
					}
					_tmp116_ = self->nick_label;
					gtk_label_set_label (_tmp116_, _tmp109_);
					_tmp117_ = self->message_label;
					_tmp118_ = pango_attr_style_new (PANGO_STYLE_ITALIC);
					dino_ui_conversation_selector_row_change_label_attribute (_tmp117_, _tmp118_);
					_tmp120_ = call;
					_tmp121_ = dino_entities_call_get_direction (_tmp120_);
					_tmp122_ = _tmp121_;
					if (_tmp122_ == DINO_ENTITIES_CALL_DIRECTION_OUTGOING) {
						const gchar* _tmp123_;
						_tmp123_ = dino_gettext ("Outgoing call");
						_tmp119_ = _tmp123_;
					} else {
						const gchar* _tmp124_;
						_tmp124_ = dino_gettext ("Incoming call");
						_tmp119_ = _tmp124_;
					}
					_tmp125_ = self->message_label;
					gtk_label_set_label (_tmp125_, _tmp119_);
					_g_free0 (_tmp109_);
					_g_object_unref0 (call);
					_g_object_unref0 (call_item);
					break;
				}
			}
		}
		_tmp126_ = self->nick_label;
		gtk_widget_set_visible ((GtkWidget*) _tmp126_, TRUE);
		_tmp127_ = self->message_label;
		gtk_widget_set_visible ((GtkWidget*) _tmp127_, TRUE);
	}
}

static void
dino_ui_conversation_selector_row_change_label_attribute (GtkLabel* label,
                                                          PangoAttribute* attribute)
{
	PangoAttrList* copy = NULL;
	PangoAttrList* _tmp0_;
	PangoAttrList* _tmp1_;
	PangoAttrList* _tmp2_;
	PangoAttribute* _tmp3_;
	g_return_if_fail (label != NULL);
	g_return_if_fail (attribute != NULL);
	_tmp0_ = gtk_label_get_attributes (label);
	_tmp1_ = _tmp0_;
	_tmp2_ = pango_attr_list_copy (_tmp1_);
	copy = _tmp2_;
	_tmp3_ = attribute;
	attribute = NULL;
	pango_attr_list_change (copy, _tmp3_);
	gtk_label_set_attributes (label, copy);
	_pango_attr_list_unref0 (copy);
	_pango_attribute_destroy0 (attribute);
}

static gboolean
__lambda137_ (DinoUiConversationSelectorRow* self)
{
	gboolean result;
	self->priv->update_read_pending = FALSE;
	self->priv->update_read_pending_force = FALSE;
	dino_ui_conversation_selector_row_update_read_idle (self, self->priv->update_read_pending_force);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda137__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda137_ ((DinoUiConversationSelectorRow*) self);
	return result;
}

void
dino_ui_conversation_selector_row_update_read (DinoUiConversationSelectorRow* self,
                                               gboolean force_update)
{
	g_return_if_fail (self != NULL);
	if (force_update) {
		self->priv->update_read_pending_force = TRUE;
	}
	if (self->priv->update_read_pending) {
		return;
	}
	self->priv->update_read_pending = TRUE;
	g_idle_add_full (G_PRIORITY_LOW, ___lambda137__gsource_func, g_object_ref (self), g_object_unref);
}

static void
dino_ui_conversation_selector_row_update_read_idle (DinoUiConversationSelectorRow* self,
                                                    gboolean force_update)
{
	gint current_num_unread = 0;
	DinoStreamInteractor* _tmp0_;
	DinoModuleIdentity* _tmp1_;
	gpointer _tmp2_;
	DinoChatInteraction* _tmp3_;
	DinoEntitiesConversation* _tmp4_;
	gint _tmp5_;
	gboolean _tmp6_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->stream_interactor;
	_tmp1_ = dino_chat_interaction_IDENTITY;
	_tmp2_ = dino_stream_interactor_get_module (_tmp0_, DINO_TYPE_CHAT_INTERACTION, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp1_);
	_tmp3_ = (DinoChatInteraction*) _tmp2_;
	_tmp4_ = self->priv->_conversation;
	_tmp5_ = dino_chat_interaction_get_num_unread (_tmp3_, _tmp4_);
	_g_object_unref0 (_tmp3_);
	current_num_unread = _tmp5_;
	if (self->num_unread == current_num_unread) {
		_tmp6_ = !force_update;
	} else {
		_tmp6_ = FALSE;
	}
	if (_tmp6_) {
		return;
	}
	self->num_unread = current_num_unread;
	if (self->num_unread == 0) {
		GtkLabel* _tmp7_;
		GtkLabel* _tmp8_;
		PangoAttribute* _tmp9_;
		GtkLabel* _tmp10_;
		PangoAttribute* _tmp11_;
		GtkLabel* _tmp12_;
		PangoAttribute* _tmp13_;
		GtkLabel* _tmp14_;
		PangoAttribute* _tmp15_;
		_tmp7_ = self->unread_count_label;
		gtk_widget_set_visible ((GtkWidget*) _tmp7_, FALSE);
		_tmp8_ = self->name_label;
		_tmp9_ = pango_attr_weight_new (PANGO_WEIGHT_NORMAL);
		dino_ui_conversation_selector_row_change_label_attribute (_tmp8_, _tmp9_);
		_tmp10_ = self->time_label;
		_tmp11_ = pango_attr_weight_new (PANGO_WEIGHT_NORMAL);
		dino_ui_conversation_selector_row_change_label_attribute (_tmp10_, _tmp11_);
		_tmp12_ = self->nick_label;
		_tmp13_ = pango_attr_weight_new (PANGO_WEIGHT_NORMAL);
		dino_ui_conversation_selector_row_change_label_attribute (_tmp12_, _tmp13_);
		_tmp14_ = self->message_label;
		_tmp15_ = pango_attr_weight_new (PANGO_WEIGHT_NORMAL);
		dino_ui_conversation_selector_row_change_label_attribute (_tmp14_, _tmp15_);
	} else {
		GtkLabel* _tmp16_;
		gchar* _tmp17_;
		gchar* _tmp18_;
		GtkLabel* _tmp19_;
		DinoEntitiesConversation* _tmp20_;
		DinoStreamInteractor* _tmp21_;
		GtkLabel* _tmp26_;
		PangoAttribute* _tmp27_;
		GtkLabel* _tmp28_;
		PangoAttribute* _tmp29_;
		GtkLabel* _tmp30_;
		PangoAttribute* _tmp31_;
		GtkLabel* _tmp32_;
		PangoAttribute* _tmp33_;
		_tmp16_ = self->unread_count_label;
		_tmp17_ = g_strdup_printf ("%i", self->num_unread);
		_tmp18_ = _tmp17_;
		gtk_label_set_label (_tmp16_, _tmp18_);
		_g_free0 (_tmp18_);
		_tmp19_ = self->unread_count_label;
		gtk_widget_set_visible ((GtkWidget*) _tmp19_, TRUE);
		_tmp20_ = self->priv->_conversation;
		_tmp21_ = self->stream_interactor;
		if (dino_entities_conversation_get_notification_setting (_tmp20_, _tmp21_) == DINO_ENTITIES_CONVERSATION_NOTIFY_SETTING_ON) {
			GtkLabel* _tmp22_;
			GtkLabel* _tmp23_;
			_tmp22_ = self->unread_count_label;
			gtk_widget_add_css_class ((GtkWidget*) _tmp22_, "unread-count-notify");
			_tmp23_ = self->unread_count_label;
			gtk_widget_remove_css_class ((GtkWidget*) _tmp23_, "unread-count");
		} else {
			GtkLabel* _tmp24_;
			GtkLabel* _tmp25_;
			_tmp24_ = self->unread_count_label;
			gtk_widget_add_css_class ((GtkWidget*) _tmp24_, "unread-count");
			_tmp25_ = self->unread_count_label;
			gtk_widget_remove_css_class ((GtkWidget*) _tmp25_, "unread-count-notify");
		}
		_tmp26_ = self->name_label;
		_tmp27_ = pango_attr_weight_new (PANGO_WEIGHT_BOLD);
		dino_ui_conversation_selector_row_change_label_attribute (_tmp26_, _tmp27_);
		_tmp28_ = self->time_label;
		_tmp29_ = pango_attr_weight_new (PANGO_WEIGHT_BOLD);
		dino_ui_conversation_selector_row_change_label_attribute (_tmp28_, _tmp29_);
		_tmp30_ = self->nick_label;
		_tmp31_ = pango_attr_weight_new (PANGO_WEIGHT_BOLD);
		dino_ui_conversation_selector_row_change_label_attribute (_tmp30_, _tmp31_);
		_tmp32_ = self->message_label;
		_tmp33_ = pango_attr_weight_new (PANGO_WEIGHT_BOLD);
		dino_ui_conversation_selector_row_change_label_attribute (_tmp32_, _tmp33_);
	}
}

static Block53Data*
block53_data_ref (Block53Data* _data53_)
{
	g_atomic_int_inc (&_data53_->_ref_count_);
	return _data53_;
}

static void
block53_data_unref (void * _userdata_)
{
	Block53Data* _data53_;
	_data53_ = (Block53Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data53_->_ref_count_)) {
		DinoUiConversationSelectorRow* self;
		self = _data53_->self;
		_g_object_unref0 (_data53_->grid);
		_g_object_unref0 (self);
		g_slice_free (Block53Data, _data53_);
	}
}

static Block54Data*
block54_data_ref (Block54Data* _data54_)
{
	g_atomic_int_inc (&_data54_->_ref_count_);
	return _data54_;
}

static void
block54_data_unref (void * _userdata_)
{
	Block54Data* _data54_;
	_data54_ = (Block54Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data54_->_ref_count_)) {
		DinoUiConversationSelectorRow* self;
		self = _data54_->_data53_->self;
		_g_free0 (_data54_->show);
		_xmpp_jid_unref0 (_data54_->full_jid);
		block53_data_unref (_data54_->_data53_);
		_data54_->_data53_ = NULL;
		g_slice_free (Block54Data, _data54_);
	}
}

static void
_____lambda140_ (Block54Data* _data54_,
                 GObject* _,
                 GAsyncResult* res)
{
	Block53Data* _data53_;
	DinoUiConversationSelectorRow* self;
	XmppXepServiceDiscoveryIdentity* identity = NULL;
	DinoStreamInteractor* _tmp0_;
	DinoModuleIdentity* _tmp1_;
	gpointer _tmp2_;
	DinoEntityInfo* _tmp3_;
	XmppXepServiceDiscoveryIdentity* _tmp4_;
	XmppXepServiceDiscoveryIdentity* _tmp5_;
	GtkImage* image = NULL;
	GtkImage* _tmp6_ = NULL;
	gboolean _tmp7_ = FALSE;
	XmppXepServiceDiscoveryIdentity* _tmp8_;
	const gchar* _tmp18_;
	gchar* status = NULL;
	const gchar* _tmp31_;
	GString* sb = NULL;
	GString* _tmp37_;
	gboolean _tmp38_ = FALSE;
	XmppXepServiceDiscoveryIdentity* _tmp39_;
	const gchar* _tmp59_;
	GtkLabel* resource = NULL;
	GString* _tmp64_;
	const gchar* _tmp65_;
	GtkLabel* _tmp66_ = NULL;
	GtkGrid* _tmp67_;
	GtkImage* _tmp68_;
	GtkGrid* _tmp69_;
	GtkLabel* _tmp70_;
	_data53_ = _data54_->_data53_;
	self = _data53_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->stream_interactor;
	_tmp1_ = dino_entity_info_IDENTITY;
	_tmp2_ = dino_stream_interactor_get_module (_tmp0_, DINO_TYPE_ENTITY_INFO, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp1_);
	_tmp3_ = (DinoEntityInfo*) _tmp2_;
	_tmp4_ = dino_entity_info_get_identity_finish (_tmp3_, res);
	_tmp5_ = _tmp4_;
	_g_object_unref0 (_tmp3_);
	identity = _tmp5_;
	_tmp6_ = (GtkImage*) gtk_image_new ();
	gtk_widget_set_hexpand ((GtkWidget*) _tmp6_, FALSE);
	gtk_widget_set_valign ((GtkWidget*) _tmp6_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp6_);
	image = _tmp6_;
	_tmp8_ = identity;
	if (_tmp8_ != NULL) {
		gboolean _tmp9_ = FALSE;
		XmppXepServiceDiscoveryIdentity* _tmp10_;
		const gchar* _tmp11_;
		const gchar* _tmp12_;
		_tmp10_ = identity;
		_tmp11_ = xmpp_xep_service_discovery_identity_get_type_ (_tmp10_);
		_tmp12_ = _tmp11_;
		if (g_strcmp0 (_tmp12_, XMPP_XEP_SERVICE_DISCOVERY_IDENTITY_TYPE_PHONE) == 0) {
			_tmp9_ = TRUE;
		} else {
			XmppXepServiceDiscoveryIdentity* _tmp13_;
			const gchar* _tmp14_;
			const gchar* _tmp15_;
			_tmp13_ = identity;
			_tmp14_ = xmpp_xep_service_discovery_identity_get_type_ (_tmp13_);
			_tmp15_ = _tmp14_;
			_tmp9_ = g_strcmp0 (_tmp15_, XMPP_XEP_SERVICE_DISCOVERY_IDENTITY_TYPE_TABLET) == 0;
		}
		_tmp7_ = _tmp9_;
	} else {
		_tmp7_ = FALSE;
	}
	if (_tmp7_) {
		GtkImage* _tmp16_;
		_tmp16_ = image;
		gtk_image_set_from_icon_name (_tmp16_, "dino-device-phone-symbolic");
	} else {
		GtkImage* _tmp17_;
		_tmp17_ = image;
		gtk_image_set_from_icon_name (_tmp17_, "dino-device-desktop-symbolic");
	}
	_tmp18_ = _data54_->show;
	if (g_strcmp0 (_tmp18_, XMPP_PRESENCE_STANZA_SHOW_AWAY) == 0) {
		GtkImage* _tmp19_;
		GtkCssProvider* _tmp20_;
		GtkCssProvider* _tmp21_;
		_tmp19_ = image;
		_tmp20_ = dino_ui_util_force_color ((GtkWidget*) _tmp19_, "#FF9800", "*");
		_tmp21_ = _tmp20_;
		_g_object_unref0 (_tmp21_);
	} else {
		gboolean _tmp22_ = FALSE;
		const gchar* _tmp23_;
		_tmp23_ = _data54_->show;
		if (g_strcmp0 (_tmp23_, XMPP_PRESENCE_STANZA_SHOW_XA) == 0) {
			_tmp22_ = TRUE;
		} else {
			const gchar* _tmp24_;
			_tmp24_ = _data54_->show;
			_tmp22_ = g_strcmp0 (_tmp24_, XMPP_PRESENCE_STANZA_SHOW_DND) == 0;
		}
		if (_tmp22_) {
			GtkImage* _tmp25_;
			GtkCssProvider* _tmp26_;
			GtkCssProvider* _tmp27_;
			_tmp25_ = image;
			_tmp26_ = dino_ui_util_force_color ((GtkWidget*) _tmp25_, "#FF5722", "*");
			_tmp27_ = _tmp26_;
			_g_object_unref0 (_tmp27_);
		} else {
			GtkImage* _tmp28_;
			GtkCssProvider* _tmp29_;
			GtkCssProvider* _tmp30_;
			_tmp28_ = image;
			_tmp29_ = dino_ui_util_force_color ((GtkWidget*) _tmp28_, "#4CAF50", "*");
			_tmp30_ = _tmp29_;
			_g_object_unref0 (_tmp30_);
		}
	}
	status = NULL;
	_tmp31_ = _data54_->show;
	if (g_strcmp0 (_tmp31_, XMPP_PRESENCE_STANZA_SHOW_AWAY) == 0) {
		gchar* _tmp32_;
		_tmp32_ = g_strdup ("away");
		_g_free0 (status);
		status = _tmp32_;
	} else {
		const gchar* _tmp33_;
		_tmp33_ = _data54_->show;
		if (g_strcmp0 (_tmp33_, XMPP_PRESENCE_STANZA_SHOW_XA) == 0) {
			gchar* _tmp34_;
			_tmp34_ = g_strdup ("not available");
			_g_free0 (status);
			status = _tmp34_;
		} else {
			const gchar* _tmp35_;
			_tmp35_ = _data54_->show;
			if (g_strcmp0 (_tmp35_, XMPP_PRESENCE_STANZA_SHOW_DND) == 0) {
				gchar* _tmp36_;
				_tmp36_ = g_strdup ("do not disturb");
				_g_free0 (status);
				status = _tmp36_;
			}
		}
	}
	_tmp37_ = g_string_new ("");
	sb = _tmp37_;
	_tmp39_ = identity;
	if (_tmp39_ != NULL) {
		XmppXepServiceDiscoveryIdentity* _tmp40_;
		const gchar* _tmp41_;
		const gchar* _tmp42_;
		_tmp40_ = identity;
		_tmp41_ = xmpp_xep_service_discovery_identity_get_name (_tmp40_);
		_tmp42_ = _tmp41_;
		_tmp38_ = _tmp42_ != NULL;
	} else {
		_tmp38_ = FALSE;
	}
	if (_tmp38_) {
		GString* _tmp43_;
		XmppXepServiceDiscoveryIdentity* _tmp44_;
		const gchar* _tmp45_;
		const gchar* _tmp46_;
		_tmp43_ = sb;
		_tmp44_ = identity;
		_tmp45_ = xmpp_xep_service_discovery_identity_get_name (_tmp44_);
		_tmp46_ = _tmp45_;
		g_string_append (_tmp43_, _tmp46_);
	} else {
		gboolean _tmp47_ = FALSE;
		XmppJid* _tmp48_;
		const gchar* _tmp49_;
		_tmp48_ = _data54_->full_jid;
		_tmp49_ = _tmp48_->resourcepart;
		if (_tmp49_ != NULL) {
			GRegex* _tmp50_;
			XmppJid* _tmp51_;
			const gchar* _tmp52_;
			_tmp50_ = dino_ui_conversation_selector_row_dino_resource_regex;
			_tmp51_ = _data54_->full_jid;
			_tmp52_ = _tmp51_->resourcepart;
			_tmp47_ = g_regex_match (_tmp50_, _tmp52_, 0, NULL);
		} else {
			_tmp47_ = FALSE;
		}
		if (_tmp47_) {
			GString* _tmp53_;
			_tmp53_ = sb;
			g_string_append (_tmp53_, "Dino");
		} else {
			XmppJid* _tmp54_;
			const gchar* _tmp55_;
			_tmp54_ = _data54_->full_jid;
			_tmp55_ = _tmp54_->resourcepart;
			if (_tmp55_ != NULL) {
				GString* _tmp56_;
				XmppJid* _tmp57_;
				const gchar* _tmp58_;
				_tmp56_ = sb;
				_tmp57_ = _data54_->full_jid;
				_tmp58_ = _tmp57_->resourcepart;
				g_string_append (_tmp56_, _tmp58_);
			} else {
				_g_string_free0 (sb);
				_g_free0 (status);
				_g_object_unref0 (image);
				_xmpp_xep_service_discovery_identity_unref0 (identity);
				return;
			}
		}
	}
	_tmp59_ = status;
	if (_tmp59_ != NULL) {
		GString* _tmp60_;
		GString* _tmp61_;
		const gchar* _tmp62_;
		GString* _tmp63_;
		_tmp60_ = sb;
		_tmp61_ = g_string_append (_tmp60_, " <i>(");
		_tmp62_ = status;
		_tmp63_ = g_string_append (_tmp61_, _tmp62_);
		g_string_append (_tmp63_, ")</i>");
	}
	_tmp64_ = sb;
	_tmp65_ = _tmp64_->str;
	_tmp66_ = (GtkLabel*) gtk_label_new (_tmp65_);
	gtk_label_set_use_markup (_tmp66_, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp66_, TRUE);
	gtk_label_set_xalign (_tmp66_, (gfloat) 0);
	g_object_ref_sink (_tmp66_);
	resource = _tmp66_;
	_tmp67_ = _data53_->grid;
	_tmp68_ = image;
	gtk_grid_attach (_tmp67_, (GtkWidget*) _tmp68_, 0, _data54_->i_cache + 1, 1, 1);
	_tmp69_ = _data53_->grid;
	_tmp70_ = resource;
	gtk_grid_attach (_tmp69_, (GtkWidget*) _tmp70_, 1, _data54_->i_cache + 1, 1, 1);
	_g_object_unref0 (resource);
	_g_string_free0 (sb);
	_g_free0 (status);
	_g_object_unref0 (image);
	_xmpp_xep_service_discovery_identity_unref0 (identity);
}

static void
______lambda140__gasync_ready_callback (GObject* source_object,
                                        GAsyncResult* res,
                                        gpointer self)
{
	_____lambda140_ (self, source_object, res);
	block54_data_unref (self);
}

static GtkWidget*
dino_ui_conversation_selector_row_generate_tooltip (DinoUiConversationSelectorRow* self)
{
	Block53Data* _data53_;
	GtkGrid* _tmp0_ = NULL;
	GtkLabel* label = NULL;
	DinoEntitiesConversation* _tmp1_;
	XmppJid* _tmp2_;
	XmppJid* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	GtkLabel* _tmp6_ = NULL;
	GtkLabel* _tmp7_;
	GtkLabel* _tmp8_;
	PangoAttrList* _tmp9_;
	PangoAttrList* _tmp10_;
	GtkLabel* _tmp11_;
	PangoAttrList* _tmp12_;
	PangoAttrList* _tmp13_;
	PangoAttribute* _tmp14_;
	GtkGrid* _tmp15_;
	GtkLabel* _tmp16_;
	GeeList* full_jids = NULL;
	DinoStreamInteractor* _tmp17_;
	DinoModuleIdentity* _tmp18_;
	gpointer _tmp19_;
	DinoPresenceManager* _tmp20_;
	DinoEntitiesConversation* _tmp21_;
	XmppJid* _tmp22_;
	XmppJid* _tmp23_;
	DinoEntitiesConversation* _tmp24_;
	DinoEntitiesAccount* _tmp25_;
	DinoEntitiesAccount* _tmp26_;
	GeeList* _tmp27_;
	GeeList* _tmp28_;
	GeeList* _tmp29_;
	GtkGrid* _tmp58_;
	GtkWidget* _tmp59_;
	GtkWidget* result;
	g_return_val_if_fail (self != NULL, NULL);
	_data53_ = g_slice_new0 (Block53Data);
	_data53_->_ref_count_ = 1;
	_data53_->self = g_object_ref (self);
	_tmp0_ = (GtkGrid*) gtk_grid_new ();
	gtk_grid_set_row_spacing (_tmp0_, 5);
	gtk_grid_set_column_homogeneous (_tmp0_, FALSE);
	gtk_grid_set_column_spacing (_tmp0_, 5);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp0_, 7);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp0_, 7);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp0_, 7);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp0_, 7);
	g_object_ref_sink (_tmp0_);
	_data53_->grid = _tmp0_;
	_tmp1_ = self->priv->_conversation;
	_tmp2_ = dino_entities_conversation_get_counterpart (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = xmpp_jid_to_string (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = (GtkLabel*) gtk_label_new (_tmp5_);
	gtk_widget_set_valign ((GtkWidget*) _tmp6_, GTK_ALIGN_START);
	gtk_label_set_xalign (_tmp6_, (gfloat) 0);
	g_object_ref_sink (_tmp6_);
	_tmp7_ = _tmp6_;
	_g_free0 (_tmp5_);
	label = _tmp7_;
	_tmp8_ = label;
	_tmp9_ = pango_attr_list_new ();
	_tmp10_ = _tmp9_;
	gtk_label_set_attributes (_tmp8_, _tmp10_);
	_pango_attr_list_unref0 (_tmp10_);
	_tmp11_ = label;
	_tmp12_ = gtk_label_get_attributes (_tmp11_);
	_tmp13_ = _tmp12_;
	_tmp14_ = pango_attr_weight_new (PANGO_WEIGHT_BOLD);
	pango_attr_list_insert (_tmp13_, _tmp14_);
	_tmp15_ = _data53_->grid;
	_tmp16_ = label;
	gtk_grid_attach (_tmp15_, (GtkWidget*) _tmp16_, 0, 0, 2, 1);
	_tmp17_ = self->stream_interactor;
	_tmp18_ = dino_presence_manager_IDENTITY;
	_tmp19_ = dino_stream_interactor_get_module (_tmp17_, DINO_TYPE_PRESENCE_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp18_);
	_tmp20_ = (DinoPresenceManager*) _tmp19_;
	_tmp21_ = self->priv->_conversation;
	_tmp22_ = dino_entities_conversation_get_counterpart (_tmp21_);
	_tmp23_ = _tmp22_;
	_tmp24_ = self->priv->_conversation;
	_tmp25_ = dino_entities_conversation_get_account (_tmp24_);
	_tmp26_ = _tmp25_;
	_tmp27_ = dino_presence_manager_get_full_jids (_tmp20_, _tmp23_, _tmp26_);
	_tmp28_ = _tmp27_;
	_g_object_unref0 (_tmp20_);
	full_jids = _tmp28_;
	_tmp29_ = full_jids;
	if (_tmp29_ == NULL) {
		GtkGrid* _tmp30_;
		GtkWidget* _tmp31_;
		_tmp30_ = _data53_->grid;
		_tmp31_ = _g_object_ref0 ((GtkWidget*) _tmp30_);
		result = _tmp31_;
		_g_object_unref0 (full_jids);
		_g_object_unref0 (label);
		block53_data_unref (_data53_);
		_data53_ = NULL;
		return result;
	}
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp32_ = FALSE;
			_tmp32_ = TRUE;
			while (TRUE) {
				Block54Data* _data54_;
				GeeList* _tmp34_;
				gint _tmp35_;
				gint _tmp36_;
				GeeList* _tmp37_;
				gpointer _tmp38_;
				DinoStreamInteractor* _tmp39_;
				DinoModuleIdentity* _tmp40_;
				gpointer _tmp41_;
				DinoPresenceManager* _tmp42_;
				XmppJid* _tmp43_;
				DinoEntitiesConversation* _tmp44_;
				DinoEntitiesAccount* _tmp45_;
				DinoEntitiesAccount* _tmp46_;
				gchar* _tmp47_;
				gchar* _tmp48_;
				const gchar* _tmp49_;
				DinoStreamInteractor* _tmp50_;
				DinoModuleIdentity* _tmp51_;
				gpointer _tmp52_;
				DinoEntityInfo* _tmp53_;
				DinoEntitiesConversation* _tmp54_;
				DinoEntitiesAccount* _tmp55_;
				DinoEntitiesAccount* _tmp56_;
				XmppJid* _tmp57_;
				_data54_ = g_slice_new0 (Block54Data);
				_data54_->_ref_count_ = 1;
				_data54_->_data53_ = block53_data_ref (_data53_);
				if (!_tmp32_) {
					gint _tmp33_;
					_tmp33_ = i;
					i = _tmp33_ + 1;
				}
				_tmp32_ = FALSE;
				_tmp34_ = full_jids;
				_tmp35_ = gee_collection_get_size ((GeeCollection*) _tmp34_);
				_tmp36_ = _tmp35_;
				if (!(i < _tmp36_)) {
					block54_data_unref (_data54_);
					_data54_ = NULL;
					break;
				}
				_tmp37_ = full_jids;
				_tmp38_ = gee_list_get (_tmp37_, i);
				_data54_->full_jid = (XmppJid*) _tmp38_;
				_tmp39_ = self->stream_interactor;
				_tmp40_ = dino_presence_manager_IDENTITY;
				_tmp41_ = dino_stream_interactor_get_module (_tmp39_, DINO_TYPE_PRESENCE_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp40_);
				_tmp42_ = (DinoPresenceManager*) _tmp41_;
				_tmp43_ = _data54_->full_jid;
				_tmp44_ = self->priv->_conversation;
				_tmp45_ = dino_entities_conversation_get_account (_tmp44_);
				_tmp46_ = _tmp45_;
				_tmp47_ = dino_presence_manager_get_last_show (_tmp42_, _tmp43_, _tmp46_);
				_tmp48_ = _tmp47_;
				_g_object_unref0 (_tmp42_);
				_data54_->show = _tmp48_;
				_tmp49_ = _data54_->show;
				if (_tmp49_ == NULL) {
					block54_data_unref (_data54_);
					_data54_ = NULL;
					continue;
				}
				_data54_->i_cache = i;
				_tmp50_ = self->stream_interactor;
				_tmp51_ = dino_entity_info_IDENTITY;
				_tmp52_ = dino_stream_interactor_get_module (_tmp50_, DINO_TYPE_ENTITY_INFO, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp51_);
				_tmp53_ = (DinoEntityInfo*) _tmp52_;
				_tmp54_ = self->priv->_conversation;
				_tmp55_ = dino_entities_conversation_get_account (_tmp54_);
				_tmp56_ = _tmp55_;
				_tmp57_ = _data54_->full_jid;
				dino_entity_info_get_identity (_tmp53_, _tmp56_, _tmp57_, ______lambda140__gasync_ready_callback, block54_data_ref (_data54_));
				_g_object_unref0 (_tmp53_);
				block54_data_unref (_data54_);
				_data54_ = NULL;
			}
		}
	}
	_tmp58_ = _data53_->grid;
	_tmp59_ = _g_object_ref0 ((GtkWidget*) _tmp58_);
	result = _tmp59_;
	_g_object_unref0 (full_jids);
	_g_object_unref0 (label);
	block53_data_unref (_data53_);
	_data53_ = NULL;
	return result;
}

static gchar*
dino_ui_conversation_selector_row_get_relative_time (GDateTime* datetime)
{
	GDateTime* now = NULL;
	GDateTime* _tmp0_;
	GTimeSpan timespan = 0LL;
	GDateTime* _tmp1_;
	gchar* result;
	g_return_val_if_fail (datetime != NULL, NULL);
	_tmp0_ = g_date_time_new_now_local ();
	now = _tmp0_;
	_tmp1_ = now;
	timespan = g_date_time_difference (_tmp1_, datetime);
	if (timespan > (365 * G_TIME_SPAN_DAY)) {
		gchar* _tmp2_;
		_tmp2_ = g_strdup_printf ("%i", g_date_time_get_year (datetime));
		result = _tmp2_;
		_g_date_time_unref0 (now);
		return result;
	} else {
		if (timespan > (7 * G_TIME_SPAN_DAY)) {
			const gchar* _tmp3_;
			gchar* _tmp4_;
			_tmp3_ = dino_gettext ("%b %d");
			_tmp4_ = g_date_time_format (datetime, _tmp3_);
			result = _tmp4_;
			_g_date_time_unref0 (now);
			return result;
		} else {
			if (timespan > (2 * G_TIME_SPAN_DAY)) {
				gchar* _tmp5_;
				_tmp5_ = g_date_time_format (datetime, "%a");
				result = _tmp5_;
				_g_date_time_unref0 (now);
				return result;
			} else {
				GDateTime* _tmp6_;
				_tmp6_ = now;
				if (g_date_time_get_day_of_month (datetime) != g_date_time_get_day_of_month (_tmp6_)) {
					const gchar* _tmp7_;
					gchar* _tmp8_;
					_tmp7_ = dino_gettext ("Yesterday");
					_tmp8_ = g_strdup (_tmp7_);
					result = _tmp8_;
					_g_date_time_unref0 (now);
					return result;
				} else {
					if (timespan > (9 * G_TIME_SPAN_MINUTE)) {
						const gchar* _tmp9_ = NULL;
						gchar* _tmp12_;
						if (dino_ui_util_is_24h_format ()) {
							const gchar* _tmp10_;
							_tmp10_ = dino_gettext ("%H∶%M");
							_tmp9_ = _tmp10_;
						} else {
							const gchar* _tmp11_;
							_tmp11_ = dino_gettext ("%l∶%M %p");
							_tmp9_ = _tmp11_;
						}
						_tmp12_ = g_date_time_format (datetime, _tmp9_);
						result = _tmp12_;
						_g_date_time_unref0 (now);
						return result;
					} else {
						if (timespan > (1 * G_TIME_SPAN_MINUTE)) {
							gulong mins = 0UL;
							const gchar* _tmp13_;
							gchar* _tmp14_;
							mins = (gulong) (llabs ((gint64) timespan) / G_TIME_SPAN_MINUTE);
							_tmp13_ = dino_ngettext ("%i min ago", "%i mins ago", mins);
							_tmp14_ = g_strdup_printf (_tmp13_, mins);
							result = _tmp14_;
							_g_date_time_unref0 (now);
							return result;
						} else {
							const gchar* _tmp15_;
							gchar* _tmp16_;
							_tmp15_ = dino_gettext ("Just now");
							_tmp16_ = g_strdup (_tmp15_);
							result = _tmp16_;
							_g_date_time_unref0 (now);
							return result;
						}
					}
				}
			}
		}
	}
}

DinoEntitiesConversation*
dino_ui_conversation_selector_row_get_conversation (DinoUiConversationSelectorRow* 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_selector_row_set_conversation (DinoUiConversationSelectorRow* self,
                                                    DinoEntitiesConversation* value)
{
	DinoEntitiesConversation* old_value;
	g_return_if_fail (self != NULL);
	old_value = dino_ui_conversation_selector_row_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_selector_row_properties[DINO_UI_CONVERSATION_SELECTOR_ROW_CONVERSATION_PROPERTY]);
	}
}

static GObject *
dino_ui_conversation_selector_row_constructor (GType type,
                                               guint n_construct_properties,
                                               GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	DinoUiConversationSelectorRow * self;
	GtkLabel* _tmp0_;
	PangoAttrList* _tmp1_;
	PangoAttrList* _tmp2_;
	parent_class = G_OBJECT_CLASS (dino_ui_conversation_selector_row_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_UI_TYPE_CONVERSATION_SELECTOR_ROW, DinoUiConversationSelectorRow);
	_tmp0_ = self->name_label;
	_tmp1_ = pango_attr_list_new ();
	_tmp2_ = _tmp1_;
	gtk_label_set_attributes (_tmp0_, _tmp2_);
	_pango_attr_list_unref0 (_tmp2_);
	return obj;
}

static void
dino_ui_conversation_selector_row_class_init (DinoUiConversationSelectorRowClass * klass,
                                              gpointer klass_data)
{
	GRegex* _tmp0_;
	dino_ui_conversation_selector_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DinoUiConversationSelectorRow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_dino_ui_conversation_selector_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_dino_ui_conversation_selector_row_set_property;
	G_OBJECT_CLASS (klass)->constructor = dino_ui_conversation_selector_row_constructor;
	G_OBJECT_CLASS (klass)->finalize = dino_ui_conversation_selector_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_CONVERSATION_SELECTOR_ROW_CONVERSATION_PROPERTY, dino_ui_conversation_selector_row_properties[DINO_UI_CONVERSATION_SELECTOR_ROW_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_row.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "picture", FALSE, G_STRUCT_OFFSET (DinoUiConversationSelectorRow, picture));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "name_label", FALSE, G_STRUCT_OFFSET (DinoUiConversationSelectorRow, name_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "time_label", FALSE, G_STRUCT_OFFSET (DinoUiConversationSelectorRow, time_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "nick_label", FALSE, G_STRUCT_OFFSET (DinoUiConversationSelectorRow, nick_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "message_label", FALSE, G_STRUCT_OFFSET (DinoUiConversationSelectorRow, message_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "unread_count_label", FALSE, G_STRUCT_OFFSET (DinoUiConversationSelectorRow, unread_count_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "pinned_image", FALSE, G_STRUCT_OFFSET (DinoUiConversationSelectorRow, pinned_image));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "main_revealer", FALSE, G_STRUCT_OFFSET (DinoUiConversationSelectorRow, main_revealer));
	_tmp0_ = _g_regex_ref0 (_thread_safe_regex_init (&_tmp_regex_0, "^dino\\.[a-f0-9]{8}$", 0));
	dino_ui_conversation_selector_row_dino_resource_regex = _tmp0_;
}

static void
dino_ui_conversation_selector_row_instance_init (DinoUiConversationSelectorRow * self,
                                                 gpointer klass)
{
	self->priv = dino_ui_conversation_selector_row_get_instance_private (self);
	self->num_unread = 0;
	self->priv->update_read_pending = FALSE;
	self->priv->update_read_pending_force = FALSE;
	g_type_ensure (DINO_UI_TYPE_AVATAR_PICTURE);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
dino_ui_conversation_selector_row_finalize (GObject * obj)
{
	DinoUiConversationSelectorRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_UI_TYPE_CONVERSATION_SELECTOR_ROW, DinoUiConversationSelectorRow);
	_g_object_unref0 (self->priv->_conversation);
	_g_object_unref0 (self->last_content_item);
	_g_object_unref0 (self->stream_interactor);
	G_OBJECT_CLASS (dino_ui_conversation_selector_row_parent_class)->finalize (obj);
}

static GType
dino_ui_conversation_selector_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DinoUiConversationSelectorRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dino_ui_conversation_selector_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DinoUiConversationSelectorRow), 0, (GInstanceInitFunc) dino_ui_conversation_selector_row_instance_init, NULL };
	GType dino_ui_conversation_selector_row_type_id;
	dino_ui_conversation_selector_row_type_id = g_type_register_static (gtk_list_box_row_get_type (), "DinoUiConversationSelectorRow", &g_define_type_info, 0);
	DinoUiConversationSelectorRow_private_offset = g_type_add_instance_private (dino_ui_conversation_selector_row_type_id, sizeof (DinoUiConversationSelectorRowPrivate));
	return dino_ui_conversation_selector_row_type_id;
}

GType
dino_ui_conversation_selector_row_get_type (void)
{
	static volatile gsize dino_ui_conversation_selector_row_type_id__once = 0;
	if (g_once_init_enter (&dino_ui_conversation_selector_row_type_id__once)) {
		GType dino_ui_conversation_selector_row_type_id;
		dino_ui_conversation_selector_row_type_id = dino_ui_conversation_selector_row_get_type_once ();
		g_once_init_leave (&dino_ui_conversation_selector_row_type_id__once, dino_ui_conversation_selector_row_type_id);
	}
	return dino_ui_conversation_selector_row_type_id__once;
}

static void
_vala_dino_ui_conversation_selector_row_get_property (GObject * object,
                                                      guint property_id,
                                                      GValue * value,
                                                      GParamSpec * pspec)
{
	DinoUiConversationSelectorRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DINO_UI_TYPE_CONVERSATION_SELECTOR_ROW, DinoUiConversationSelectorRow);
	switch (property_id) {
		case DINO_UI_CONVERSATION_SELECTOR_ROW_CONVERSATION_PROPERTY:
		g_value_set_object (value, dino_ui_conversation_selector_row_get_conversation (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_dino_ui_conversation_selector_row_set_property (GObject * object,
                                                      guint property_id,
                                                      const GValue * value,
                                                      GParamSpec * pspec)
{
	DinoUiConversationSelectorRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DINO_UI_TYPE_CONVERSATION_SELECTOR_ROW, DinoUiConversationSelectorRow);
	switch (property_id) {
		case DINO_UI_CONVERSATION_SELECTOR_ROW_CONVERSATION_PROPERTY:
		dino_ui_conversation_selector_row_set_conversation (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

