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

#include <adwaita.h>
#include <glib-object.h>
#include <glib.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gio.h>
#include <json-glib/json-glib.h>
#include <gdk/gdk.h>
#include <pango/pango.h>

#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 DC_TYPE_CHAT_INFO_DIALOG (dc_chat_info_dialog_get_type ())
#define DC_CHAT_INFO_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DC_TYPE_CHAT_INFO_DIALOG, DcChatInfoDialog))
#define DC_CHAT_INFO_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DC_TYPE_CHAT_INFO_DIALOG, DcChatInfoDialogClass))
#define DC_IS_CHAT_INFO_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DC_TYPE_CHAT_INFO_DIALOG))
#define DC_IS_CHAT_INFO_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DC_TYPE_CHAT_INFO_DIALOG))
#define DC_CHAT_INFO_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DC_TYPE_CHAT_INFO_DIALOG, DcChatInfoDialogClass))

typedef struct _DcChatInfoDialog DcChatInfoDialog;
typedef struct _DcChatInfoDialogClass DcChatInfoDialogClass;
typedef struct _DcChatInfoDialogPrivate DcChatInfoDialogPrivate;

#define DC_TYPE_RPC_CLIENT (dc_rpc_client_get_type ())
#define DC_RPC_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DC_TYPE_RPC_CLIENT, DcRpcClient))
#define DC_RPC_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DC_TYPE_RPC_CLIENT, DcRpcClientClass))
#define DC_IS_RPC_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DC_TYPE_RPC_CLIENT))
#define DC_IS_RPC_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DC_TYPE_RPC_CLIENT))
#define DC_RPC_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DC_TYPE_RPC_CLIENT, DcRpcClientClass))

typedef struct _DcRpcClient DcRpcClient;
typedef struct _DcRpcClientClass DcRpcClientClass;

#define DC_TYPE_CONTACT (dc_contact_get_type ())
#define DC_CONTACT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DC_TYPE_CONTACT, DcContact))
#define DC_CONTACT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DC_TYPE_CONTACT, DcContactClass))
#define DC_IS_CONTACT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DC_TYPE_CONTACT))
#define DC_IS_CONTACT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DC_TYPE_CONTACT))
#define DC_CONTACT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DC_TYPE_CONTACT, DcContactClass))

typedef struct _DcContact DcContact;
typedef struct _DcContactClass DcContactClass;
enum  {
	DC_CHAT_INFO_DIALOG_0_PROPERTY,
	DC_CHAT_INFO_DIALOG_NUM_PROPERTIES
};
static GParamSpec* dc_chat_info_dialog_properties[DC_CHAT_INFO_DIALOG_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _Block27Data Block27Data;
#define _json_object_unref0(var) ((var == NULL) ? NULL : (var = (json_object_unref (var), NULL)))
#define _json_array_unref0(var) ((var == NULL) ? NULL : (var = (json_array_unref (var), NULL)))

#define DC_TYPE_INVITE_CODE_DIALOG (dc_invite_code_dialog_get_type ())
#define DC_INVITE_CODE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DC_TYPE_INVITE_CODE_DIALOG, DcInviteCodeDialog))
#define DC_INVITE_CODE_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DC_TYPE_INVITE_CODE_DIALOG, DcInviteCodeDialogClass))
#define DC_IS_INVITE_CODE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DC_TYPE_INVITE_CODE_DIALOG))
#define DC_IS_INVITE_CODE_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DC_TYPE_INVITE_CODE_DIALOG))
#define DC_INVITE_CODE_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DC_TYPE_INVITE_CODE_DIALOG, DcInviteCodeDialogClass))

typedef struct _DcInviteCodeDialog DcInviteCodeDialog;
typedef struct _DcInviteCodeDialogClass DcInviteCodeDialogClass;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _DcChatInfoDialogLoadInfoData DcChatInfoDialogLoadInfoData;
typedef struct _Block28Data Block28Data;
typedef struct _Block29Data Block29Data;
typedef struct _Block30Data Block30Data;
typedef struct _Block31Data Block31Data;
typedef struct _Block32Data Block32Data;
typedef struct _DcChatInfoDialogSaveContactNameData DcChatInfoDialogSaveContactNameData;
typedef struct _DcChatInfoDialogRemoveMemberData DcChatInfoDialogRemoveMemberData;

#define DC_TYPE_CONTACT_PICKER_DIALOG (dc_contact_picker_dialog_get_type ())
#define DC_CONTACT_PICKER_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DC_TYPE_CONTACT_PICKER_DIALOG, DcContactPickerDialog))
#define DC_CONTACT_PICKER_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DC_TYPE_CONTACT_PICKER_DIALOG, DcContactPickerDialogClass))
#define DC_IS_CONTACT_PICKER_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DC_TYPE_CONTACT_PICKER_DIALOG))
#define DC_IS_CONTACT_PICKER_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DC_TYPE_CONTACT_PICKER_DIALOG))
#define DC_CONTACT_PICKER_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DC_TYPE_CONTACT_PICKER_DIALOG, DcContactPickerDialogClass))

typedef struct _DcContactPickerDialog DcContactPickerDialog;
typedef struct _DcContactPickerDialogClass DcContactPickerDialogClass;
typedef struct _DcChatInfoDialogAddMemberDialogData DcChatInfoDialogAddMemberDialogData;
typedef struct _DcChatInfoDialogDoAddMemberData DcChatInfoDialogDoAddMemberData;
typedef struct _Block33Data Block33Data;
typedef void (*DcVoidFunc) (gpointer user_data);
typedef struct _DcChatInfoDialogSetContactBlockedData DcChatInfoDialogSetContactBlockedData;
typedef struct _Block34Data Block34Data;
typedef struct _DcChatInfoDialogConfirmClearHistoryData DcChatInfoDialogConfirmClearHistoryData;
typedef struct _DcChatInfoDialogDoClearHistoryData DcChatInfoDialogDoClearHistoryData;
typedef struct _DcChatInfoDialogConfirmLeaveGroupData DcChatInfoDialogConfirmLeaveGroupData;
typedef struct _DcChatInfoDialogDoLeaveGroupData DcChatInfoDialogDoLeaveGroupData;
typedef struct _DcChatInfoDialogConfirmDisbandGroupData DcChatInfoDialogConfirmDisbandGroupData;
typedef struct _DcChatInfoDialogDoDisbandGroupData DcChatInfoDialogDoDisbandGroupData;
typedef struct _DcChatInfoDialogConfirmDeleteChatData DcChatInfoDialogConfirmDeleteChatData;
typedef struct _DcChatInfoDialogDoDeleteChatFromDialogData DcChatInfoDialogDoDeleteChatFromDialogData;
typedef struct _DcChatInfoDialogPickAvatarData DcChatInfoDialogPickAvatarData;
enum  {
	DC_CHAT_INFO_DIALOG_CHAT_DELETED_SIGNAL,
	DC_CHAT_INFO_DIALOG_CHAT_CHANGED_SIGNAL,
	DC_CHAT_INFO_DIALOG_CONTACT_BLOCKED_SIGNAL,
	DC_CHAT_INFO_DIALOG_NUM_SIGNALS
};
static guint dc_chat_info_dialog_signals[DC_CHAT_INFO_DIALOG_NUM_SIGNALS] = {0};

struct _DcChatInfoDialog {
	AdwDialog parent_instance;
	DcChatInfoDialogPrivate * priv;
};

struct _DcChatInfoDialogClass {
	AdwDialogClass parent_class;
};

struct _DcChatInfoDialogPrivate {
	DcRpcClient* rpc;
	gint chat_id;
	gboolean is_group;
	GtkListBox* members_list;
	GtkBox* content;
	gchar* chat_name;
	gint* member_contact_ids;
	gint member_contact_ids_length1;
	gint _member_contact_ids_size_;
	DcContact* dm_contact;
};

struct _Block27Data {
	int _ref_count_;
	DcChatInfoDialog* self;
	gint dm_contact_id;
	GtkLabel* name_lbl;
	gint* timer_values;
	gint timer_values_length1;
	gint _timer_values_size_;
	GtkDropDown* combo;
};

struct _DcChatInfoDialogLoadInfoData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DcChatInfoDialog* self;
	GtkSpinner* spinner;
	Block27Data* _data27_;
	JsonObject* chat;
	DcRpcClient* _tmp0_;
	JsonObject* _tmp1_;
	JsonObject* _tmp2_;
	gchar* _tmp3_;
	JsonObject* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* name;
	gchar* _tmp7_;
	gchar* _tmp8_;
	JsonObject* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* chat_type;
	gchar* _tmp12_;
	gchar* profile_image;
	JsonObject* _tmp13_;
	gchar* _tmp14_;
	gboolean encrypted;
	JsonObject* _tmp15_;
	gboolean _tmp16_;
	gboolean _tmp17_;
	const gchar* _tmp18_;
	JsonObject* _tmp19_;
	JsonObject* _tmp20_;
	gboolean is_dm_chat;
	gboolean _tmp21_;
	const gchar* _tmp22_;
	const gchar* _tmp23_;
	const gchar* _tmp24_;
	gchar* _tmp25_;
	gboolean _tmp26_;
	JsonObject* _tmp27_;
	JsonArray* ids;
	JsonObject* _tmp28_;
	JsonArray* _tmp29_;
	JsonArray* _tmp30_;
	JsonArray* _tmp31_;
	JsonArray* _tmp32_;
	AdwAvatar* avatar;
	const gchar* _tmp33_;
	AdwAvatar* _tmp34_;
	AdwAvatar* _tmp35_;
	const gchar* _tmp36_;
	GdkTexture* _tmp37_;
	GdkTexture* _tmp38_;
	AdwAvatar* _tmp39_;
	GtkBox* _tmp40_;
	AdwAvatar* _tmp41_;
	GtkButton* change_avatar_btn;
	GtkButton* _tmp42_;
	GtkButton* _tmp43_;
	GtkButton* _tmp44_;
	GtkButton* _tmp45_;
	GtkBox* _tmp46_;
	GtkButton* _tmp47_;
	GtkBox* name_box;
	GtkBox* _tmp48_;
	GtkBox* _tmp49_;
	const gchar* _tmp50_;
	GtkLabel* _tmp51_;
	GtkLabel* _tmp52_;
	GtkLabel* _tmp53_;
	GtkLabel* _tmp54_;
	GtkBox* _tmp55_;
	GtkLabel* _tmp56_;
	gboolean _tmp57_;
	GtkButton* edit_name_btn;
	GtkButton* _tmp58_;
	GtkButton* _tmp59_;
	GtkButton* _tmp60_;
	GtkButton* _tmp61_;
	GtkBox* _tmp62_;
	GtkButton* _tmp63_;
	GtkBox* _tmp64_;
	GtkBox* _tmp65_;
	gchar* type_str;
	const gchar* _tmp66_;
	gchar* _tmp67_;
	const gchar* _tmp68_;
	gchar* _tmp69_;
	GtkLabel* type_lbl;
	const gchar* _tmp70_;
	GtkLabel* _tmp71_;
	GtkLabel* _tmp72_;
	GtkLabel* _tmp73_;
	GtkBox* _tmp74_;
	GtkLabel* _tmp75_;
	GtkListBox* invite_list;
	GtkListBox* _tmp76_;
	GtkListBox* _tmp77_;
	GtkListBox* _tmp78_;
	AdwActionRow* invite_row;
	AdwActionRow* _tmp79_;
	AdwActionRow* _tmp80_;
	AdwActionRow* _tmp81_;
	AdwActionRow* _tmp82_;
	GtkImage* _tmp83_;
	GtkImage* _tmp84_;
	AdwActionRow* _tmp85_;
	AdwActionRow* _tmp86_;
	GtkListBox* _tmp87_;
	AdwActionRow* _tmp88_;
	GtkBox* _tmp89_;
	GtkListBox* _tmp90_;
	gint ephemeral_timer;
	JsonObject* _tmp91_;
	AdwActionRow* ephem_row;
	AdwActionRow* _tmp92_;
	AdwActionRow* _tmp93_;
	gint* _tmp94_;
	gchar** timer_labels;
	gchar* _tmp95_;
	gchar* _tmp96_;
	gchar* _tmp97_;
	gchar* _tmp98_;
	gchar* _tmp99_;
	gchar* _tmp100_;
	gchar* _tmp101_;
	gchar* _tmp102_;
	gchar* _tmp103_;
	gchar** _tmp104_;
	gint timer_labels_length1;
	gint _timer_labels_size_;
	gint active_idx;
	gint i;
	gboolean _tmp105_;
	gint _tmp106_;
	gint* _tmp107_;
	gint _tmp107__length1;
	gint* _tmp108_;
	gint _tmp108__length1;
	gint _tmp109_;
	gchar** _tmp110_;
	gint _tmp110__length1;
	GtkDropDown* _tmp111_;
	GtkDropDown* _tmp112_;
	GtkDropDown* _tmp113_;
	GtkDropDown* _tmp114_;
	AdwActionRow* _tmp115_;
	GtkDropDown* _tmp116_;
	AdwActionRow* _tmp117_;
	GtkDropDown* _tmp118_;
	GtkListBox* ephem_list;
	GtkListBox* _tmp119_;
	GtkListBox* _tmp120_;
	GtkListBox* _tmp121_;
	GtkListBox* _tmp122_;
	AdwActionRow* _tmp123_;
	GtkBox* _tmp124_;
	GtkListBox* _tmp125_;
	GtkBox* _tmp126_;
	GtkSeparator* _tmp127_;
	GtkSeparator* _tmp128_;
	JsonObject* _tmp129_;
	JsonArray* _vala1_ids;
	JsonObject* _tmp130_;
	JsonArray* _tmp131_;
	JsonArray* _tmp132_;
	GtkBox* header_box;
	GtkBox* _tmp133_;
	gchar* _tmp134_;
	JsonArray* _tmp135_;
	gchar* _tmp136_;
	gchar* _tmp137_;
	GtkLabel* members_lbl;
	GtkLabel* _tmp138_;
	GtkLabel* _tmp139_;
	GtkLabel* _tmp140_;
	GtkLabel* _tmp141_;
	GtkBox* _tmp142_;
	GtkLabel* _tmp143_;
	GtkButton* add_btn;
	GtkButton* _tmp144_;
	GtkButton* _tmp145_;
	GtkButton* _tmp146_;
	GtkButton* _tmp147_;
	GtkBox* _tmp148_;
	GtkButton* _tmp149_;
	GtkBox* _tmp150_;
	GtkBox* _tmp151_;
	GtkListBox* _tmp152_;
	GtkListBox* _tmp153_;
	GtkListBox* _tmp154_;
	guint _vala1_i;
	gboolean _tmp155_;
	guint _tmp156_;
	JsonArray* _tmp157_;
	gint cid;
	JsonArray* _tmp158_;
	JsonObject* contact_obj;
	DcRpcClient* _tmp159_;
	JsonObject* _tmp160_;
	JsonObject* _tmp161_;
	DcContact* contact;
	JsonObject* _tmp162_;
	DcContact* _tmp163_;
	gboolean _tmp164_;
	gboolean _tmp165_;
	DcContact* _tmp166_;
	gint _tmp167_;
	gint _tmp168_;
	DcContact* _tmp169_;
	DcContact* _tmp170_;
	DcContact* _tmp171_;
	AdwActionRow* row;
	DcContact* _tmp172_;
	AdwActionRow* _tmp173_;
	GtkListBox* _tmp174_;
	AdwActionRow* _tmp175_;
	GtkBox* _tmp176_;
	GtkListBox* _tmp177_;
	GtkBox* _tmp178_;
	GtkSeparator* _tmp179_;
	GtkSeparator* _tmp180_;
	GtkListBox* actions_list;
	GtkListBox* _tmp181_;
	GtkListBox* _tmp182_;
	GtkListBox* _tmp183_;
	AdwActionRow* clear_row;
	AdwActionRow* _tmp184_;
	AdwActionRow* _tmp185_;
	GtkButton* clear_me_btn;
	GtkButton* _tmp186_;
	GtkButton* _tmp187_;
	GtkButton* _tmp188_;
	GtkButton* _tmp189_;
	AdwActionRow* _tmp190_;
	GtkButton* _tmp191_;
	GtkButton* clear_all_btn;
	GtkButton* _tmp192_;
	GtkButton* _tmp193_;
	GtkButton* _tmp194_;
	GtkButton* _tmp195_;
	GtkButton* _tmp196_;
	AdwActionRow* _tmp197_;
	GtkButton* _tmp198_;
	GtkListBox* _tmp199_;
	AdwActionRow* _tmp200_;
	AdwActionRow* leave_row;
	AdwActionRow* _tmp201_;
	AdwActionRow* _tmp202_;
	AdwActionRow* _tmp203_;
	AdwActionRow* _tmp204_;
	GtkImage* _tmp205_;
	GtkImage* _tmp206_;
	AdwActionRow* _tmp207_;
	AdwActionRow* _tmp208_;
	GtkListBox* _tmp209_;
	AdwActionRow* _tmp210_;
	AdwActionRow* disband_row;
	AdwActionRow* _tmp211_;
	AdwActionRow* _tmp212_;
	AdwActionRow* _tmp213_;
	AdwActionRow* _tmp214_;
	GtkImage* _tmp215_;
	GtkImage* _tmp216_;
	AdwActionRow* _tmp217_;
	AdwActionRow* _tmp218_;
	GtkListBox* _tmp219_;
	AdwActionRow* _tmp220_;
	DcContact* _tmp221_;
	GtkListBox* _tmp222_;
	DcContact* _tmp223_;
	AdwActionRow* _tmp224_;
	AdwActionRow* _tmp225_;
	AdwActionRow* del_row;
	AdwActionRow* _tmp226_;
	AdwActionRow* _tmp227_;
	AdwActionRow* _tmp228_;
	AdwActionRow* _tmp229_;
	GtkImage* _tmp230_;
	GtkImage* _tmp231_;
	AdwActionRow* _tmp232_;
	AdwActionRow* _tmp233_;
	GtkListBox* _tmp234_;
	AdwActionRow* _tmp235_;
	GtkBox* _tmp236_;
	GtkListBox* _tmp237_;
	GError* e;
	GtkLabel* err;
	GError* _tmp238_;
	const gchar* _tmp239_;
	gchar* _tmp240_;
	gchar* _tmp241_;
	GtkLabel* _tmp242_;
	GtkLabel* _tmp243_;
	GtkLabel* _tmp244_;
	GtkLabel* _tmp245_;
	GtkBox* _tmp246_;
	GtkLabel* _tmp247_;
	GError* _inner_error0_;
};

struct _Block28Data {
	int _ref_count_;
	DcChatInfoDialog* self;
	AdwActionRow* row;
};

struct _Block29Data {
	int _ref_count_;
	Block28Data * _data28_;
	gchar* addr;
};

struct _Block30Data {
	int _ref_count_;
	Block28Data * _data28_;
	gint cid;
};

struct _Block31Data {
	int _ref_count_;
	DcChatInfoDialog* self;
	AdwActionRow* row;
	DcContact* contact;
};

struct _Block32Data {
	int _ref_count_;
	DcChatInfoDialog* self;
	AdwAlertDialog* dialog;
	GtkEntry* entry;
	gint contact_id;
	GtkLabel* name_lbl;
};

struct _DcChatInfoDialogSaveContactNameData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DcChatInfoDialog* self;
	gint contact_id;
	gchar* new_name;
	GtkLabel* name_lbl;
	DcRpcClient* _tmp0_;
	JsonObject* contact_obj;
	DcRpcClient* _tmp1_;
	JsonObject* _tmp2_;
	JsonObject* _tmp3_;
	DcContact* contact;
	JsonObject* _tmp4_;
	DcContact* _tmp5_;
	DcContact* _tmp6_;
	DcContact* _tmp7_;
	DcContact* _tmp8_;
	gchar* _tmp9_;
	const gchar* _tmp10_;
	gboolean _tmp11_;
	GtkListBox* _tmp12_;
	GtkListBox* _tmp13_;
	GtkListBox* _tmp14_;
	DcContact* _tmp15_;
	AdwActionRow* _tmp16_;
	AdwActionRow* _tmp17_;
	gint _tmp18_;
	gint _tmp19_;
	gchar* _tmp20_;
	GError* e;
	GError* _tmp21_;
	const gchar* _tmp22_;
	GError* _inner_error0_;
};

struct _DcChatInfoDialogRemoveMemberData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DcChatInfoDialog* self;
	gint contact_id;
	AdwActionRow* row;
	DcRpcClient* _tmp0_;
	GtkListBox* _tmp1_;
	GError* e;
	GError* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	GError* _inner_error0_;
};

struct _DcChatInfoDialogAddMemberDialogData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DcChatInfoDialog* self;
	DcContactPickerDialog* picker;
	DcRpcClient* _tmp0_;
	DcContactPickerDialog* _tmp1_;
};

struct _DcChatInfoDialogDoAddMemberData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DcChatInfoDialog* self;
	gchar* email;
	gint contact_id;
	DcRpcClient* _tmp0_;
	DcRpcClient* _tmp1_;
	JsonObject* contact_obj;
	DcRpcClient* _tmp2_;
	JsonObject* _tmp3_;
	gboolean _tmp4_;
	JsonObject* _tmp5_;
	GtkListBox* _tmp6_;
	DcContact* contact;
	JsonObject* _tmp7_;
	DcContact* _tmp8_;
	AdwActionRow* row;
	DcContact* _tmp9_;
	AdwActionRow* _tmp10_;
	GtkListBox* _tmp11_;
	AdwActionRow* _tmp12_;
	GError* e;
	GError* _tmp13_;
	const gchar* _tmp14_;
	GError* _inner_error0_;
};

struct _Block33Data {
	int _ref_count_;
	DcChatInfoDialog* self;
	DcContact* contact;
	AdwActionRow* row;
};

struct _DcChatInfoDialogSetContactBlockedData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DcChatInfoDialog* self;
	DcContact* contact;
	AdwActionRow* row;
	gboolean blocked;
	DcRpcClient* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	DcRpcClient* _tmp3_;
	gint _tmp4_;
	gint _tmp5_;
	GError* e;
	GError* _tmp6_;
	const gchar* _tmp7_;
	GError* _inner_error0_;
};

struct _Block34Data {
	int _ref_count_;
	DcChatInfoDialog* self;
	gboolean for_all;
	gpointer _async_data_;
};

struct _DcChatInfoDialogConfirmClearHistoryData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DcChatInfoDialog* self;
	gboolean for_all;
	Block34Data* _data34_;
	const gchar* _tmp0_;
	gchar* title;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* body;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* action_label;
	gchar* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
};

struct _DcChatInfoDialogDoClearHistoryData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DcChatInfoDialog* self;
	gboolean for_all;
	JsonArray* msg_ids;
	DcRpcClient* _tmp0_;
	JsonArray* _tmp1_;
	gboolean _tmp2_;
	JsonArray* _tmp3_;
	JsonArray* _tmp4_;
	gint* ids;
	JsonArray* _tmp5_;
	gint _tmp6_;
	gint* _tmp7_;
	gint ids_length1;
	gint _ids_size_;
	DcRpcClient* _tmp8_;
	gint* _tmp9_;
	gint _tmp9__length1;
	DcRpcClient* _tmp10_;
	gint* _tmp11_;
	gint _tmp11__length1;
	GError* e;
	GError* _tmp12_;
	const gchar* _tmp13_;
	GError* _inner_error0_;
};

struct _DcChatInfoDialogConfirmLeaveGroupData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DcChatInfoDialog* self;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
};

struct _DcChatInfoDialogDoLeaveGroupData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DcChatInfoDialog* self;
	DcRpcClient* _tmp0_;
	GError* e;
	GError* _tmp1_;
	const gchar* _tmp2_;
	GError* _inner_error0_;
};

struct _DcChatInfoDialogConfirmDisbandGroupData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DcChatInfoDialog* self;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
};

struct _DcChatInfoDialogDoDisbandGroupData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DcChatInfoDialog* self;
	gint* _tmp0_;
	gint _tmp0__length1;
	gint* cid_collection;
	gint cid_collection_length1;
	gint _cid_collection_size_;
	gint cid_it;
	gint cid;
	DcRpcClient* _tmp1_;
	JsonArray* msg_ids;
	DcRpcClient* _tmp2_;
	JsonArray* _tmp3_;
	gboolean _tmp4_;
	JsonArray* _tmp5_;
	JsonArray* _tmp6_;
	DcRpcClient* _tmp7_;
	JsonArray* _tmp8_;
	gint _tmp9_;
	gint* _tmp10_;
	gint* _tmp11_;
	gint _tmp11__length1;
	DcRpcClient* _tmp12_;
	DcRpcClient* _tmp13_;
	GError* e;
	GError* _tmp14_;
	const gchar* _tmp15_;
	GError* _inner_error0_;
};

struct _DcChatInfoDialogConfirmDeleteChatData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DcChatInfoDialog* self;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
};

struct _DcChatInfoDialogDoDeleteChatFromDialogData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DcChatInfoDialog* self;
	DcRpcClient* _tmp0_;
	GError* e;
	GError* _tmp1_;
	const gchar* _tmp2_;
	GError* _inner_error0_;
};

struct _DcChatInfoDialogPickAvatarData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DcChatInfoDialog* self;
	gchar* path;
	GtkRoot* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	DcRpcClient* _tmp3_;
	const gchar* _tmp4_;
	GError* _inner_error0_;
};

static gint DcChatInfoDialog_private_offset;
static gpointer dc_chat_info_dialog_parent_class = NULL;

VALA_EXTERN GType dc_chat_info_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DcChatInfoDialog, g_object_unref)
VALA_EXTERN GType dc_rpc_client_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DcRpcClient, g_object_unref)
VALA_EXTERN GType dc_contact_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DcContact, g_object_unref)
VALA_EXTERN DcChatInfoDialog* dc_chat_info_dialog_new (DcRpcClient* rpc,
                                           gint chat_id);
VALA_EXTERN DcChatInfoDialog* dc_chat_info_dialog_construct (GType object_type,
                                                 DcRpcClient* rpc,
                                                 gint chat_id);
static void dc_chat_info_dialog_load_info (DcChatInfoDialog* self,
                                    GtkSpinner* spinner,
                                    GAsyncReadyCallback _callback_,
                                    gpointer _user_data_);
static void dc_chat_info_dialog_load_info_finish (DcChatInfoDialog* self,
                                           GAsyncResult* _res_);
static void dc_chat_info_dialog_load_info_data_free (gpointer _data);
static gboolean dc_chat_info_dialog_load_info_co (DcChatInfoDialogLoadInfoData* _data_);
static Block27Data* block27_data_ref (Block27Data* _data27_);
static void block27_data_unref (void * _userdata_);
VALA_EXTERN void dc_rpc_client_get_full_chat_by_id (DcRpcClient* self,
                                        gint chat_id,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_);
VALA_EXTERN JsonObject* dc_rpc_client_get_full_chat_by_id_finish (DcRpcClient* self,
                                                      GAsyncResult* _res_,
                                                      GError** error);
static void dc_chat_info_dialog_load_info_ready (GObject* source_object,
                                          GAsyncResult* _res_,
                                          gpointer _user_data_);
VALA_EXTERN gchar* dc_json_str (JsonObject* obj,
                    const gchar* key);
VALA_EXTERN gboolean dc_json_bool (JsonObject* obj,
                       const gchar* key);
VALA_EXTERN GdkTexture* dc_load_avatar (const gchar* path);
static void ____lambda101_ (DcChatInfoDialog* self);
static void dc_chat_info_dialog_pick_avatar (DcChatInfoDialog* self,
                                      GAsyncReadyCallback _callback_,
                                      gpointer _user_data_);
static void dc_chat_info_dialog_pick_avatar_finish (DcChatInfoDialog* self,
                                             GAsyncResult* _res_);
static void _____lambda101__gtk_button_clicked (GtkButton* _sender,
                                         gpointer self);
static void ____lambda102_ (Block27Data* _data27_);
static void dc_chat_info_dialog_show_edit_contact_name_dialog (DcChatInfoDialog* self,
                                                        gint contact_id,
                                                        GtkLabel* name_lbl);
static void _____lambda102__gtk_button_clicked (GtkButton* _sender,
                                         gpointer self);
static void ____lambda107_ (DcChatInfoDialog* self);
VALA_EXTERN GType dc_invite_code_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DcInviteCodeDialog, g_object_unref)
VALA_EXTERN gint dc_rpc_client_get_account_id (DcRpcClient* self);
VALA_EXTERN DcInviteCodeDialog* dc_invite_code_dialog_new (DcRpcClient* rpc,
                                               gint acct_id,
                                               gint chat_id);
VALA_EXTERN DcInviteCodeDialog* dc_invite_code_dialog_construct (GType object_type,
                                                     DcRpcClient* rpc,
                                                     gint acct_id,
                                                     gint chat_id);
static void _____lambda107__adw_action_row_activated (AdwActionRow* _sender,
                                               gpointer self);
VALA_EXTERN gint64 dc_json_int (JsonObject* obj,
                    const gchar* key,
                    gint64 fallback);
static void ___lambda111_ (Block27Data* _data27_);
VALA_EXTERN void dc_rpc_client_set_chat_ephemeral_timer (DcRpcClient* self,
                                             gint chat_id,
                                             gint timer,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_);
VALA_EXTERN void dc_rpc_client_set_chat_ephemeral_timer_finish (DcRpcClient* self,
                                                    GAsyncResult* _res_,
                                                    GError** error);
static void ____lambda111__g_object_notify (GObject* _sender,
                                     GParamSpec* pspec,
                                     gpointer self);
static void _____lambda112_ (DcChatInfoDialog* self);
static void dc_chat_info_dialog_add_member_dialog (DcChatInfoDialog* self,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_);
static void dc_chat_info_dialog_add_member_dialog_finish (DcChatInfoDialog* self,
                                                   GAsyncResult* _res_);
static void ______lambda112__gtk_button_clicked (GtkButton* _sender,
                                          gpointer self);
static void _vala_array_add6 (gint* * array,
                       gint* length,
                       gint* size,
                       gint value);
VALA_EXTERN void dc_rpc_client_get_contact (DcRpcClient* self,
                                gint contact_id,
                                GAsyncReadyCallback _callback_,
                                gpointer _user_data_);
VALA_EXTERN JsonObject* dc_rpc_client_get_contact_finish (DcRpcClient* self,
                                              GAsyncResult* _res_,
                                              GError** error);
VALA_EXTERN DcContact* dc_rpc_parsers_parse_contact (gint contact_id,
                                         JsonObject* obj);
VALA_EXTERN gint dc_contact_get_id (DcContact* self);
static AdwActionRow* dc_chat_info_dialog_build_contact_row (DcChatInfoDialog* self,
                                                     DcContact* contact);
static void ___lambda114_ (DcChatInfoDialog* self);
static void dc_chat_info_dialog_confirm_clear_history (DcChatInfoDialog* self,
                                                gboolean for_all,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_);
static void dc_chat_info_dialog_confirm_clear_history_finish (DcChatInfoDialog* self,
                                                       GAsyncResult* _res_);
static void ____lambda114__gtk_button_clicked (GtkButton* _sender,
                                        gpointer self);
static void ___lambda117_ (DcChatInfoDialog* self);
static void ____lambda117__gtk_button_clicked (GtkButton* _sender,
                                        gpointer self);
static void ____lambda118_ (DcChatInfoDialog* self);
static void dc_chat_info_dialog_confirm_leave_group (DcChatInfoDialog* self,
                                              GAsyncReadyCallback _callback_,
                                              gpointer _user_data_);
static void dc_chat_info_dialog_confirm_leave_group_finish (DcChatInfoDialog* self,
                                                     GAsyncResult* _res_);
static void _____lambda118__adw_action_row_activated (AdwActionRow* _sender,
                                               gpointer self);
static void ____lambda120_ (DcChatInfoDialog* self);
static void dc_chat_info_dialog_confirm_disband_group (DcChatInfoDialog* self,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_);
static void dc_chat_info_dialog_confirm_disband_group_finish (DcChatInfoDialog* self,
                                                       GAsyncResult* _res_);
static void _____lambda120__adw_action_row_activated (AdwActionRow* _sender,
                                               gpointer self);
static AdwActionRow* dc_chat_info_dialog_build_contact_block_row (DcChatInfoDialog* self,
                                                           DcContact* contact);
static void ___lambda124_ (DcChatInfoDialog* self);
static void dc_chat_info_dialog_confirm_delete_chat (DcChatInfoDialog* self,
                                              GAsyncReadyCallback _callback_,
                                              gpointer _user_data_);
static void dc_chat_info_dialog_confirm_delete_chat_finish (DcChatInfoDialog* self,
                                                     GAsyncResult* _res_);
static void ____lambda124__adw_action_row_activated (AdwActionRow* _sender,
                                              gpointer self);
static Block28Data* block28_data_ref (Block28Data* _data28_);
static void block28_data_unref (void * _userdata_);
VALA_EXTERN AdwActionRow* dc_contact_row (DcContact* c,
                              gboolean activatable);
VALA_EXTERN const gchar* dc_contact_get_address (DcContact* self);
static Block29Data* block29_data_ref (Block29Data* _data29_);
static void block29_data_unref (void * _userdata_);
static void ___lambda105_ (Block29Data* _data29_);
static void ____lambda105__gtk_button_clicked (GtkButton* _sender,
                                        gpointer self);
static Block30Data* block30_data_ref (Block30Data* _data30_);
static void block30_data_unref (void * _userdata_);
static void ___lambda106_ (Block30Data* _data30_);
static void dc_chat_info_dialog_remove_member (DcChatInfoDialog* self,
                                        gint contact_id,
                                        AdwActionRow* row,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_);
static void dc_chat_info_dialog_remove_member_finish (DcChatInfoDialog* self,
                                               GAsyncResult* _res_);
static void ____lambda106__gtk_button_clicked (GtkButton* _sender,
                                        gpointer self);
static Block31Data* block31_data_ref (Block31Data* _data31_);
static void block31_data_unref (void * _userdata_);
static void dc_chat_info_dialog_update_contact_block_row (DcChatInfoDialog* self,
                                                   AdwActionRow* row,
                                                   DcContact* contact);
static void __lambda122_ (Block31Data* _data31_);
VALA_EXTERN gboolean dc_contact_get_is_blocked (DcContact* self);
static void dc_chat_info_dialog_set_contact_blocked (DcChatInfoDialog* self,
                                              DcContact* contact,
                                              AdwActionRow* row,
                                              gboolean blocked,
                                              GAsyncReadyCallback _callback_,
                                              gpointer _user_data_);
static void dc_chat_info_dialog_set_contact_blocked_finish (DcChatInfoDialog* self,
                                                     GAsyncResult* _res_);
static void dc_chat_info_dialog_confirm_block_contact (DcChatInfoDialog* self,
                                                DcContact* contact,
                                                AdwActionRow* row);
static void ___lambda122__adw_action_row_activated (AdwActionRow* _sender,
                                             gpointer self);
static gchar* dc_chat_info_dialog_contact_label (DcContact* contact);
VALA_EXTERN const gchar* dc_contact_get_display_name (DcContact* self);
static Block32Data* block32_data_ref (Block32Data* _data32_);
static void block32_data_unref (void * _userdata_);
static void __lambda103_ (Block32Data* _data32_);
static void ___lambda103__gtk_entry_activate (GtkEntry* _sender,
                                       gpointer self);
static void __lambda104_ (Block32Data* _data32_,
                   const gchar* resp);
static void dc_chat_info_dialog_save_contact_name (DcChatInfoDialog* self,
                                            gint contact_id,
                                            const gchar* new_name,
                                            GtkLabel* name_lbl,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_);
static void dc_chat_info_dialog_save_contact_name_finish (DcChatInfoDialog* self,
                                                   GAsyncResult* _res_);
static void ___lambda104__adw_alert_dialog_response (AdwAlertDialog* _sender,
                                              const gchar* response,
                                              gpointer self);
static void dc_chat_info_dialog_save_contact_name_data_free (gpointer _data);
static gboolean dc_chat_info_dialog_save_contact_name_co (DcChatInfoDialogSaveContactNameData* _data_);
VALA_EXTERN void dc_rpc_client_change_contact_name (DcRpcClient* self,
                                        gint contact_id,
                                        const gchar* name,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_);
VALA_EXTERN void dc_rpc_client_change_contact_name_finish (DcRpcClient* self,
                                               GAsyncResult* _res_,
                                               GError** error);
static void dc_chat_info_dialog_save_contact_name_ready (GObject* source_object,
                                                  GAsyncResult* _res_,
                                                  gpointer _user_data_);
VALA_EXTERN void dc_clear_listbox (GtkListBox* lb);
VALA_EXTERN void dc_show_error (GtkWidget* parent,
                    const gchar* message);
static void dc_chat_info_dialog_remove_member_data_free (gpointer _data);
static gboolean dc_chat_info_dialog_remove_member_co (DcChatInfoDialogRemoveMemberData* _data_);
VALA_EXTERN void dc_rpc_client_remove_contact_from_chat (DcRpcClient* self,
                                             gint chat_id,
                                             gint contact_id,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_);
VALA_EXTERN void dc_rpc_client_remove_contact_from_chat_finish (DcRpcClient* self,
                                                    GAsyncResult* _res_,
                                                    GError** error);
static void dc_chat_info_dialog_remove_member_ready (GObject* source_object,
                                              GAsyncResult* _res_,
                                              gpointer _user_data_);
static void dc_chat_info_dialog_add_member_dialog_data_free (gpointer _data);
static gboolean dc_chat_info_dialog_add_member_dialog_co (DcChatInfoDialogAddMemberDialogData* _data_);
VALA_EXTERN GType dc_contact_picker_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DcContactPickerDialog, g_object_unref)
VALA_EXTERN DcContactPickerDialog* dc_contact_picker_dialog_new (DcRpcClient* rpc,
                                                     GListStore* chat_store,
                                                     const gchar* title);
VALA_EXTERN DcContactPickerDialog* dc_contact_picker_dialog_construct (GType object_type,
                                                           DcRpcClient* rpc,
                                                           GListStore* chat_store,
                                                           const gchar* title);
static void __lambda113_ (DcChatInfoDialog* self,
                   gint contact_id,
                   const gchar* email);
static void dc_chat_info_dialog_do_add_member (DcChatInfoDialog* self,
                                        const gchar* email,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_);
static void dc_chat_info_dialog_do_add_member_finish (DcChatInfoDialog* self,
                                               GAsyncResult* _res_);
static void ___lambda113__dc_contact_picker_dialog_contact_picked (DcContactPickerDialog* _sender,
                                                            gint contact_id,
                                                            const gchar* email,
                                                            gpointer self);
static void dc_chat_info_dialog_do_add_member_data_free (gpointer _data);
static gboolean dc_chat_info_dialog_do_add_member_co (DcChatInfoDialogDoAddMemberData* _data_);
VALA_EXTERN void dc_rpc_client_get_or_create_contact (DcRpcClient* self,
                                          const gchar* email,
                                          GAsyncReadyCallback _callback_,
                                          gpointer _user_data_);
VALA_EXTERN gint dc_rpc_client_get_or_create_contact_finish (DcRpcClient* self,
                                                 GAsyncResult* _res_,
                                                 GError** error);
static void dc_chat_info_dialog_do_add_member_ready (GObject* source_object,
                                              GAsyncResult* _res_,
                                              gpointer _user_data_);
VALA_EXTERN void dc_rpc_client_add_contact_to_chat (DcRpcClient* self,
                                        gint chat_id,
                                        gint contact_id,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_);
VALA_EXTERN void dc_rpc_client_add_contact_to_chat_finish (DcRpcClient* self,
                                               GAsyncResult* _res_,
                                               GError** error);
static Block33Data* block33_data_ref (Block33Data* _data33_);
static void block33_data_unref (void * _userdata_);
VALA_EXTERN void dc_confirm_action (GtkWidget* parent,
                        const gchar* title,
                        const gchar* body,
                        const gchar* action_id,
                        const gchar* action_label,
                        DcVoidFunc on_confirm,
                        gpointer on_confirm_target,
                        GDestroyNotify on_confirm_target_destroy_notify);
static void __lambda123_ (Block33Data* _data33_);
static void ___lambda123__dc_void_func (gpointer self);
static void dc_chat_info_dialog_set_contact_blocked_data_free (gpointer _data);
static gboolean dc_chat_info_dialog_set_contact_blocked_co (DcChatInfoDialogSetContactBlockedData* _data_);
VALA_EXTERN void dc_rpc_client_block_contact (DcRpcClient* self,
                                  gint contact_id,
                                  GAsyncReadyCallback _callback_,
                                  gpointer _user_data_);
VALA_EXTERN void dc_rpc_client_block_contact_finish (DcRpcClient* self,
                                         GAsyncResult* _res_,
                                         GError** error);
static void dc_chat_info_dialog_set_contact_blocked_ready (GObject* source_object,
                                                    GAsyncResult* _res_,
                                                    gpointer _user_data_);
VALA_EXTERN void dc_rpc_client_unblock_contact (DcRpcClient* self,
                                    gint contact_id,
                                    GAsyncReadyCallback _callback_,
                                    gpointer _user_data_);
VALA_EXTERN void dc_rpc_client_unblock_contact_finish (DcRpcClient* self,
                                           GAsyncResult* _res_,
                                           GError** error);
VALA_EXTERN void dc_contact_set_is_blocked (DcContact* self,
                                gboolean value);
static void dc_chat_info_dialog_confirm_clear_history_data_free (gpointer _data);
static gboolean dc_chat_info_dialog_confirm_clear_history_co (DcChatInfoDialogConfirmClearHistoryData* _data_);
static Block34Data* block34_data_ref (Block34Data* _data34_);
static void block34_data_unref (void * _userdata_);
static void __lambda116_ (Block34Data* _data34_);
static void dc_chat_info_dialog_do_clear_history (DcChatInfoDialog* self,
                                           gboolean for_all,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_);
static void dc_chat_info_dialog_do_clear_history_finish (DcChatInfoDialog* self,
                                                  GAsyncResult* _res_);
static void ___lambda116__dc_void_func (gpointer self);
static void dc_chat_info_dialog_do_clear_history_data_free (gpointer _data);
static gboolean dc_chat_info_dialog_do_clear_history_co (DcChatInfoDialogDoClearHistoryData* _data_);
VALA_EXTERN void dc_rpc_client_get_message_ids (DcRpcClient* self,
                                    gint chat_id,
                                    gboolean info_only,
                                    GAsyncReadyCallback _callback_,
                                    gpointer _user_data_);
VALA_EXTERN JsonArray* dc_rpc_client_get_message_ids_finish (DcRpcClient* self,
                                                 GAsyncResult* _res_,
                                                 GError** error);
static void dc_chat_info_dialog_do_clear_history_ready (GObject* source_object,
                                                 GAsyncResult* _res_,
                                                 gpointer _user_data_);
VALA_EXTERN gint* dc_json_ints (JsonArray* arr,
                    gint* result_length1);
VALA_EXTERN void dc_rpc_client_delete_messages_for_all (DcRpcClient* self,
                                            gint* msg_ids,
                                            gint msg_ids_length1,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_);
VALA_EXTERN void dc_rpc_client_delete_messages_for_all_finish (DcRpcClient* self,
                                                   GAsyncResult* _res_,
                                                   GError** error);
VALA_EXTERN void dc_rpc_client_delete_messages (DcRpcClient* self,
                                    gint* msg_ids,
                                    gint msg_ids_length1,
                                    GAsyncReadyCallback _callback_,
                                    gpointer _user_data_);
VALA_EXTERN void dc_rpc_client_delete_messages_finish (DcRpcClient* self,
                                           GAsyncResult* _res_,
                                           GError** error);
static void dc_chat_info_dialog_confirm_leave_group_data_free (gpointer _data);
static gboolean dc_chat_info_dialog_confirm_leave_group_co (DcChatInfoDialogConfirmLeaveGroupData* _data_);
static void __lambda119_ (DcChatInfoDialog* self);
static void dc_chat_info_dialog_do_leave_group (DcChatInfoDialog* self,
                                         GAsyncReadyCallback _callback_,
                                         gpointer _user_data_);
static void dc_chat_info_dialog_do_leave_group_finish (DcChatInfoDialog* self,
                                                GAsyncResult* _res_);
static void ___lambda119__dc_void_func (gpointer self);
static void dc_chat_info_dialog_do_leave_group_data_free (gpointer _data);
static gboolean dc_chat_info_dialog_do_leave_group_co (DcChatInfoDialogDoLeaveGroupData* _data_);
VALA_EXTERN void dc_rpc_client_leave_group (DcRpcClient* self,
                                gint chat_id,
                                GAsyncReadyCallback _callback_,
                                gpointer _user_data_);
VALA_EXTERN void dc_rpc_client_leave_group_finish (DcRpcClient* self,
                                       GAsyncResult* _res_,
                                       GError** error);
static void dc_chat_info_dialog_do_leave_group_ready (GObject* source_object,
                                               GAsyncResult* _res_,
                                               gpointer _user_data_);
static void dc_chat_info_dialog_confirm_disband_group_data_free (gpointer _data);
static gboolean dc_chat_info_dialog_confirm_disband_group_co (DcChatInfoDialogConfirmDisbandGroupData* _data_);
static void __lambda121_ (DcChatInfoDialog* self);
static void dc_chat_info_dialog_do_disband_group (DcChatInfoDialog* self,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_);
static void dc_chat_info_dialog_do_disband_group_finish (DcChatInfoDialog* self,
                                                  GAsyncResult* _res_);
static void ___lambda121__dc_void_func (gpointer self);
static void dc_chat_info_dialog_do_disband_group_data_free (gpointer _data);
static gboolean dc_chat_info_dialog_do_disband_group_co (DcChatInfoDialogDoDisbandGroupData* _data_);
static void dc_chat_info_dialog_do_disband_group_ready (GObject* source_object,
                                                 GAsyncResult* _res_,
                                                 gpointer _user_data_);
VALA_EXTERN void dc_rpc_client_delete_chat (DcRpcClient* self,
                                gint chat_id,
                                GAsyncReadyCallback _callback_,
                                gpointer _user_data_);
VALA_EXTERN void dc_rpc_client_delete_chat_finish (DcRpcClient* self,
                                       GAsyncResult* _res_,
                                       GError** error);
static void dc_chat_info_dialog_confirm_delete_chat_data_free (gpointer _data);
static gboolean dc_chat_info_dialog_confirm_delete_chat_co (DcChatInfoDialogConfirmDeleteChatData* _data_);
static void __lambda125_ (DcChatInfoDialog* self);
static void dc_chat_info_dialog_do_delete_chat_from_dialog (DcChatInfoDialog* self,
                                                     GAsyncReadyCallback _callback_,
                                                     gpointer _user_data_);
static void dc_chat_info_dialog_do_delete_chat_from_dialog_finish (DcChatInfoDialog* self,
                                                            GAsyncResult* _res_);
static void ___lambda125__dc_void_func (gpointer self);
static void dc_chat_info_dialog_do_delete_chat_from_dialog_data_free (gpointer _data);
static gboolean dc_chat_info_dialog_do_delete_chat_from_dialog_co (DcChatInfoDialogDoDeleteChatFromDialogData* _data_);
static void dc_chat_info_dialog_do_delete_chat_from_dialog_ready (GObject* source_object,
                                                           GAsyncResult* _res_,
                                                           gpointer _user_data_);
static void dc_chat_info_dialog_pick_avatar_data_free (gpointer _data);
static gboolean dc_chat_info_dialog_pick_avatar_co (DcChatInfoDialogPickAvatarData* _data_);
VALA_EXTERN void dc_pick_image_file (GtkWindow* parent,
                         const gchar* title,
                         GAsyncReadyCallback _callback_,
                         gpointer _user_data_);
VALA_EXTERN gchar* dc_pick_image_file_finish (GAsyncResult* _res_);
static void dc_chat_info_dialog_pick_avatar_ready (GObject* source_object,
                                            GAsyncResult* _res_,
                                            gpointer _user_data_);
VALA_EXTERN void dc_rpc_client_set_chat_profile_image (DcRpcClient* self,
                                           gint chat_id,
                                           const gchar* image_path,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_);
VALA_EXTERN void dc_rpc_client_set_chat_profile_image_finish (DcRpcClient* self,
                                                  GAsyncResult* _res_,
                                                  GError** error);
static void dc_chat_info_dialog_finalize (GObject * obj);
static GType dc_chat_info_dialog_get_type_once (void);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
dc_chat_info_dialog_get_instance_private (DcChatInfoDialog* self)
{
	return G_STRUCT_MEMBER_P (self, DcChatInfoDialog_private_offset);
}

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

DcChatInfoDialog*
dc_chat_info_dialog_construct (GType object_type,
                               DcRpcClient* rpc,
                               gint chat_id)
{
	DcChatInfoDialog * self = NULL;
	DcRpcClient* _tmp0_;
	GtkBox* box = NULL;
	GtkBox* _tmp1_;
	AdwHeaderBar* header = NULL;
	AdwHeaderBar* _tmp2_;
	GtkBox* _tmp3_;
	GtkBox* _tmp4_;
	GtkBox* _tmp5_;
	GtkBox* _tmp6_;
	GtkBox* _tmp7_;
	GtkSpinner* spinner = NULL;
	GtkSpinner* _tmp8_;
	GtkBox* _tmp9_;
	GtkScrolledWindow* scroll = NULL;
	GtkScrolledWindow* _tmp10_;
	GtkBox* _tmp11_;
	g_return_val_if_fail (rpc != NULL, NULL);
	self = (DcChatInfoDialog*) g_object_new (object_type, NULL);
	_tmp0_ = _g_object_ref0 (rpc);
	_g_object_unref0 (self->priv->rpc);
	self->priv->rpc = _tmp0_;
	self->priv->chat_id = chat_id;
	adw_dialog_set_title ((AdwDialog*) self, "Chat Info");
	adw_dialog_set_content_width ((AdwDialog*) self, 360);
	adw_dialog_set_content_height ((AdwDialog*) self, 500);
	_tmp1_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp1_);
	box = _tmp1_;
	_tmp2_ = (AdwHeaderBar*) adw_header_bar_new ();
	g_object_ref_sink (_tmp2_);
	header = _tmp2_;
	adw_header_bar_set_show_end_title_buttons (header, TRUE);
	gtk_box_append (box, (GtkWidget*) header);
	_tmp3_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->content);
	self->priv->content = _tmp3_;
	_tmp4_ = self->priv->content;
	gtk_widget_set_margin_start ((GtkWidget*) _tmp4_, 16);
	_tmp5_ = self->priv->content;
	gtk_widget_set_margin_end ((GtkWidget*) _tmp5_, 16);
	_tmp6_ = self->priv->content;
	gtk_widget_set_margin_top ((GtkWidget*) _tmp6_, 12);
	_tmp7_ = self->priv->content;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp7_, 16);
	_tmp8_ = (GtkSpinner*) gtk_spinner_new ();
	g_object_ref_sink (_tmp8_);
	spinner = _tmp8_;
	gtk_spinner_set_spinning (spinner, TRUE);
	gtk_widget_set_halign ((GtkWidget*) spinner, GTK_ALIGN_CENTER);
	gtk_widget_set_margin_top ((GtkWidget*) spinner, 40);
	_tmp9_ = self->priv->content;
	gtk_box_append (_tmp9_, (GtkWidget*) spinner);
	_tmp10_ = (GtkScrolledWindow*) gtk_scrolled_window_new ();
	g_object_ref_sink (_tmp10_);
	scroll = _tmp10_;
	gtk_widget_set_vexpand ((GtkWidget*) scroll, TRUE);
	g_object_set (scroll, "hscrollbar-policy", GTK_POLICY_NEVER, NULL);
	_tmp11_ = self->priv->content;
	gtk_scrolled_window_set_child (scroll, (GtkWidget*) _tmp11_);
	gtk_box_append (box, (GtkWidget*) scroll);
	adw_dialog_set_child ((AdwDialog*) self, (GtkWidget*) box);
	dc_chat_info_dialog_load_info (self, spinner, NULL, NULL);
	_g_object_unref0 (scroll);
	_g_object_unref0 (spinner);
	_g_object_unref0 (header);
	_g_object_unref0 (box);
	return self;
}

DcChatInfoDialog*
dc_chat_info_dialog_new (DcRpcClient* rpc,
                         gint chat_id)
{
	return dc_chat_info_dialog_construct (DC_TYPE_CHAT_INFO_DIALOG, rpc, chat_id);
}

static void
dc_chat_info_dialog_load_info_data_free (gpointer _data)
{
	DcChatInfoDialogLoadInfoData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->spinner);
	_g_object_unref0 (_data_->self);
	g_slice_free (DcChatInfoDialogLoadInfoData, _data_);
}

static void
dc_chat_info_dialog_load_info (DcChatInfoDialog* self,
                               GtkSpinner* spinner,
                               GAsyncReadyCallback _callback_,
                               gpointer _user_data_)
{
	DcChatInfoDialogLoadInfoData* _data_;
	DcChatInfoDialog* _tmp0_;
	GtkSpinner* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (spinner != NULL);
	_data_ = g_slice_new0 (DcChatInfoDialogLoadInfoData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, dc_chat_info_dialog_load_info_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (spinner);
	_g_object_unref0 (_data_->spinner);
	_data_->spinner = _tmp1_;
	dc_chat_info_dialog_load_info_co (_data_);
}

static void
dc_chat_info_dialog_load_info_finish (DcChatInfoDialog* self,
                                      GAsyncResult* _res_)
{
	DcChatInfoDialogLoadInfoData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static Block27Data*
block27_data_ref (Block27Data* _data27_)
{
	g_atomic_int_inc (&_data27_->_ref_count_);
	return _data27_;
}

static void
block27_data_unref (void * _userdata_)
{
	Block27Data* _data27_;
	_data27_ = (Block27Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data27_->_ref_count_)) {
		DcChatInfoDialog* self;
		self = _data27_->self;
		_g_object_unref0 (_data27_->combo);
		_data27_->timer_values = (g_free (_data27_->timer_values), NULL);
		_g_object_unref0 (_data27_->name_lbl);
		_g_object_unref0 (self);
		g_slice_free (Block27Data, _data27_);
	}
}

static void
dc_chat_info_dialog_load_info_ready (GObject* source_object,
                                     GAsyncResult* _res_,
                                     gpointer _user_data_)
{
	DcChatInfoDialogLoadInfoData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	dc_chat_info_dialog_load_info_co (_data_);
}

static gpointer
_json_array_ref0 (gpointer self)
{
	return self ? json_array_ref (self) : NULL;
}

static void
____lambda101_ (DcChatInfoDialog* self)
{
	dc_chat_info_dialog_pick_avatar (self, NULL, NULL);
}

static void
_____lambda101__gtk_button_clicked (GtkButton* _sender,
                                    gpointer self)
{
	____lambda101_ ((DcChatInfoDialog*) self);
}

static void
____lambda102_ (Block27Data* _data27_)
{
	DcChatInfoDialog* self;
	GtkLabel* _tmp0_;
	self = _data27_->self;
	_tmp0_ = _data27_->name_lbl;
	dc_chat_info_dialog_show_edit_contact_name_dialog (self, _data27_->dm_contact_id, _tmp0_);
}

static void
_____lambda102__gtk_button_clicked (GtkButton* _sender,
                                    gpointer self)
{
	____lambda102_ (self);
}

static void
____lambda107_ (DcChatInfoDialog* self)
{
	DcInviteCodeDialog* dialog = NULL;
	DcRpcClient* _tmp0_;
	DcRpcClient* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	DcInviteCodeDialog* _tmp4_;
	_tmp0_ = self->priv->rpc;
	_tmp1_ = self->priv->rpc;
	_tmp2_ = dc_rpc_client_get_account_id (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = dc_invite_code_dialog_new (_tmp0_, _tmp3_, self->priv->chat_id);
	g_object_ref_sink (_tmp4_);
	dialog = _tmp4_;
	adw_dialog_present ((AdwDialog*) dialog, (GtkWidget*) self);
	_g_object_unref0 (dialog);
}

static void
_____lambda107__adw_action_row_activated (AdwActionRow* _sender,
                                          gpointer self)
{
	____lambda107_ ((DcChatInfoDialog*) self);
}

static void
___lambda111_ (Block27Data* _data27_)
{
	DcChatInfoDialog* self;
	guint idx = 0U;
	GtkDropDown* _tmp0_;
	guint _tmp1_;
	guint _tmp2_;
	gint* _tmp3_;
	gint _tmp3__length1;
	self = _data27_->self;
	_tmp0_ = _data27_->combo;
	_tmp1_ = gtk_drop_down_get_selected (_tmp0_);
	_tmp2_ = _tmp1_;
	idx = _tmp2_;
	_tmp3_ = _data27_->timer_values;
	_tmp3__length1 = _data27_->timer_values_length1;
	if (idx < ((guint) _tmp3__length1)) {
		DcRpcClient* _tmp4_;
		gint* _tmp5_;
		gint _tmp5__length1;
		gint _tmp6_;
		_tmp4_ = self->priv->rpc;
		_tmp5_ = _data27_->timer_values;
		_tmp5__length1 = _data27_->timer_values_length1;
		_tmp6_ = _tmp5_[(gint) idx];
		dc_rpc_client_set_chat_ephemeral_timer (_tmp4_, self->priv->chat_id, _tmp6_, NULL, NULL);
	}
}

static void
____lambda111__g_object_notify (GObject* _sender,
                                GParamSpec* pspec,
                                gpointer self)
{
	___lambda111_ (self);
}

static void
_____lambda112_ (DcChatInfoDialog* self)
{
	dc_chat_info_dialog_add_member_dialog (self, NULL, NULL);
}

static void
______lambda112__gtk_button_clicked (GtkButton* _sender,
                                     gpointer self)
{
	_____lambda112_ ((DcChatInfoDialog*) self);
}

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

static void
___lambda114_ (DcChatInfoDialog* self)
{
	dc_chat_info_dialog_confirm_clear_history (self, FALSE, NULL, NULL);
}

static void
____lambda114__gtk_button_clicked (GtkButton* _sender,
                                   gpointer self)
{
	___lambda114_ ((DcChatInfoDialog*) self);
}

static void
___lambda117_ (DcChatInfoDialog* self)
{
	dc_chat_info_dialog_confirm_clear_history (self, TRUE, NULL, NULL);
}

static void
____lambda117__gtk_button_clicked (GtkButton* _sender,
                                   gpointer self)
{
	___lambda117_ ((DcChatInfoDialog*) self);
}

static void
____lambda118_ (DcChatInfoDialog* self)
{
	dc_chat_info_dialog_confirm_leave_group (self, NULL, NULL);
}

static void
_____lambda118__adw_action_row_activated (AdwActionRow* _sender,
                                          gpointer self)
{
	____lambda118_ ((DcChatInfoDialog*) self);
}

static void
____lambda120_ (DcChatInfoDialog* self)
{
	dc_chat_info_dialog_confirm_disband_group (self, NULL, NULL);
}

static void
_____lambda120__adw_action_row_activated (AdwActionRow* _sender,
                                          gpointer self)
{
	____lambda120_ ((DcChatInfoDialog*) self);
}

static void
___lambda124_ (DcChatInfoDialog* self)
{
	dc_chat_info_dialog_confirm_delete_chat (self, NULL, NULL);
}

static void
____lambda124__adw_action_row_activated (AdwActionRow* _sender,
                                         gpointer self)
{
	___lambda124_ ((DcChatInfoDialog*) self);
}

static gboolean
dc_chat_info_dialog_load_info_co (DcChatInfoDialogLoadInfoData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_data27_ = g_slice_new0 (Block27Data);
		_data_->_data27_->_ref_count_ = 1;
		_data_->_data27_->self = g_object_ref (_data_->self);
		_data_->_tmp0_ = _data_->self->priv->rpc;
		_data_->_state_ = 1;
		dc_rpc_client_get_full_chat_by_id (_data_->_tmp0_, _data_->self->priv->chat_id, dc_chat_info_dialog_load_info_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp1_ = dc_rpc_client_get_full_chat_by_id_finish (_data_->_tmp0_, _data_->_res_, &_data_->_inner_error0_);
		_data_->chat = _data_->_tmp1_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			block27_data_unref (_data_->_data27_);
			_data_->_data27_ = NULL;
			goto __catch0_g_error;
		}
		_data_->_tmp2_ = _data_->chat;
		if (_data_->_tmp2_ == NULL) {
			_json_object_unref0 (_data_->chat);
			block27_data_unref (_data_->_data27_);
			_data_->_data27_ = 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;
		}
		gtk_widget_set_visible ((GtkWidget*) _data_->spinner, FALSE);
		_data_->_tmp4_ = _data_->chat;
		_data_->_tmp5_ = dc_json_str (_data_->_tmp4_, "name");
		_data_->_tmp3_ = _data_->_tmp5_;
		if (_data_->_tmp3_ == NULL) {
			_data_->_tmp6_ = g_strdup ("Chat");
			_g_free0 (_data_->_tmp3_);
			_data_->_tmp3_ = _data_->_tmp6_;
		}
		_data_->_tmp7_ = _data_->_tmp3_;
		_data_->_tmp3_ = NULL;
		_data_->name = _data_->_tmp7_;
		_data_->_tmp9_ = _data_->chat;
		_data_->_tmp10_ = dc_json_str (_data_->_tmp9_, "chatType");
		_data_->_tmp8_ = _data_->_tmp10_;
		if (_data_->_tmp8_ == NULL) {
			_data_->_tmp11_ = g_strdup ("");
			_g_free0 (_data_->_tmp8_);
			_data_->_tmp8_ = _data_->_tmp11_;
		}
		_data_->_tmp12_ = _data_->_tmp8_;
		_data_->_tmp8_ = NULL;
		_data_->chat_type = _data_->_tmp12_;
		_data_->_tmp13_ = _data_->chat;
		_data_->_tmp14_ = dc_json_str (_data_->_tmp13_, "profileImage");
		_data_->profile_image = _data_->_tmp14_;
		_data_->_tmp15_ = _data_->chat;
		_data_->encrypted = dc_json_bool (_data_->_tmp15_, "isEncrypted");
		_data_->_tmp18_ = _data_->chat_type;
		if (g_strcmp0 (_data_->_tmp18_, "Single") == 0) {
			_data_->_tmp19_ = _data_->chat;
			_data_->_tmp17_ = !dc_json_bool (_data_->_tmp19_, "isSelfTalk");
		} else {
			_data_->_tmp17_ = FALSE;
		}
		if (_data_->_tmp17_) {
			_data_->_tmp20_ = _data_->chat;
			_data_->_tmp16_ = !dc_json_bool (_data_->_tmp20_, "isDeviceChat");
		} else {
			_data_->_tmp16_ = FALSE;
		}
		_data_->is_dm_chat = _data_->_tmp16_;
		_data_->_tmp22_ = _data_->chat_type;
		if (g_strcmp0 (_data_->_tmp22_, "Group") == 0) {
			_data_->_tmp21_ = TRUE;
		} else {
			_data_->_tmp23_ = _data_->chat_type;
			_data_->_tmp21_ = g_strcmp0 (_data_->_tmp23_, "Broadcast") == 0;
		}
		_data_->self->priv->is_group = _data_->_tmp21_;
		_data_->_tmp24_ = _data_->name;
		_data_->_tmp25_ = g_strdup (_data_->_tmp24_);
		_g_free0 (_data_->self->priv->chat_name);
		_data_->self->priv->chat_name = _data_->_tmp25_;
		_g_object_unref0 (_data_->self->priv->dm_contact);
		_data_->self->priv->dm_contact = NULL;
		_data_->_data27_->dm_contact_id = 0;
		if (_data_->is_dm_chat) {
			_data_->_tmp27_ = _data_->chat;
			_data_->_tmp26_ = json_object_has_member (_data_->_tmp27_, "contactIds");
		} else {
			_data_->_tmp26_ = FALSE;
		}
		if (_data_->_tmp26_) {
			_data_->_tmp28_ = _data_->chat;
			_data_->_tmp29_ = json_object_get_array_member (_data_->_tmp28_, "contactIds");
			_data_->_tmp30_ = _json_array_ref0 (_data_->_tmp29_);
			_data_->ids = _data_->_tmp30_;
			_data_->_tmp31_ = _data_->ids;
			if (json_array_get_length (_data_->_tmp31_) > ((guint) 0)) {
				_data_->_tmp32_ = _data_->ids;
				_data_->_data27_->dm_contact_id = (gint) json_array_get_int_element (_data_->_tmp32_, (guint) 0);
			}
			_json_array_unref0 (_data_->ids);
		}
		_data_->_tmp33_ = _data_->name;
		_data_->_tmp34_ = (AdwAvatar*) adw_avatar_new (80, _data_->_tmp33_, TRUE);
		g_object_ref_sink (_data_->_tmp34_);
		_data_->avatar = _data_->_tmp34_;
		_data_->_tmp35_ = _data_->avatar;
		_data_->_tmp36_ = _data_->profile_image;
		_data_->_tmp37_ = dc_load_avatar (_data_->_tmp36_);
		_data_->_tmp38_ = _data_->_tmp37_;
		adw_avatar_set_custom_image (_data_->_tmp35_, (GdkPaintable*) _data_->_tmp38_);
		_g_object_unref0 (_data_->_tmp38_);
		_data_->_tmp39_ = _data_->avatar;
		gtk_widget_set_halign ((GtkWidget*) _data_->_tmp39_, GTK_ALIGN_CENTER);
		_data_->_tmp40_ = _data_->self->priv->content;
		_data_->_tmp41_ = _data_->avatar;
		gtk_box_append (_data_->_tmp40_, (GtkWidget*) _data_->_tmp41_);
		if (_data_->self->priv->is_group) {
			_data_->_tmp42_ = (GtkButton*) gtk_button_new_with_label ("Change Avatar");
			g_object_ref_sink (_data_->_tmp42_);
			_data_->change_avatar_btn = _data_->_tmp42_;
			_data_->_tmp43_ = _data_->change_avatar_btn;
			gtk_widget_set_halign ((GtkWidget*) _data_->_tmp43_, GTK_ALIGN_CENTER);
			_data_->_tmp44_ = _data_->change_avatar_btn;
			gtk_widget_add_css_class ((GtkWidget*) _data_->_tmp44_, "flat");
			_data_->_tmp45_ = _data_->change_avatar_btn;
			g_signal_connect_object (_data_->_tmp45_, "clicked", (GCallback) _____lambda101__gtk_button_clicked, _data_->self, 0);
			_data_->_tmp46_ = _data_->self->priv->content;
			_data_->_tmp47_ = _data_->change_avatar_btn;
			gtk_box_append (_data_->_tmp46_, (GtkWidget*) _data_->_tmp47_);
			_g_object_unref0 (_data_->change_avatar_btn);
		}
		_data_->_tmp48_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
		g_object_ref_sink (_data_->_tmp48_);
		_data_->name_box = _data_->_tmp48_;
		_data_->_tmp49_ = _data_->name_box;
		gtk_widget_set_halign ((GtkWidget*) _data_->_tmp49_, GTK_ALIGN_CENTER);
		_data_->_tmp50_ = _data_->name;
		_data_->_tmp51_ = (GtkLabel*) gtk_label_new (_data_->_tmp50_);
		g_object_ref_sink (_data_->_tmp51_);
		_data_->_data27_->name_lbl = _data_->_tmp51_;
		_data_->_tmp52_ = _data_->_data27_->name_lbl;
		gtk_widget_add_css_class ((GtkWidget*) _data_->_tmp52_, "title-1");
		_data_->_tmp53_ = _data_->_data27_->name_lbl;
		gtk_label_set_ellipsize (_data_->_tmp53_, PANGO_ELLIPSIZE_END);
		_data_->_tmp54_ = _data_->_data27_->name_lbl;
		gtk_label_set_max_width_chars (_data_->_tmp54_, 24);
		_data_->_tmp55_ = _data_->name_box;
		_data_->_tmp56_ = _data_->_data27_->name_lbl;
		gtk_box_append (_data_->_tmp55_, (GtkWidget*) _data_->_tmp56_);
		if (_data_->is_dm_chat) {
			_data_->_tmp57_ = _data_->_data27_->dm_contact_id > 1;
		} else {
			_data_->_tmp57_ = FALSE;
		}
		if (_data_->_tmp57_) {
			_data_->_tmp58_ = (GtkButton*) gtk_button_new_from_icon_name ("document-edit-symbolic");
			g_object_ref_sink (_data_->_tmp58_);
			_data_->edit_name_btn = _data_->_tmp58_;
			_data_->_tmp59_ = _data_->edit_name_btn;
			gtk_widget_add_css_class ((GtkWidget*) _data_->_tmp59_, "flat");
			_data_->_tmp60_ = _data_->edit_name_btn;
			gtk_widget_set_tooltip_text ((GtkWidget*) _data_->_tmp60_, "Edit contact name");
			_data_->_tmp61_ = _data_->edit_name_btn;
			g_signal_connect_data (_data_->_tmp61_, "clicked", (GCallback) _____lambda102__gtk_button_clicked, block27_data_ref (_data_->_data27_), (GClosureNotify) block27_data_unref, 0);
			_data_->_tmp62_ = _data_->name_box;
			_data_->_tmp63_ = _data_->edit_name_btn;
			gtk_box_append (_data_->_tmp62_, (GtkWidget*) _data_->_tmp63_);
			_g_object_unref0 (_data_->edit_name_btn);
		}
		_data_->_tmp64_ = _data_->self->priv->content;
		_data_->_tmp65_ = _data_->name_box;
		gtk_box_append (_data_->_tmp64_, (GtkWidget*) _data_->_tmp65_);
		_data_->_tmp66_ = _data_->chat_type;
		_data_->_tmp67_ = g_strdup (_data_->_tmp66_);
		_data_->type_str = _data_->_tmp67_;
		if (_data_->encrypted) {
			_data_->_tmp68_ = _data_->type_str;
			_data_->_tmp69_ = g_strconcat (_data_->_tmp68_, " (encrypted)", NULL);
			_g_free0 (_data_->type_str);
			_data_->type_str = _data_->_tmp69_;
		}
		_data_->_tmp70_ = _data_->type_str;
		_data_->_tmp71_ = (GtkLabel*) gtk_label_new (_data_->_tmp70_);
		g_object_ref_sink (_data_->_tmp71_);
		_data_->type_lbl = _data_->_tmp71_;
		_data_->_tmp72_ = _data_->type_lbl;
		gtk_widget_add_css_class ((GtkWidget*) _data_->_tmp72_, "dim-label");
		_data_->_tmp73_ = _data_->type_lbl;
		gtk_widget_set_halign ((GtkWidget*) _data_->_tmp73_, GTK_ALIGN_CENTER);
		_data_->_tmp74_ = _data_->self->priv->content;
		_data_->_tmp75_ = _data_->type_lbl;
		gtk_box_append (_data_->_tmp74_, (GtkWidget*) _data_->_tmp75_);
		if (_data_->self->priv->is_group) {
			_data_->_tmp76_ = (GtkListBox*) gtk_list_box_new ();
			g_object_ref_sink (_data_->_tmp76_);
			_data_->invite_list = _data_->_tmp76_;
			_data_->_tmp77_ = _data_->invite_list;
			gtk_list_box_set_selection_mode (_data_->_tmp77_, GTK_SELECTION_NONE);
			_data_->_tmp78_ = _data_->invite_list;
			gtk_widget_add_css_class ((GtkWidget*) _data_->_tmp78_, "boxed-list");
			_data_->_tmp79_ = (AdwActionRow*) adw_action_row_new ();
			g_object_ref_sink (_data_->_tmp79_);
			_data_->invite_row = _data_->_tmp79_;
			_data_->_tmp80_ = _data_->invite_row;
			adw_preferences_row_set_title ((AdwPreferencesRow*) _data_->_tmp80_, "Invite Link");
			_data_->_tmp81_ = _data_->invite_row;
			adw_action_row_set_subtitle (_data_->_tmp81_, "Share a link or QR code for others to join");
			_data_->_tmp82_ = _data_->invite_row;
			_data_->_tmp83_ = (GtkImage*) gtk_image_new_from_icon_name ("mail-forward-symbolic");
			g_object_ref_sink (_data_->_tmp83_);
			_data_->_tmp84_ = _data_->_tmp83_;
			adw_action_row_add_prefix (_data_->_tmp82_, (GtkWidget*) _data_->_tmp84_);
			_g_object_unref0 (_data_->_tmp84_);
			_data_->_tmp85_ = _data_->invite_row;
			gtk_list_box_row_set_activatable ((GtkListBoxRow*) _data_->_tmp85_, TRUE);
			_data_->_tmp86_ = _data_->invite_row;
			g_signal_connect_object (_data_->_tmp86_, "activated", (GCallback) _____lambda107__adw_action_row_activated, _data_->self, 0);
			_data_->_tmp87_ = _data_->invite_list;
			_data_->_tmp88_ = _data_->invite_row;
			gtk_list_box_append (_data_->_tmp87_, (GtkWidget*) _data_->_tmp88_);
			_data_->_tmp89_ = _data_->self->priv->content;
			_data_->_tmp90_ = _data_->invite_list;
			gtk_box_append (_data_->_tmp89_, (GtkWidget*) _data_->_tmp90_);
			_g_object_unref0 (_data_->invite_row);
			_g_object_unref0 (_data_->invite_list);
		}
		_data_->_tmp91_ = _data_->chat;
		_data_->ephemeral_timer = (gint) dc_json_int (_data_->_tmp91_, "ephemeralTimer", (gint64) 0);
		_data_->_tmp92_ = (AdwActionRow*) adw_action_row_new ();
		g_object_ref_sink (_data_->_tmp92_);
		_data_->ephem_row = _data_->_tmp92_;
		_data_->_tmp93_ = _data_->ephem_row;
		adw_preferences_row_set_title ((AdwPreferencesRow*) _data_->_tmp93_, "Disappearing messages");
		_data_->_tmp94_ = g_new0 (gint, 9);
		_data_->_tmp94_[0] = 0;
		_data_->_tmp94_[1] = 60;
		_data_->_tmp94_[2] = 300;
		_data_->_tmp94_[3] = 1800;
		_data_->_tmp94_[4] = 3600;
		_data_->_tmp94_[5] = 21600;
		_data_->_tmp94_[6] = 86400;
		_data_->_tmp94_[7] = 604800;
		_data_->_tmp94_[8] = 2419200;
		_data_->_data27_->timer_values = _data_->_tmp94_;
		_data_->_data27_->timer_values_length1 = 9;
		_data_->_data27_->_timer_values_size_ = _data_->_data27_->timer_values_length1;
		_data_->_tmp95_ = g_strdup ("Off");
		_data_->_tmp96_ = g_strdup ("1 minute");
		_data_->_tmp97_ = g_strdup ("5 minutes");
		_data_->_tmp98_ = g_strdup ("30 minutes");
		_data_->_tmp99_ = g_strdup ("1 hour");
		_data_->_tmp100_ = g_strdup ("6 hours");
		_data_->_tmp101_ = g_strdup ("1 day");
		_data_->_tmp102_ = g_strdup ("1 week");
		_data_->_tmp103_ = g_strdup ("4 weeks");
		_data_->_tmp104_ = g_new0 (gchar*, 9 + 1);
		_data_->_tmp104_[0] = _data_->_tmp95_;
		_data_->_tmp104_[1] = _data_->_tmp96_;
		_data_->_tmp104_[2] = _data_->_tmp97_;
		_data_->_tmp104_[3] = _data_->_tmp98_;
		_data_->_tmp104_[4] = _data_->_tmp99_;
		_data_->_tmp104_[5] = _data_->_tmp100_;
		_data_->_tmp104_[6] = _data_->_tmp101_;
		_data_->_tmp104_[7] = _data_->_tmp102_;
		_data_->_tmp104_[8] = _data_->_tmp103_;
		_data_->timer_labels = _data_->_tmp104_;
		_data_->timer_labels_length1 = 9;
		_data_->_timer_labels_size_ = _data_->timer_labels_length1;
		_data_->active_idx = 0;
		{
			_data_->i = 0;
			{
				_data_->_tmp105_ = TRUE;
				while (TRUE) {
					if (!_data_->_tmp105_) {
						_data_->_tmp106_ = _data_->i;
						_data_->i = _data_->_tmp106_ + 1;
					}
					_data_->_tmp105_ = FALSE;
					_data_->_tmp107_ = _data_->_data27_->timer_values;
					_data_->_tmp107__length1 = _data_->_data27_->timer_values_length1;
					if (!(_data_->i < _data_->_tmp107__length1)) {
						break;
					}
					_data_->_tmp108_ = _data_->_data27_->timer_values;
					_data_->_tmp108__length1 = _data_->_data27_->timer_values_length1;
					_data_->_tmp109_ = _data_->_tmp108_[_data_->i];
					if (_data_->_tmp109_ == _data_->ephemeral_timer) {
						_data_->active_idx = _data_->i;
					}
				}
			}
		}
		_data_->_tmp110_ = _data_->timer_labels;
		_data_->_tmp110__length1 = _data_->timer_labels_length1;
		_data_->_tmp111_ = (GtkDropDown*) gtk_drop_down_new_from_strings (_data_->_tmp110_);
		g_object_ref_sink (_data_->_tmp111_);
		_data_->_data27_->combo = _data_->_tmp111_;
		_data_->_tmp112_ = _data_->_data27_->combo;
		gtk_drop_down_set_selected (_data_->_tmp112_, (guint) _data_->active_idx);
		_data_->_tmp113_ = _data_->_data27_->combo;
		gtk_widget_set_valign ((GtkWidget*) _data_->_tmp113_, GTK_ALIGN_CENTER);
		_data_->_tmp114_ = _data_->_data27_->combo;
		g_signal_connect_data ((GObject*) _data_->_tmp114_, "notify::selected", (GCallback) ____lambda111__g_object_notify, block27_data_ref (_data_->_data27_), (GClosureNotify) block27_data_unref, 0);
		_data_->_tmp115_ = _data_->ephem_row;
		_data_->_tmp116_ = _data_->_data27_->combo;
		adw_action_row_add_suffix (_data_->_tmp115_, (GtkWidget*) _data_->_tmp116_);
		_data_->_tmp117_ = _data_->ephem_row;
		_data_->_tmp118_ = _data_->_data27_->combo;
		adw_action_row_set_activatable_widget (_data_->_tmp117_, (GtkWidget*) _data_->_tmp118_);
		_data_->_tmp119_ = (GtkListBox*) gtk_list_box_new ();
		g_object_ref_sink (_data_->_tmp119_);
		_data_->ephem_list = _data_->_tmp119_;
		_data_->_tmp120_ = _data_->ephem_list;
		gtk_list_box_set_selection_mode (_data_->_tmp120_, GTK_SELECTION_NONE);
		_data_->_tmp121_ = _data_->ephem_list;
		gtk_widget_add_css_class ((GtkWidget*) _data_->_tmp121_, "boxed-list");
		_data_->_tmp122_ = _data_->ephem_list;
		_data_->_tmp123_ = _data_->ephem_row;
		gtk_list_box_append (_data_->_tmp122_, (GtkWidget*) _data_->_tmp123_);
		_data_->_tmp124_ = _data_->self->priv->content;
		_data_->_tmp125_ = _data_->ephem_list;
		gtk_box_append (_data_->_tmp124_, (GtkWidget*) _data_->_tmp125_);
		_data_->_tmp126_ = _data_->self->priv->content;
		_data_->_tmp127_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
		g_object_ref_sink (_data_->_tmp127_);
		_data_->_tmp128_ = _data_->_tmp127_;
		gtk_box_append (_data_->_tmp126_, (GtkWidget*) _data_->_tmp128_);
		_g_object_unref0 (_data_->_tmp128_);
		_data_->_tmp129_ = _data_->chat;
		if (json_object_has_member (_data_->_tmp129_, "contactIds")) {
			_data_->_tmp130_ = _data_->chat;
			_data_->_tmp131_ = json_object_get_array_member (_data_->_tmp130_, "contactIds");
			_data_->_tmp132_ = _json_array_ref0 (_data_->_tmp131_);
			_data_->_vala1_ids = _data_->_tmp132_;
			_data_->_tmp133_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
			g_object_ref_sink (_data_->_tmp133_);
			_data_->header_box = _data_->_tmp133_;
			if (_data_->self->priv->is_group) {
				_data_->_tmp135_ = _data_->_vala1_ids;
				_data_->_tmp136_ = g_strdup_printf ("Members (%u)", json_array_get_length (_data_->_tmp135_));
				_g_free0 (_data_->_tmp134_);
				_data_->_tmp134_ = _data_->_tmp136_;
			} else {
				_data_->_tmp137_ = g_strdup ("Contact");
				_g_free0 (_data_->_tmp134_);
				_data_->_tmp134_ = _data_->_tmp137_;
			}
			_data_->_tmp138_ = (GtkLabel*) gtk_label_new (_data_->_tmp134_);
			g_object_ref_sink (_data_->_tmp138_);
			_data_->members_lbl = _data_->_tmp138_;
			_data_->_tmp139_ = _data_->members_lbl;
			gtk_widget_add_css_class ((GtkWidget*) _data_->_tmp139_, "heading");
			_data_->_tmp140_ = _data_->members_lbl;
			gtk_widget_set_halign ((GtkWidget*) _data_->_tmp140_, GTK_ALIGN_START);
			_data_->_tmp141_ = _data_->members_lbl;
			gtk_widget_set_hexpand ((GtkWidget*) _data_->_tmp141_, TRUE);
			_data_->_tmp142_ = _data_->header_box;
			_data_->_tmp143_ = _data_->members_lbl;
			gtk_box_append (_data_->_tmp142_, (GtkWidget*) _data_->_tmp143_);
			if (_data_->self->priv->is_group) {
				_data_->_tmp144_ = (GtkButton*) gtk_button_new_from_icon_name ("list-add-symbolic");
				g_object_ref_sink (_data_->_tmp144_);
				_data_->add_btn = _data_->_tmp144_;
				_data_->_tmp145_ = _data_->add_btn;
				gtk_widget_set_tooltip_text ((GtkWidget*) _data_->_tmp145_, "Add member");
				_data_->_tmp146_ = _data_->add_btn;
				gtk_widget_add_css_class ((GtkWidget*) _data_->_tmp146_, "flat");
				_data_->_tmp147_ = _data_->add_btn;
				g_signal_connect_object (_data_->_tmp147_, "clicked", (GCallback) ______lambda112__gtk_button_clicked, _data_->self, 0);
				_data_->_tmp148_ = _data_->header_box;
				_data_->_tmp149_ = _data_->add_btn;
				gtk_box_append (_data_->_tmp148_, (GtkWidget*) _data_->_tmp149_);
				_g_object_unref0 (_data_->add_btn);
			}
			_data_->_tmp150_ = _data_->self->priv->content;
			_data_->_tmp151_ = _data_->header_box;
			gtk_box_append (_data_->_tmp150_, (GtkWidget*) _data_->_tmp151_);
			_data_->_tmp152_ = (GtkListBox*) gtk_list_box_new ();
			g_object_ref_sink (_data_->_tmp152_);
			_g_object_unref0 (_data_->self->priv->members_list);
			_data_->self->priv->members_list = _data_->_tmp152_;
			_data_->_tmp153_ = _data_->self->priv->members_list;
			gtk_list_box_set_selection_mode (_data_->_tmp153_, GTK_SELECTION_NONE);
			_data_->_tmp154_ = _data_->self->priv->members_list;
			gtk_widget_add_css_class ((GtkWidget*) _data_->_tmp154_, "boxed-list");
			{
				_data_->_vala1_i = (guint) 0;
				{
					_data_->_tmp155_ = TRUE;
					while (TRUE) {
						if (!_data_->_tmp155_) {
							_data_->_tmp156_ = _data_->_vala1_i;
							_data_->_vala1_i = _data_->_tmp156_ + 1;
						}
						_data_->_tmp155_ = FALSE;
						_data_->_tmp157_ = _data_->_vala1_ids;
						if (!(_data_->_vala1_i < json_array_get_length (_data_->_tmp157_))) {
							break;
						}
						_data_->_tmp158_ = _data_->_vala1_ids;
						_data_->cid = (gint) json_array_get_int_element (_data_->_tmp158_, _data_->_vala1_i);
						_vala_array_add6 (&_data_->self->priv->member_contact_ids, &_data_->self->priv->member_contact_ids_length1, &_data_->self->priv->_member_contact_ids_size_, _data_->cid);
						_data_->_tmp159_ = _data_->self->priv->rpc;
						_data_->_state_ = 2;
						dc_rpc_client_get_contact (_data_->_tmp159_, _data_->cid, dc_chat_info_dialog_load_info_ready, _data_);
						return FALSE;
						_state_2:
						_data_->_tmp160_ = dc_rpc_client_get_contact_finish (_data_->_tmp159_, _data_->_res_, &_data_->_inner_error0_);
						_data_->contact_obj = _data_->_tmp160_;
						if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
							_g_object_unref0 (_data_->members_lbl);
							_g_free0 (_data_->_tmp134_);
							_g_object_unref0 (_data_->header_box);
							_json_array_unref0 (_data_->_vala1_ids);
							_g_object_unref0 (_data_->ephem_list);
							_data_->timer_labels = (_vala_array_free (_data_->timer_labels, _data_->timer_labels_length1, (GDestroyNotify) g_free), NULL);
							_g_object_unref0 (_data_->ephem_row);
							_g_object_unref0 (_data_->type_lbl);
							_g_free0 (_data_->type_str);
							_g_object_unref0 (_data_->name_box);
							_g_object_unref0 (_data_->avatar);
							_g_free0 (_data_->profile_image);
							_g_free0 (_data_->chat_type);
							_g_free0 (_data_->_tmp8_);
							_g_free0 (_data_->name);
							_g_free0 (_data_->_tmp3_);
							_json_object_unref0 (_data_->chat);
							block27_data_unref (_data_->_data27_);
							_data_->_data27_ = NULL;
							goto __catch0_g_error;
						}
						_data_->_tmp161_ = _data_->contact_obj;
						if (_data_->_tmp161_ == NULL) {
							_json_object_unref0 (_data_->contact_obj);
							continue;
						}
						_data_->_tmp162_ = _data_->contact_obj;
						_data_->_tmp163_ = dc_rpc_parsers_parse_contact (_data_->cid, _data_->_tmp162_);
						_data_->contact = _data_->_tmp163_;
						if (_data_->is_dm_chat) {
							_data_->_tmp166_ = _data_->contact;
							_data_->_tmp167_ = dc_contact_get_id (_data_->_tmp166_);
							_data_->_tmp168_ = _data_->_tmp167_;
							_data_->_tmp165_ = _data_->_tmp168_ > 1;
						} else {
							_data_->_tmp165_ = FALSE;
						}
						if (_data_->_tmp165_) {
							_data_->_tmp169_ = _data_->self->priv->dm_contact;
							_data_->_tmp164_ = _data_->_tmp169_ == NULL;
						} else {
							_data_->_tmp164_ = FALSE;
						}
						if (_data_->_tmp164_) {
							_data_->_tmp170_ = _data_->contact;
							_data_->_tmp171_ = _g_object_ref0 (_data_->_tmp170_);
							_g_object_unref0 (_data_->self->priv->dm_contact);
							_data_->self->priv->dm_contact = _data_->_tmp171_;
						}
						_data_->_tmp172_ = _data_->contact;
						_data_->_tmp173_ = dc_chat_info_dialog_build_contact_row (_data_->self, _data_->_tmp172_);
						_data_->row = _data_->_tmp173_;
						_data_->_tmp174_ = _data_->self->priv->members_list;
						_data_->_tmp175_ = _data_->row;
						gtk_list_box_append (_data_->_tmp174_, (GtkWidget*) _data_->_tmp175_);
						_g_object_unref0 (_data_->row);
						_g_object_unref0 (_data_->contact);
						_json_object_unref0 (_data_->contact_obj);
					}
				}
			}
			_data_->_tmp176_ = _data_->self->priv->content;
			_data_->_tmp177_ = _data_->self->priv->members_list;
			gtk_box_append (_data_->_tmp176_, (GtkWidget*) _data_->_tmp177_);
			_g_object_unref0 (_data_->members_lbl);
			_g_free0 (_data_->_tmp134_);
			_g_object_unref0 (_data_->header_box);
			_json_array_unref0 (_data_->_vala1_ids);
		}
		_data_->_tmp178_ = _data_->self->priv->content;
		_data_->_tmp179_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
		g_object_ref_sink (_data_->_tmp179_);
		_data_->_tmp180_ = _data_->_tmp179_;
		gtk_box_append (_data_->_tmp178_, (GtkWidget*) _data_->_tmp180_);
		_g_object_unref0 (_data_->_tmp180_);
		_data_->_tmp181_ = (GtkListBox*) gtk_list_box_new ();
		g_object_ref_sink (_data_->_tmp181_);
		_data_->actions_list = _data_->_tmp181_;
		_data_->_tmp182_ = _data_->actions_list;
		gtk_list_box_set_selection_mode (_data_->_tmp182_, GTK_SELECTION_NONE);
		_data_->_tmp183_ = _data_->actions_list;
		gtk_widget_add_css_class ((GtkWidget*) _data_->_tmp183_, "boxed-list");
		_data_->_tmp184_ = (AdwActionRow*) adw_action_row_new ();
		g_object_ref_sink (_data_->_tmp184_);
		_data_->clear_row = _data_->_tmp184_;
		_data_->_tmp185_ = _data_->clear_row;
		adw_preferences_row_set_title ((AdwPreferencesRow*) _data_->_tmp185_, "Clear History");
		_data_->_tmp186_ = (GtkButton*) gtk_button_new_with_label ("For Me");
		g_object_ref_sink (_data_->_tmp186_);
		_data_->clear_me_btn = _data_->_tmp186_;
		_data_->_tmp187_ = _data_->clear_me_btn;
		gtk_widget_set_valign ((GtkWidget*) _data_->_tmp187_, GTK_ALIGN_CENTER);
		_data_->_tmp188_ = _data_->clear_me_btn;
		gtk_widget_add_css_class ((GtkWidget*) _data_->_tmp188_, "flat");
		_data_->_tmp189_ = _data_->clear_me_btn;
		g_signal_connect_object (_data_->_tmp189_, "clicked", (GCallback) ____lambda114__gtk_button_clicked, _data_->self, 0);
		_data_->_tmp190_ = _data_->clear_row;
		_data_->_tmp191_ = _data_->clear_me_btn;
		adw_action_row_add_suffix (_data_->_tmp190_, (GtkWidget*) _data_->_tmp191_);
		_data_->_tmp192_ = (GtkButton*) gtk_button_new_with_label ("For Everyone");
		g_object_ref_sink (_data_->_tmp192_);
		_data_->clear_all_btn = _data_->_tmp192_;
		_data_->_tmp193_ = _data_->clear_all_btn;
		gtk_widget_set_valign ((GtkWidget*) _data_->_tmp193_, GTK_ALIGN_CENTER);
		_data_->_tmp194_ = _data_->clear_all_btn;
		gtk_widget_add_css_class ((GtkWidget*) _data_->_tmp194_, "flat");
		_data_->_tmp195_ = _data_->clear_all_btn;
		gtk_widget_add_css_class ((GtkWidget*) _data_->_tmp195_, "error");
		_data_->_tmp196_ = _data_->clear_all_btn;
		g_signal_connect_object (_data_->_tmp196_, "clicked", (GCallback) ____lambda117__gtk_button_clicked, _data_->self, 0);
		_data_->_tmp197_ = _data_->clear_row;
		_data_->_tmp198_ = _data_->clear_all_btn;
		adw_action_row_add_suffix (_data_->_tmp197_, (GtkWidget*) _data_->_tmp198_);
		_data_->_tmp199_ = _data_->actions_list;
		_data_->_tmp200_ = _data_->clear_row;
		gtk_list_box_append (_data_->_tmp199_, (GtkWidget*) _data_->_tmp200_);
		if (_data_->self->priv->is_group) {
			_data_->_tmp201_ = (AdwActionRow*) adw_action_row_new ();
			g_object_ref_sink (_data_->_tmp201_);
			_data_->leave_row = _data_->_tmp201_;
			_data_->_tmp202_ = _data_->leave_row;
			adw_preferences_row_set_title ((AdwPreferencesRow*) _data_->_tmp202_, "Leave Group");
			_data_->_tmp203_ = _data_->leave_row;
			adw_action_row_set_subtitle (_data_->_tmp203_, "Stop receiving messages");
			_data_->_tmp204_ = _data_->leave_row;
			_data_->_tmp205_ = (GtkImage*) gtk_image_new_from_icon_name ("system-log-out-symbolic");
			g_object_ref_sink (_data_->_tmp205_);
			_data_->_tmp206_ = _data_->_tmp205_;
			adw_action_row_add_prefix (_data_->_tmp204_, (GtkWidget*) _data_->_tmp206_);
			_g_object_unref0 (_data_->_tmp206_);
			_data_->_tmp207_ = _data_->leave_row;
			gtk_list_box_row_set_activatable ((GtkListBoxRow*) _data_->_tmp207_, TRUE);
			_data_->_tmp208_ = _data_->leave_row;
			g_signal_connect_object (_data_->_tmp208_, "activated", (GCallback) _____lambda118__adw_action_row_activated, _data_->self, 0);
			_data_->_tmp209_ = _data_->actions_list;
			_data_->_tmp210_ = _data_->leave_row;
			gtk_list_box_append (_data_->_tmp209_, (GtkWidget*) _data_->_tmp210_);
			_data_->_tmp211_ = (AdwActionRow*) adw_action_row_new ();
			g_object_ref_sink (_data_->_tmp211_);
			_data_->disband_row = _data_->_tmp211_;
			_data_->_tmp212_ = _data_->disband_row;
			adw_preferences_row_set_title ((AdwPreferencesRow*) _data_->_tmp212_, "Disband Group");
			_data_->_tmp213_ = _data_->disband_row;
			adw_action_row_set_subtitle (_data_->_tmp213_, "Remove all members and delete messages");
			_data_->_tmp214_ = _data_->disband_row;
			_data_->_tmp215_ = (GtkImage*) gtk_image_new_from_icon_name ("edit-delete-symbolic");
			g_object_ref_sink (_data_->_tmp215_);
			_data_->_tmp216_ = _data_->_tmp215_;
			adw_action_row_add_prefix (_data_->_tmp214_, (GtkWidget*) _data_->_tmp216_);
			_g_object_unref0 (_data_->_tmp216_);
			_data_->_tmp217_ = _data_->disband_row;
			gtk_list_box_row_set_activatable ((GtkListBoxRow*) _data_->_tmp217_, TRUE);
			_data_->_tmp218_ = _data_->disband_row;
			g_signal_connect_object (_data_->_tmp218_, "activated", (GCallback) _____lambda120__adw_action_row_activated, _data_->self, 0);
			_data_->_tmp219_ = _data_->actions_list;
			_data_->_tmp220_ = _data_->disband_row;
			gtk_list_box_append (_data_->_tmp219_, (GtkWidget*) _data_->_tmp220_);
			_g_object_unref0 (_data_->disband_row);
			_g_object_unref0 (_data_->leave_row);
		}
		_data_->_tmp221_ = _data_->self->priv->dm_contact;
		if (_data_->_tmp221_ != NULL) {
			_data_->_tmp222_ = _data_->actions_list;
			_data_->_tmp223_ = _data_->self->priv->dm_contact;
			_data_->_tmp224_ = dc_chat_info_dialog_build_contact_block_row (_data_->self, _data_->_tmp223_);
			_data_->_tmp225_ = _data_->_tmp224_;
			gtk_list_box_append (_data_->_tmp222_, (GtkWidget*) _data_->_tmp225_);
			_g_object_unref0 (_data_->_tmp225_);
		}
		_data_->_tmp226_ = (AdwActionRow*) adw_action_row_new ();
		g_object_ref_sink (_data_->_tmp226_);
		_data_->del_row = _data_->_tmp226_;
		_data_->_tmp227_ = _data_->del_row;
		adw_preferences_row_set_title ((AdwPreferencesRow*) _data_->_tmp227_, "Delete for Me");
		_data_->_tmp228_ = _data_->del_row;
		adw_action_row_set_subtitle (_data_->_tmp228_, "Remove from your chat list");
		_data_->_tmp229_ = _data_->del_row;
		_data_->_tmp230_ = (GtkImage*) gtk_image_new_from_icon_name ("user-trash-symbolic");
		g_object_ref_sink (_data_->_tmp230_);
		_data_->_tmp231_ = _data_->_tmp230_;
		adw_action_row_add_prefix (_data_->_tmp229_, (GtkWidget*) _data_->_tmp231_);
		_g_object_unref0 (_data_->_tmp231_);
		_data_->_tmp232_ = _data_->del_row;
		gtk_list_box_row_set_activatable ((GtkListBoxRow*) _data_->_tmp232_, TRUE);
		_data_->_tmp233_ = _data_->del_row;
		g_signal_connect_object (_data_->_tmp233_, "activated", (GCallback) ____lambda124__adw_action_row_activated, _data_->self, 0);
		_data_->_tmp234_ = _data_->actions_list;
		_data_->_tmp235_ = _data_->del_row;
		gtk_list_box_append (_data_->_tmp234_, (GtkWidget*) _data_->_tmp235_);
		_data_->_tmp236_ = _data_->self->priv->content;
		_data_->_tmp237_ = _data_->actions_list;
		gtk_box_append (_data_->_tmp236_, (GtkWidget*) _data_->_tmp237_);
		_g_object_unref0 (_data_->del_row);
		_g_object_unref0 (_data_->clear_all_btn);
		_g_object_unref0 (_data_->clear_me_btn);
		_g_object_unref0 (_data_->clear_row);
		_g_object_unref0 (_data_->actions_list);
		_g_object_unref0 (_data_->ephem_list);
		_data_->timer_labels = (_vala_array_free (_data_->timer_labels, _data_->timer_labels_length1, (GDestroyNotify) g_free), NULL);
		_g_object_unref0 (_data_->ephem_row);
		_g_object_unref0 (_data_->type_lbl);
		_g_free0 (_data_->type_str);
		_g_object_unref0 (_data_->name_box);
		_g_object_unref0 (_data_->avatar);
		_g_free0 (_data_->profile_image);
		_g_free0 (_data_->chat_type);
		_g_free0 (_data_->_tmp8_);
		_g_free0 (_data_->name);
		_g_free0 (_data_->_tmp3_);
		_json_object_unref0 (_data_->chat);
		block27_data_unref (_data_->_data27_);
		_data_->_data27_ = NULL;
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		gtk_widget_set_visible ((GtkWidget*) _data_->spinner, FALSE);
		_data_->_tmp238_ = _data_->e;
		_data_->_tmp239_ = _data_->_tmp238_->message;
		_data_->_tmp240_ = g_strconcat ("Failed to load: ", _data_->_tmp239_, NULL);
		_data_->_tmp241_ = _data_->_tmp240_;
		_data_->_tmp242_ = (GtkLabel*) gtk_label_new (_data_->_tmp241_);
		g_object_ref_sink (_data_->_tmp242_);
		_data_->_tmp243_ = _data_->_tmp242_;
		_g_free0 (_data_->_tmp241_);
		_data_->err = _data_->_tmp243_;
		_data_->_tmp244_ = _data_->err;
		gtk_widget_add_css_class ((GtkWidget*) _data_->_tmp244_, "dim-label");
		_data_->_tmp245_ = _data_->err;
		gtk_label_set_wrap (_data_->_tmp245_, TRUE);
		_data_->_tmp246_ = _data_->self->priv->content;
		_data_->_tmp247_ = _data_->err;
		gtk_box_append (_data_->_tmp246_, (GtkWidget*) _data_->_tmp247_);
		_g_object_unref0 (_data_->err);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static 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_)) {
		DcChatInfoDialog* self;
		self = _data28_->self;
		_g_object_unref0 (_data28_->row);
		_g_object_unref0 (self);
		g_slice_free (Block28Data, _data28_);
	}
}

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_)) {
		DcChatInfoDialog* self;
		self = _data29_->_data28_->self;
		_g_free0 (_data29_->addr);
		block28_data_unref (_data29_->_data28_);
		_data29_->_data28_ = NULL;
		g_slice_free (Block29Data, _data29_);
	}
}

static void
___lambda105_ (Block29Data* _data29_)
{
	Block28Data* _data28_;
	DcChatInfoDialog* self;
	GdkClipboard* clipboard = NULL;
	GdkClipboard* _tmp0_;
	GdkClipboard* _tmp1_;
	const gchar* _tmp2_;
	_data28_ = _data29_->_data28_;
	self = _data28_->self;
	_tmp0_ = gtk_widget_get_clipboard ((GtkWidget*) self);
	_tmp1_ = _g_object_ref0 (_tmp0_);
	clipboard = _tmp1_;
	_tmp2_ = _data29_->addr;
	gdk_clipboard_set_text (clipboard, _tmp2_);
	_g_object_unref0 (clipboard);
}

static void
____lambda105__gtk_button_clicked (GtkButton* _sender,
                                   gpointer self)
{
	___lambda105_ (self);
}

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_)) {
		DcChatInfoDialog* self;
		self = _data30_->_data28_->self;
		block28_data_unref (_data30_->_data28_);
		_data30_->_data28_ = NULL;
		g_slice_free (Block30Data, _data30_);
	}
}

static void
___lambda106_ (Block30Data* _data30_)
{
	Block28Data* _data28_;
	DcChatInfoDialog* self;
	AdwActionRow* _tmp0_;
	_data28_ = _data30_->_data28_;
	self = _data28_->self;
	_tmp0_ = _data28_->row;
	dc_chat_info_dialog_remove_member (self, _data30_->cid, _tmp0_, NULL, NULL);
}

static void
____lambda106__gtk_button_clicked (GtkButton* _sender,
                                   gpointer self)
{
	___lambda106_ (self);
}

static AdwActionRow*
dc_chat_info_dialog_build_contact_row (DcChatInfoDialog* self,
                                       DcContact* contact)
{
	Block28Data* _data28_;
	AdwActionRow* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	gboolean _tmp15_ = FALSE;
	AdwActionRow* _tmp28_;
	AdwActionRow* _tmp29_;
	AdwActionRow* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (contact != NULL, NULL);
	_data28_ = g_slice_new0 (Block28Data);
	_data28_->_ref_count_ = 1;
	_data28_->self = g_object_ref (self);
	_tmp0_ = dc_contact_row (contact, FALSE);
	_data28_->row = _tmp0_;
	_tmp1_ = dc_contact_get_address (contact);
	_tmp2_ = _tmp1_;
	_tmp3_ = strlen (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_ > 0) {
		Block29Data* _data29_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		gchar* _tmp7_;
		GtkButton* copy_btn = NULL;
		GtkButton* _tmp8_;
		GtkButton* _tmp9_;
		GtkButton* _tmp10_;
		GtkButton* _tmp11_;
		GtkButton* _tmp12_;
		AdwActionRow* _tmp13_;
		GtkButton* _tmp14_;
		_data29_ = g_slice_new0 (Block29Data);
		_data29_->_ref_count_ = 1;
		_data29_->_data28_ = block28_data_ref (_data28_);
		_tmp5_ = dc_contact_get_address (contact);
		_tmp6_ = _tmp5_;
		_tmp7_ = g_strdup (_tmp6_);
		_data29_->addr = _tmp7_;
		_tmp8_ = (GtkButton*) gtk_button_new_from_icon_name ("edit-copy-symbolic");
		g_object_ref_sink (_tmp8_);
		copy_btn = _tmp8_;
		_tmp9_ = copy_btn;
		gtk_widget_set_valign ((GtkWidget*) _tmp9_, GTK_ALIGN_CENTER);
		_tmp10_ = copy_btn;
		gtk_widget_add_css_class ((GtkWidget*) _tmp10_, "flat");
		_tmp11_ = copy_btn;
		gtk_widget_set_tooltip_text ((GtkWidget*) _tmp11_, "Copy email address");
		_tmp12_ = copy_btn;
		g_signal_connect_data (_tmp12_, "clicked", (GCallback) ____lambda105__gtk_button_clicked, block29_data_ref (_data29_), (GClosureNotify) block29_data_unref, 0);
		_tmp13_ = _data28_->row;
		_tmp14_ = copy_btn;
		adw_action_row_add_suffix (_tmp13_, (GtkWidget*) _tmp14_);
		_g_object_unref0 (copy_btn);
		block29_data_unref (_data29_);
		_data29_ = NULL;
	}
	if (self->priv->is_group) {
		gint _tmp16_;
		gint _tmp17_;
		_tmp16_ = dc_contact_get_id (contact);
		_tmp17_ = _tmp16_;
		_tmp15_ = _tmp17_ != 1;
	} else {
		_tmp15_ = FALSE;
	}
	if (_tmp15_) {
		Block30Data* _data30_;
		gint _tmp18_;
		gint _tmp19_;
		GtkButton* remove_btn = NULL;
		GtkButton* _tmp20_;
		GtkButton* _tmp21_;
		GtkButton* _tmp22_;
		GtkButton* _tmp23_;
		GtkButton* _tmp24_;
		GtkButton* _tmp25_;
		AdwActionRow* _tmp26_;
		GtkButton* _tmp27_;
		_data30_ = g_slice_new0 (Block30Data);
		_data30_->_ref_count_ = 1;
		_data30_->_data28_ = block28_data_ref (_data28_);
		_tmp18_ = dc_contact_get_id (contact);
		_tmp19_ = _tmp18_;
		_data30_->cid = _tmp19_;
		_tmp20_ = (GtkButton*) gtk_button_new_from_icon_name ("user-trash-symbolic");
		g_object_ref_sink (_tmp20_);
		remove_btn = _tmp20_;
		_tmp21_ = remove_btn;
		gtk_widget_set_valign ((GtkWidget*) _tmp21_, GTK_ALIGN_CENTER);
		_tmp22_ = remove_btn;
		gtk_widget_add_css_class ((GtkWidget*) _tmp22_, "flat");
		_tmp23_ = remove_btn;
		gtk_widget_add_css_class ((GtkWidget*) _tmp23_, "error");
		_tmp24_ = remove_btn;
		gtk_widget_set_tooltip_text ((GtkWidget*) _tmp24_, "Remove from group");
		_tmp25_ = remove_btn;
		g_signal_connect_data (_tmp25_, "clicked", (GCallback) ____lambda106__gtk_button_clicked, block30_data_ref (_data30_), (GClosureNotify) block30_data_unref, 0);
		_tmp26_ = _data28_->row;
		_tmp27_ = remove_btn;
		adw_action_row_add_suffix (_tmp26_, (GtkWidget*) _tmp27_);
		_g_object_unref0 (remove_btn);
		block30_data_unref (_data30_);
		_data30_ = NULL;
	}
	_tmp28_ = _data28_->row;
	_tmp29_ = _g_object_ref0 (_tmp28_);
	result = _tmp29_;
	block28_data_unref (_data28_);
	_data28_ = NULL;
	return result;
}

static Block31Data*
block31_data_ref (Block31Data* _data31_)
{
	g_atomic_int_inc (&_data31_->_ref_count_);
	return _data31_;
}

static void
block31_data_unref (void * _userdata_)
{
	Block31Data* _data31_;
	_data31_ = (Block31Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data31_->_ref_count_)) {
		DcChatInfoDialog* self;
		self = _data31_->self;
		_g_object_unref0 (_data31_->row);
		_g_object_unref0 (_data31_->contact);
		_g_object_unref0 (self);
		g_slice_free (Block31Data, _data31_);
	}
}

static void
__lambda122_ (Block31Data* _data31_)
{
	DcChatInfoDialog* self;
	gboolean _tmp0_;
	gboolean _tmp1_;
	self = _data31_->self;
	_tmp0_ = dc_contact_get_is_blocked (_data31_->contact);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		dc_chat_info_dialog_set_contact_blocked (self, _data31_->contact, _data31_->row, FALSE, NULL, NULL);
	} else {
		dc_chat_info_dialog_confirm_block_contact (self, _data31_->contact, _data31_->row);
	}
}

static void
___lambda122__adw_action_row_activated (AdwActionRow* _sender,
                                        gpointer self)
{
	__lambda122_ (self);
}

static AdwActionRow*
dc_chat_info_dialog_build_contact_block_row (DcChatInfoDialog* self,
                                             DcContact* contact)
{
	Block31Data* _data31_;
	DcContact* _tmp0_;
	AdwActionRow* _tmp1_;
	GtkImage* _tmp2_;
	GtkImage* _tmp3_;
	AdwActionRow* _tmp4_;
	AdwActionRow* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (contact != NULL, NULL);
	_data31_ = g_slice_new0 (Block31Data);
	_data31_->_ref_count_ = 1;
	_data31_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (contact);
	_g_object_unref0 (_data31_->contact);
	_data31_->contact = _tmp0_;
	_tmp1_ = (AdwActionRow*) adw_action_row_new ();
	g_object_ref_sink (_tmp1_);
	_data31_->row = _tmp1_;
	_tmp2_ = (GtkImage*) gtk_image_new_from_icon_name ("action-unavailable-symbolic");
	g_object_ref_sink (_tmp2_);
	_tmp3_ = _tmp2_;
	adw_action_row_add_prefix (_data31_->row, (GtkWidget*) _tmp3_);
	_g_object_unref0 (_tmp3_);
	gtk_list_box_row_set_activatable ((GtkListBoxRow*) _data31_->row, TRUE);
	dc_chat_info_dialog_update_contact_block_row (self, _data31_->row, _data31_->contact);
	g_signal_connect_data (_data31_->row, "activated", (GCallback) ___lambda122__adw_action_row_activated, block31_data_ref (_data31_), (GClosureNotify) block31_data_unref, 0);
	_tmp4_ = _g_object_ref0 (_data31_->row);
	result = _tmp4_;
	block31_data_unref (_data31_);
	_data31_ = NULL;
	return result;
}

static void
dc_chat_info_dialog_update_contact_block_row (DcChatInfoDialog* self,
                                              AdwActionRow* row,
                                              DcContact* contact)
{
	gchar* label = NULL;
	gchar* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (row != NULL);
	g_return_if_fail (contact != NULL);
	_tmp0_ = dc_chat_info_dialog_contact_label (contact);
	label = _tmp0_;
	_tmp1_ = dc_contact_get_is_blocked (contact);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		const gchar* _tmp3_;
		gchar* _tmp4_;
		gchar* _tmp5_;
		adw_preferences_row_set_title ((AdwPreferencesRow*) row, "Unblock Contact");
		_tmp3_ = label;
		_tmp4_ = g_strdup_printf ("Allow messages from %s", _tmp3_);
		_tmp5_ = _tmp4_;
		adw_action_row_set_subtitle (row, _tmp5_);
		_g_free0 (_tmp5_);
	} else {
		const gchar* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		adw_preferences_row_set_title ((AdwPreferencesRow*) row, "Block Contact");
		_tmp6_ = label;
		_tmp7_ = g_strdup_printf ("Stop receiving messages from %s", _tmp6_);
		_tmp8_ = _tmp7_;
		adw_action_row_set_subtitle (row, _tmp8_);
		_g_free0 (_tmp8_);
	}
	_g_free0 (label);
}

static gchar*
dc_chat_info_dialog_contact_label (DcContact* contact)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	gint _tmp9_;
	gint _tmp10_;
	gchar* _tmp14_;
	gchar* result;
	g_return_val_if_fail (contact != NULL, NULL);
	_tmp0_ = dc_contact_get_display_name (contact);
	_tmp1_ = _tmp0_;
	_tmp2_ = strlen (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_ > 0) {
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		gchar* _tmp6_;
		_tmp4_ = dc_contact_get_display_name (contact);
		_tmp5_ = _tmp4_;
		_tmp6_ = g_strdup (_tmp5_);
		result = _tmp6_;
		return result;
	}
	_tmp7_ = dc_contact_get_address (contact);
	_tmp8_ = _tmp7_;
	_tmp9_ = strlen (_tmp8_);
	_tmp10_ = _tmp9_;
	if (_tmp10_ > 0) {
		const gchar* _tmp11_;
		const gchar* _tmp12_;
		gchar* _tmp13_;
		_tmp11_ = dc_contact_get_address (contact);
		_tmp12_ = _tmp11_;
		_tmp13_ = g_strdup (_tmp12_);
		result = _tmp13_;
		return result;
	}
	_tmp14_ = g_strdup ("this contact");
	result = _tmp14_;
	return result;
}

static Block32Data*
block32_data_ref (Block32Data* _data32_)
{
	g_atomic_int_inc (&_data32_->_ref_count_);
	return _data32_;
}

static void
block32_data_unref (void * _userdata_)
{
	Block32Data* _data32_;
	_data32_ = (Block32Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data32_->_ref_count_)) {
		DcChatInfoDialog* self;
		self = _data32_->self;
		_g_object_unref0 (_data32_->entry);
		_g_object_unref0 (_data32_->dialog);
		_g_object_unref0 (_data32_->name_lbl);
		_g_object_unref0 (self);
		g_slice_free (Block32Data, _data32_);
	}
}

static void
__lambda103_ (Block32Data* _data32_)
{
	DcChatInfoDialog* self;
	self = _data32_->self;
	g_signal_emit_by_name (_data32_->dialog, "response", "save");
}

static void
___lambda103__gtk_entry_activate (GtkEntry* _sender,
                                  gpointer self)
{
	__lambda103_ (self);
}

static gchar*
string_strip (const gchar* self)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup (self);
	_result_ = _tmp0_;
	g_strstrip (_result_);
	result = _result_;
	return result;
}

static void
__lambda104_ (Block32Data* _data32_,
              const gchar* resp)
{
	DcChatInfoDialog* self;
	self = _data32_->self;
	g_return_if_fail (resp != NULL);
	if (g_strcmp0 (resp, "save") == 0) {
		const gchar* _tmp0_;
		const gchar* _tmp1_;
		gchar* _tmp2_;
		gchar* _tmp3_;
		_tmp0_ = gtk_editable_get_text ((GtkEditable*) _data32_->entry);
		_tmp1_ = _tmp0_;
		_tmp2_ = string_strip (_tmp1_);
		_tmp3_ = _tmp2_;
		dc_chat_info_dialog_save_contact_name (self, _data32_->contact_id, _tmp3_, _data32_->name_lbl, NULL, NULL);
		_g_free0 (_tmp3_);
	}
}

static void
___lambda104__adw_alert_dialog_response (AdwAlertDialog* _sender,
                                         const gchar* response,
                                         gpointer self)
{
	__lambda104_ (self, response);
}

static void
dc_chat_info_dialog_show_edit_contact_name_dialog (DcChatInfoDialog* self,
                                                   gint contact_id,
                                                   GtkLabel* name_lbl)
{
	Block32Data* _data32_;
	GtkLabel* _tmp0_;
	AdwAlertDialog* _tmp1_;
	GtkEntry* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (name_lbl != NULL);
	_data32_ = g_slice_new0 (Block32Data);
	_data32_->_ref_count_ = 1;
	_data32_->self = g_object_ref (self);
	_data32_->contact_id = contact_id;
	_tmp0_ = _g_object_ref0 (name_lbl);
	_g_object_unref0 (_data32_->name_lbl);
	_data32_->name_lbl = _tmp0_;
	_tmp1_ = (AdwAlertDialog*) adw_alert_dialog_new ("Edit Contact Name", "Leave empty to use the contact's own name.");
	g_object_ref_sink (_tmp1_);
	_data32_->dialog = _tmp1_;
	_tmp2_ = (GtkEntry*) gtk_entry_new ();
	g_object_ref_sink (_tmp2_);
	_data32_->entry = _tmp2_;
	_tmp3_ = gtk_label_get_label (_data32_->name_lbl);
	_tmp4_ = _tmp3_;
	gtk_editable_set_text ((GtkEditable*) _data32_->entry, _tmp4_);
	gtk_entry_set_placeholder_text (_data32_->entry, "Contact name");
	gtk_entry_set_activates_default (_data32_->entry, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) _data32_->entry, TRUE);
	adw_alert_dialog_set_extra_child (_data32_->dialog, (GtkWidget*) _data32_->entry);
	adw_alert_dialog_add_response (_data32_->dialog, "cancel", "Cancel");
	adw_alert_dialog_add_response (_data32_->dialog, "save", "Save");
	adw_alert_dialog_set_response_appearance (_data32_->dialog, "save", ADW_RESPONSE_SUGGESTED);
	adw_alert_dialog_set_default_response (_data32_->dialog, "save");
	adw_alert_dialog_set_close_response (_data32_->dialog, "cancel");
	g_signal_connect_data (_data32_->entry, "activate", (GCallback) ___lambda103__gtk_entry_activate, block32_data_ref (_data32_), (GClosureNotify) block32_data_unref, 0);
	g_signal_connect_data (_data32_->dialog, "response", (GCallback) ___lambda104__adw_alert_dialog_response, block32_data_ref (_data32_), (GClosureNotify) block32_data_unref, 0);
	adw_dialog_present ((AdwDialog*) _data32_->dialog, (GtkWidget*) self);
	gtk_widget_grab_focus ((GtkWidget*) _data32_->entry);
	block32_data_unref (_data32_);
	_data32_ = NULL;
}

static void
dc_chat_info_dialog_save_contact_name_data_free (gpointer _data)
{
	DcChatInfoDialogSaveContactNameData* _data_;
	_data_ = _data;
	_g_free0 (_data_->new_name);
	_g_object_unref0 (_data_->name_lbl);
	_g_object_unref0 (_data_->self);
	g_slice_free (DcChatInfoDialogSaveContactNameData, _data_);
}

static void
dc_chat_info_dialog_save_contact_name (DcChatInfoDialog* self,
                                       gint contact_id,
                                       const gchar* new_name,
                                       GtkLabel* name_lbl,
                                       GAsyncReadyCallback _callback_,
                                       gpointer _user_data_)
{
	DcChatInfoDialogSaveContactNameData* _data_;
	DcChatInfoDialog* _tmp0_;
	gchar* _tmp1_;
	GtkLabel* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (new_name != NULL);
	g_return_if_fail (name_lbl != NULL);
	_data_ = g_slice_new0 (DcChatInfoDialogSaveContactNameData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, dc_chat_info_dialog_save_contact_name_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->contact_id = contact_id;
	_tmp1_ = g_strdup (new_name);
	_g_free0 (_data_->new_name);
	_data_->new_name = _tmp1_;
	_tmp2_ = _g_object_ref0 (name_lbl);
	_g_object_unref0 (_data_->name_lbl);
	_data_->name_lbl = _tmp2_;
	dc_chat_info_dialog_save_contact_name_co (_data_);
}

static void
dc_chat_info_dialog_save_contact_name_finish (DcChatInfoDialog* self,
                                              GAsyncResult* _res_)
{
	DcChatInfoDialogSaveContactNameData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
dc_chat_info_dialog_save_contact_name_ready (GObject* source_object,
                                             GAsyncResult* _res_,
                                             gpointer _user_data_)
{
	DcChatInfoDialogSaveContactNameData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	dc_chat_info_dialog_save_contact_name_co (_data_);
}

static gboolean
dc_chat_info_dialog_save_contact_name_co (DcChatInfoDialogSaveContactNameData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_tmp0_ = _data_->self->priv->rpc;
		_data_->_state_ = 1;
		dc_rpc_client_change_contact_name (_data_->_tmp0_, _data_->contact_id, _data_->new_name, dc_chat_info_dialog_save_contact_name_ready, _data_);
		return FALSE;
		_state_1:
		dc_rpc_client_change_contact_name_finish (_data_->_tmp0_, _data_->_res_, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp1_ = _data_->self->priv->rpc;
		_data_->_state_ = 2;
		dc_rpc_client_get_contact (_data_->_tmp1_, _data_->contact_id, dc_chat_info_dialog_save_contact_name_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp2_ = dc_rpc_client_get_contact_finish (_data_->_tmp1_, _data_->_res_, &_data_->_inner_error0_);
		_data_->contact_obj = _data_->_tmp2_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp3_ = _data_->contact_obj;
		if (_data_->_tmp3_ != NULL) {
			_data_->_tmp4_ = _data_->contact_obj;
			_data_->_tmp5_ = dc_rpc_parsers_parse_contact (_data_->contact_id, _data_->_tmp4_);
			_data_->contact = _data_->_tmp5_;
			_data_->_tmp6_ = _data_->contact;
			_data_->_tmp7_ = _g_object_ref0 (_data_->_tmp6_);
			_g_object_unref0 (_data_->self->priv->dm_contact);
			_data_->self->priv->dm_contact = _data_->_tmp7_;
			_data_->_tmp8_ = _data_->contact;
			_data_->_tmp9_ = dc_chat_info_dialog_contact_label (_data_->_tmp8_);
			_g_free0 (_data_->self->priv->chat_name);
			_data_->self->priv->chat_name = _data_->_tmp9_;
			_data_->_tmp10_ = _data_->self->priv->chat_name;
			gtk_label_set_label (_data_->name_lbl, _data_->_tmp10_);
			_data_->_tmp12_ = _data_->self->priv->members_list;
			if (_data_->_tmp12_ != NULL) {
				_data_->_tmp11_ = !_data_->self->priv->is_group;
			} else {
				_data_->_tmp11_ = FALSE;
			}
			if (_data_->_tmp11_) {
				_data_->_tmp13_ = _data_->self->priv->members_list;
				dc_clear_listbox (_data_->_tmp13_);
				_data_->_tmp14_ = _data_->self->priv->members_list;
				_data_->_tmp15_ = _data_->contact;
				_data_->_tmp16_ = dc_chat_info_dialog_build_contact_row (_data_->self, _data_->_tmp15_);
				_data_->_tmp17_ = _data_->_tmp16_;
				gtk_list_box_append (_data_->_tmp14_, (GtkWidget*) _data_->_tmp17_);
				_g_object_unref0 (_data_->_tmp17_);
			}
			_g_object_unref0 (_data_->contact);
		} else {
			_data_->_tmp18_ = strlen (_data_->new_name);
			_data_->_tmp19_ = _data_->_tmp18_;
			if (_data_->_tmp19_ > 0) {
				_data_->_tmp20_ = g_strdup (_data_->new_name);
				_g_free0 (_data_->self->priv->chat_name);
				_data_->self->priv->chat_name = _data_->_tmp20_;
				gtk_label_set_label (_data_->name_lbl, _data_->new_name);
			}
		}
		g_signal_emit (_data_->self, dc_chat_info_dialog_signals[DC_CHAT_INFO_DIALOG_CHAT_CHANGED_SIGNAL], 0);
		_json_object_unref0 (_data_->contact_obj);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp21_ = _data_->e;
		_data_->_tmp22_ = _data_->_tmp21_->message;
		dc_show_error ((GtkWidget*) _data_->self, _data_->_tmp22_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
dc_chat_info_dialog_remove_member_data_free (gpointer _data)
{
	DcChatInfoDialogRemoveMemberData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->row);
	_g_object_unref0 (_data_->self);
	g_slice_free (DcChatInfoDialogRemoveMemberData, _data_);
}

static void
dc_chat_info_dialog_remove_member (DcChatInfoDialog* self,
                                   gint contact_id,
                                   AdwActionRow* row,
                                   GAsyncReadyCallback _callback_,
                                   gpointer _user_data_)
{
	DcChatInfoDialogRemoveMemberData* _data_;
	DcChatInfoDialog* _tmp0_;
	AdwActionRow* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (row != NULL);
	_data_ = g_slice_new0 (DcChatInfoDialogRemoveMemberData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, dc_chat_info_dialog_remove_member_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->contact_id = contact_id;
	_tmp1_ = _g_object_ref0 (row);
	_g_object_unref0 (_data_->row);
	_data_->row = _tmp1_;
	dc_chat_info_dialog_remove_member_co (_data_);
}

static void
dc_chat_info_dialog_remove_member_finish (DcChatInfoDialog* self,
                                          GAsyncResult* _res_)
{
	DcChatInfoDialogRemoveMemberData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
dc_chat_info_dialog_remove_member_ready (GObject* source_object,
                                         GAsyncResult* _res_,
                                         gpointer _user_data_)
{
	DcChatInfoDialogRemoveMemberData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	dc_chat_info_dialog_remove_member_co (_data_);
}

static gboolean
dc_chat_info_dialog_remove_member_co (DcChatInfoDialogRemoveMemberData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_tmp0_ = _data_->self->priv->rpc;
		_data_->_state_ = 1;
		dc_rpc_client_remove_contact_from_chat (_data_->_tmp0_, _data_->self->priv->chat_id, _data_->contact_id, dc_chat_info_dialog_remove_member_ready, _data_);
		return FALSE;
		_state_1:
		dc_rpc_client_remove_contact_from_chat_finish (_data_->_tmp0_, _data_->_res_, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp1_ = _data_->self->priv->members_list;
		gtk_list_box_remove (_data_->_tmp1_, (GtkWidget*) _data_->row);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp2_ = _data_->e;
		_data_->_tmp3_ = _data_->_tmp2_->message;
		_data_->_tmp4_ = g_strconcat ("Remove failed: ", _data_->_tmp3_, NULL);
		_data_->_tmp5_ = _data_->_tmp4_;
		adw_action_row_set_subtitle (_data_->row, _data_->_tmp5_);
		_g_free0 (_data_->_tmp5_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

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

static void
dc_chat_info_dialog_add_member_dialog (DcChatInfoDialog* self,
                                       GAsyncReadyCallback _callback_,
                                       gpointer _user_data_)
{
	DcChatInfoDialogAddMemberDialogData* _data_;
	DcChatInfoDialog* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (DcChatInfoDialogAddMemberDialogData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, dc_chat_info_dialog_add_member_dialog_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	dc_chat_info_dialog_add_member_dialog_co (_data_);
}

static void
dc_chat_info_dialog_add_member_dialog_finish (DcChatInfoDialog* self,
                                              GAsyncResult* _res_)
{
	DcChatInfoDialogAddMemberDialogData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
__lambda113_ (DcChatInfoDialog* self,
              gint contact_id,
              const gchar* email)
{
	g_return_if_fail (email != NULL);
	dc_chat_info_dialog_do_add_member (self, email, NULL, NULL);
}

static void
___lambda113__dc_contact_picker_dialog_contact_picked (DcContactPickerDialog* _sender,
                                                       gint contact_id,
                                                       const gchar* email,
                                                       gpointer self)
{
	__lambda113_ ((DcChatInfoDialog*) self, contact_id, email);
}

static gboolean
dc_chat_info_dialog_add_member_dialog_co (DcChatInfoDialogAddMemberDialogData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->rpc;
	_data_->_tmp1_ = dc_contact_picker_dialog_new (_data_->_tmp0_, NULL, NULL);
	g_object_ref_sink (_data_->_tmp1_);
	_data_->picker = _data_->_tmp1_;
	g_signal_connect_object (_data_->picker, "contact-picked", (GCallback) ___lambda113__dc_contact_picker_dialog_contact_picked, _data_->self, 0);
	adw_dialog_present ((AdwDialog*) _data_->picker, (GtkWidget*) _data_->self);
	_g_object_unref0 (_data_->picker);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
dc_chat_info_dialog_do_add_member_data_free (gpointer _data)
{
	DcChatInfoDialogDoAddMemberData* _data_;
	_data_ = _data;
	_g_free0 (_data_->email);
	_g_object_unref0 (_data_->self);
	g_slice_free (DcChatInfoDialogDoAddMemberData, _data_);
}

static void
dc_chat_info_dialog_do_add_member (DcChatInfoDialog* self,
                                   const gchar* email,
                                   GAsyncReadyCallback _callback_,
                                   gpointer _user_data_)
{
	DcChatInfoDialogDoAddMemberData* _data_;
	DcChatInfoDialog* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (email != NULL);
	_data_ = g_slice_new0 (DcChatInfoDialogDoAddMemberData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, dc_chat_info_dialog_do_add_member_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (email);
	_g_free0 (_data_->email);
	_data_->email = _tmp1_;
	dc_chat_info_dialog_do_add_member_co (_data_);
}

static void
dc_chat_info_dialog_do_add_member_finish (DcChatInfoDialog* self,
                                          GAsyncResult* _res_)
{
	DcChatInfoDialogDoAddMemberData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
dc_chat_info_dialog_do_add_member_ready (GObject* source_object,
                                         GAsyncResult* _res_,
                                         gpointer _user_data_)
{
	DcChatInfoDialogDoAddMemberData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	dc_chat_info_dialog_do_add_member_co (_data_);
}

static gboolean
dc_chat_info_dialog_do_add_member_co (DcChatInfoDialogDoAddMemberData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_tmp0_ = _data_->self->priv->rpc;
		_data_->_state_ = 1;
		dc_rpc_client_get_or_create_contact (_data_->_tmp0_, _data_->email, dc_chat_info_dialog_do_add_member_ready, _data_);
		return FALSE;
		_state_1:
		_data_->contact_id = dc_rpc_client_get_or_create_contact_finish (_data_->_tmp0_, _data_->_res_, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp1_ = _data_->self->priv->rpc;
		_data_->_state_ = 2;
		dc_rpc_client_add_contact_to_chat (_data_->_tmp1_, _data_->self->priv->chat_id, _data_->contact_id, dc_chat_info_dialog_do_add_member_ready, _data_);
		return FALSE;
		_state_2:
		dc_rpc_client_add_contact_to_chat_finish (_data_->_tmp1_, _data_->_res_, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp2_ = _data_->self->priv->rpc;
		_data_->_state_ = 3;
		dc_rpc_client_get_contact (_data_->_tmp2_, _data_->contact_id, dc_chat_info_dialog_do_add_member_ready, _data_);
		return FALSE;
		_state_3:
		_data_->_tmp3_ = dc_rpc_client_get_contact_finish (_data_->_tmp2_, _data_->_res_, &_data_->_inner_error0_);
		_data_->contact_obj = _data_->_tmp3_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp5_ = _data_->contact_obj;
		if (_data_->_tmp5_ != NULL) {
			_data_->_tmp6_ = _data_->self->priv->members_list;
			_data_->_tmp4_ = _data_->_tmp6_ != NULL;
		} else {
			_data_->_tmp4_ = FALSE;
		}
		if (_data_->_tmp4_) {
			_data_->_tmp7_ = _data_->contact_obj;
			_data_->_tmp8_ = dc_rpc_parsers_parse_contact (_data_->contact_id, _data_->_tmp7_);
			_data_->contact = _data_->_tmp8_;
			_data_->_tmp9_ = _data_->contact;
			_data_->_tmp10_ = dc_chat_info_dialog_build_contact_row (_data_->self, _data_->_tmp9_);
			_data_->row = _data_->_tmp10_;
			_data_->_tmp11_ = _data_->self->priv->members_list;
			_data_->_tmp12_ = _data_->row;
			gtk_list_box_append (_data_->_tmp11_, (GtkWidget*) _data_->_tmp12_);
			_g_object_unref0 (_data_->row);
			_g_object_unref0 (_data_->contact);
		}
		_json_object_unref0 (_data_->contact_obj);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp13_ = _data_->e;
		_data_->_tmp14_ = _data_->_tmp13_->message;
		dc_show_error ((GtkWidget*) _data_->self, _data_->_tmp14_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static Block33Data*
block33_data_ref (Block33Data* _data33_)
{
	g_atomic_int_inc (&_data33_->_ref_count_);
	return _data33_;
}

static void
block33_data_unref (void * _userdata_)
{
	Block33Data* _data33_;
	_data33_ = (Block33Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data33_->_ref_count_)) {
		DcChatInfoDialog* self;
		self = _data33_->self;
		_g_object_unref0 (_data33_->contact);
		_g_object_unref0 (_data33_->row);
		_g_object_unref0 (self);
		g_slice_free (Block33Data, _data33_);
	}
}

static void
__lambda123_ (Block33Data* _data33_)
{
	DcChatInfoDialog* self;
	self = _data33_->self;
	dc_chat_info_dialog_set_contact_blocked (self, _data33_->contact, _data33_->row, TRUE, NULL, NULL);
}

static void
___lambda123__dc_void_func (gpointer self)
{
	__lambda123_ (self);
}

static void
dc_chat_info_dialog_confirm_block_contact (DcChatInfoDialog* self,
                                           DcContact* contact,
                                           AdwActionRow* row)
{
	Block33Data* _data33_;
	DcContact* _tmp0_;
	AdwActionRow* _tmp1_;
	gchar* label = NULL;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (contact != NULL);
	g_return_if_fail (row != NULL);
	_data33_ = g_slice_new0 (Block33Data);
	_data33_->_ref_count_ = 1;
	_data33_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (contact);
	_g_object_unref0 (_data33_->contact);
	_data33_->contact = _tmp0_;
	_tmp1_ = _g_object_ref0 (row);
	_g_object_unref0 (_data33_->row);
	_data33_->row = _tmp1_;
	_tmp2_ = dc_chat_info_dialog_contact_label (_data33_->contact);
	label = _tmp2_;
	_tmp3_ = g_strdup_printf ("Block \"%s\"? You will no longer receive messages from this contact.", label);
	_tmp4_ = _tmp3_;
	dc_confirm_action ((GtkWidget*) self, "Block Contact", _tmp4_, "block", "Block", ___lambda123__dc_void_func, block33_data_ref (_data33_), block33_data_unref);
	_g_free0 (_tmp4_);
	_g_free0 (label);
	block33_data_unref (_data33_);
	_data33_ = NULL;
}

static void
dc_chat_info_dialog_set_contact_blocked_data_free (gpointer _data)
{
	DcChatInfoDialogSetContactBlockedData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->contact);
	_g_object_unref0 (_data_->row);
	_g_object_unref0 (_data_->self);
	g_slice_free (DcChatInfoDialogSetContactBlockedData, _data_);
}

static void
dc_chat_info_dialog_set_contact_blocked (DcChatInfoDialog* self,
                                         DcContact* contact,
                                         AdwActionRow* row,
                                         gboolean blocked,
                                         GAsyncReadyCallback _callback_,
                                         gpointer _user_data_)
{
	DcChatInfoDialogSetContactBlockedData* _data_;
	DcChatInfoDialog* _tmp0_;
	DcContact* _tmp1_;
	AdwActionRow* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (contact != NULL);
	g_return_if_fail (row != NULL);
	_data_ = g_slice_new0 (DcChatInfoDialogSetContactBlockedData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, dc_chat_info_dialog_set_contact_blocked_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (contact);
	_g_object_unref0 (_data_->contact);
	_data_->contact = _tmp1_;
	_tmp2_ = _g_object_ref0 (row);
	_g_object_unref0 (_data_->row);
	_data_->row = _tmp2_;
	_data_->blocked = blocked;
	dc_chat_info_dialog_set_contact_blocked_co (_data_);
}

static void
dc_chat_info_dialog_set_contact_blocked_finish (DcChatInfoDialog* self,
                                                GAsyncResult* _res_)
{
	DcChatInfoDialogSetContactBlockedData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
dc_chat_info_dialog_set_contact_blocked_ready (GObject* source_object,
                                               GAsyncResult* _res_,
                                               gpointer _user_data_)
{
	DcChatInfoDialogSetContactBlockedData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	dc_chat_info_dialog_set_contact_blocked_co (_data_);
}

static gboolean
dc_chat_info_dialog_set_contact_blocked_co (DcChatInfoDialogSetContactBlockedData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		if (_data_->blocked) {
			_data_->_tmp0_ = _data_->self->priv->rpc;
			_data_->_tmp1_ = dc_contact_get_id (_data_->contact);
			_data_->_tmp2_ = _data_->_tmp1_;
			_data_->_state_ = 1;
			dc_rpc_client_block_contact (_data_->_tmp0_, _data_->_tmp2_, dc_chat_info_dialog_set_contact_blocked_ready, _data_);
			return FALSE;
			_state_1:
			dc_rpc_client_block_contact_finish (_data_->_tmp0_, _data_->_res_, &_data_->_inner_error0_);
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
		} else {
			_data_->_tmp3_ = _data_->self->priv->rpc;
			_data_->_tmp4_ = dc_contact_get_id (_data_->contact);
			_data_->_tmp5_ = _data_->_tmp4_;
			_data_->_state_ = 2;
			dc_rpc_client_unblock_contact (_data_->_tmp3_, _data_->_tmp5_, dc_chat_info_dialog_set_contact_blocked_ready, _data_);
			return FALSE;
			_state_2:
			dc_rpc_client_unblock_contact_finish (_data_->_tmp3_, _data_->_res_, &_data_->_inner_error0_);
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
		}
		dc_contact_set_is_blocked (_data_->contact, _data_->blocked);
		dc_chat_info_dialog_update_contact_block_row (_data_->self, _data_->row, _data_->contact);
		if (_data_->blocked) {
			g_signal_emit (_data_->self, dc_chat_info_dialog_signals[DC_CHAT_INFO_DIALOG_CONTACT_BLOCKED_SIGNAL], 0, _data_->self->priv->chat_id);
		} else {
			g_signal_emit (_data_->self, dc_chat_info_dialog_signals[DC_CHAT_INFO_DIALOG_CHAT_CHANGED_SIGNAL], 0);
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp6_ = _data_->e;
		_data_->_tmp7_ = _data_->_tmp6_->message;
		dc_show_error ((GtkWidget*) _data_->self, _data_->_tmp7_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

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

static void
dc_chat_info_dialog_confirm_clear_history (DcChatInfoDialog* self,
                                           gboolean for_all,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_)
{
	DcChatInfoDialogConfirmClearHistoryData* _data_;
	DcChatInfoDialog* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (DcChatInfoDialogConfirmClearHistoryData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, dc_chat_info_dialog_confirm_clear_history_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->for_all = for_all;
	dc_chat_info_dialog_confirm_clear_history_co (_data_);
}

static void
dc_chat_info_dialog_confirm_clear_history_finish (DcChatInfoDialog* self,
                                                  GAsyncResult* _res_)
{
	DcChatInfoDialogConfirmClearHistoryData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static Block34Data*
block34_data_ref (Block34Data* _data34_)
{
	g_atomic_int_inc (&_data34_->_ref_count_);
	return _data34_;
}

static void
block34_data_unref (void * _userdata_)
{
	Block34Data* _data34_;
	_data34_ = (Block34Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data34_->_ref_count_)) {
		DcChatInfoDialog* self;
		self = _data34_->self;
		_g_object_unref0 (self);
		g_slice_free (Block34Data, _data34_);
	}
}

static void
__lambda116_ (Block34Data* _data34_)
{
	DcChatInfoDialog* self;
	self = _data34_->self;
	dc_chat_info_dialog_do_clear_history (self, _data34_->for_all, NULL, NULL);
}

static void
___lambda116__dc_void_func (gpointer self)
{
	__lambda116_ (self);
}

static gboolean
dc_chat_info_dialog_confirm_clear_history_co (DcChatInfoDialogConfirmClearHistoryData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data34_ = g_slice_new0 (Block34Data);
	_data_->_data34_->_ref_count_ = 1;
	_data_->_data34_->self = g_object_ref (_data_->self);
	_data_->_data34_->for_all = _data_->for_all;
	_data_->_data34_->_async_data_ = _data_;
	if (_data_->_data34_->for_all) {
		_data_->_tmp0_ = "Clear for Everyone";
	} else {
		_data_->_tmp0_ = "Clear History";
	}
	_data_->_tmp1_ = g_strdup (_data_->_tmp0_);
	_data_->title = _data_->_tmp1_;
	if (_data_->_data34_->for_all) {
		_data_->_tmp2_ = "Delete all messages for all participants? This cannot be undone.";
	} else {
		_data_->_tmp2_ = "Delete all messages from your device? This cannot be undone.";
	}
	_data_->_tmp3_ = g_strdup (_data_->_tmp2_);
	_data_->body = _data_->_tmp3_;
	if (_data_->_data34_->for_all) {
		_data_->_tmp4_ = "Clear for Everyone";
	} else {
		_data_->_tmp4_ = "Clear";
	}
	_data_->_tmp5_ = g_strdup (_data_->_tmp4_);
	_data_->action_label = _data_->_tmp5_;
	_data_->_tmp6_ = _data_->title;
	_data_->_tmp7_ = _data_->body;
	dc_confirm_action ((GtkWidget*) _data_->self, _data_->_tmp6_, _data_->_tmp7_, "clear", _data_->action_label, ___lambda116__dc_void_func, block34_data_ref (_data_->_data34_), block34_data_unref);
	_g_free0 (_data_->action_label);
	_g_free0 (_data_->body);
	_g_free0 (_data_->title);
	block34_data_unref (_data_->_data34_);
	_data_->_data34_ = 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;
}

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

static void
dc_chat_info_dialog_do_clear_history (DcChatInfoDialog* self,
                                      gboolean for_all,
                                      GAsyncReadyCallback _callback_,
                                      gpointer _user_data_)
{
	DcChatInfoDialogDoClearHistoryData* _data_;
	DcChatInfoDialog* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (DcChatInfoDialogDoClearHistoryData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, dc_chat_info_dialog_do_clear_history_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->for_all = for_all;
	dc_chat_info_dialog_do_clear_history_co (_data_);
}

static void
dc_chat_info_dialog_do_clear_history_finish (DcChatInfoDialog* self,
                                             GAsyncResult* _res_)
{
	DcChatInfoDialogDoClearHistoryData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
dc_chat_info_dialog_do_clear_history_ready (GObject* source_object,
                                            GAsyncResult* _res_,
                                            gpointer _user_data_)
{
	DcChatInfoDialogDoClearHistoryData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	dc_chat_info_dialog_do_clear_history_co (_data_);
}

static gboolean
dc_chat_info_dialog_do_clear_history_co (DcChatInfoDialogDoClearHistoryData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_tmp0_ = _data_->self->priv->rpc;
		_data_->_state_ = 1;
		dc_rpc_client_get_message_ids (_data_->_tmp0_, _data_->self->priv->chat_id, FALSE, dc_chat_info_dialog_do_clear_history_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp1_ = dc_rpc_client_get_message_ids_finish (_data_->_tmp0_, _data_->_res_, &_data_->_inner_error0_);
		_data_->msg_ids = _data_->_tmp1_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp3_ = _data_->msg_ids;
		if (_data_->_tmp3_ == NULL) {
			_data_->_tmp2_ = TRUE;
		} else {
			_data_->_tmp4_ = _data_->msg_ids;
			_data_->_tmp2_ = json_array_get_length (_data_->_tmp4_) == ((guint) 0);
		}
		if (_data_->_tmp2_) {
			_json_array_unref0 (_data_->msg_ids);
			g_task_return_pointer (_data_->_async_result, _data_, NULL);
			if (_data_->_state_ != 0) {
				while (!g_task_get_completed (_data_->_async_result)) {
					g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
				}
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp5_ = _data_->msg_ids;
		_data_->_tmp6_ = 0;
		_data_->_tmp7_ = dc_json_ints (_data_->_tmp5_, &_data_->_tmp6_);
		_data_->ids = _data_->_tmp7_;
		_data_->ids_length1 = _data_->_tmp6_;
		_data_->_ids_size_ = _data_->ids_length1;
		if (_data_->for_all) {
			_data_->_tmp8_ = _data_->self->priv->rpc;
			_data_->_tmp9_ = _data_->ids;
			_data_->_tmp9__length1 = _data_->ids_length1;
			_data_->_state_ = 2;
			dc_rpc_client_delete_messages_for_all (_data_->_tmp8_, _data_->_tmp9_, (gint) _data_->_tmp9__length1, dc_chat_info_dialog_do_clear_history_ready, _data_);
			return FALSE;
			_state_2:
			dc_rpc_client_delete_messages_for_all_finish (_data_->_tmp8_, _data_->_res_, &_data_->_inner_error0_);
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				_data_->ids = (g_free (_data_->ids), NULL);
				_json_array_unref0 (_data_->msg_ids);
				goto __catch0_g_error;
			}
		} else {
			_data_->_tmp10_ = _data_->self->priv->rpc;
			_data_->_tmp11_ = _data_->ids;
			_data_->_tmp11__length1 = _data_->ids_length1;
			_data_->_state_ = 3;
			dc_rpc_client_delete_messages (_data_->_tmp10_, _data_->_tmp11_, (gint) _data_->_tmp11__length1, dc_chat_info_dialog_do_clear_history_ready, _data_);
			return FALSE;
			_state_3:
			dc_rpc_client_delete_messages_finish (_data_->_tmp10_, _data_->_res_, &_data_->_inner_error0_);
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				_data_->ids = (g_free (_data_->ids), NULL);
				_json_array_unref0 (_data_->msg_ids);
				goto __catch0_g_error;
			}
		}
		g_signal_emit (_data_->self, dc_chat_info_dialog_signals[DC_CHAT_INFO_DIALOG_CHAT_CHANGED_SIGNAL], 0);
		_data_->ids = (g_free (_data_->ids), NULL);
		_json_array_unref0 (_data_->msg_ids);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp12_ = _data_->e;
		_data_->_tmp13_ = _data_->_tmp12_->message;
		dc_show_error ((GtkWidget*) _data_->self, _data_->_tmp13_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

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

static void
dc_chat_info_dialog_confirm_leave_group (DcChatInfoDialog* self,
                                         GAsyncReadyCallback _callback_,
                                         gpointer _user_data_)
{
	DcChatInfoDialogConfirmLeaveGroupData* _data_;
	DcChatInfoDialog* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (DcChatInfoDialogConfirmLeaveGroupData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, dc_chat_info_dialog_confirm_leave_group_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	dc_chat_info_dialog_confirm_leave_group_co (_data_);
}

static void
dc_chat_info_dialog_confirm_leave_group_finish (DcChatInfoDialog* self,
                                                GAsyncResult* _res_)
{
	DcChatInfoDialogConfirmLeaveGroupData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
__lambda119_ (DcChatInfoDialog* self)
{
	dc_chat_info_dialog_do_leave_group (self, NULL, NULL);
}

static void
___lambda119__dc_void_func (gpointer self)
{
	__lambda119_ ((DcChatInfoDialog*) self);
}

static gboolean
dc_chat_info_dialog_confirm_leave_group_co (DcChatInfoDialogConfirmLeaveGroupData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->chat_name;
	_data_->_tmp1_ = g_strdup_printf ("Leave \"%s\"? You will stop receiving messages.", _data_->_tmp0_);
	_data_->_tmp2_ = _data_->_tmp1_;
	dc_confirm_action ((GtkWidget*) _data_->self, "Leave Group", _data_->_tmp2_, "leave", "Leave", ___lambda119__dc_void_func, g_object_ref (_data_->self), g_object_unref);
	_g_free0 (_data_->_tmp2_);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

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

static void
dc_chat_info_dialog_do_leave_group (DcChatInfoDialog* self,
                                    GAsyncReadyCallback _callback_,
                                    gpointer _user_data_)
{
	DcChatInfoDialogDoLeaveGroupData* _data_;
	DcChatInfoDialog* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (DcChatInfoDialogDoLeaveGroupData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, dc_chat_info_dialog_do_leave_group_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	dc_chat_info_dialog_do_leave_group_co (_data_);
}

static void
dc_chat_info_dialog_do_leave_group_finish (DcChatInfoDialog* self,
                                           GAsyncResult* _res_)
{
	DcChatInfoDialogDoLeaveGroupData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
dc_chat_info_dialog_do_leave_group_ready (GObject* source_object,
                                          GAsyncResult* _res_,
                                          gpointer _user_data_)
{
	DcChatInfoDialogDoLeaveGroupData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	dc_chat_info_dialog_do_leave_group_co (_data_);
}

static gboolean
dc_chat_info_dialog_do_leave_group_co (DcChatInfoDialogDoLeaveGroupData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_tmp0_ = _data_->self->priv->rpc;
		_data_->_state_ = 1;
		dc_rpc_client_leave_group (_data_->_tmp0_, _data_->self->priv->chat_id, dc_chat_info_dialog_do_leave_group_ready, _data_);
		return FALSE;
		_state_1:
		dc_rpc_client_leave_group_finish (_data_->_tmp0_, _data_->_res_, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		g_signal_emit (_data_->self, dc_chat_info_dialog_signals[DC_CHAT_INFO_DIALOG_CHAT_CHANGED_SIGNAL], 0);
		adw_dialog_close ((AdwDialog*) _data_->self);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp1_ = _data_->e;
		_data_->_tmp2_ = _data_->_tmp1_->message;
		dc_show_error ((GtkWidget*) _data_->self, _data_->_tmp2_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

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

static void
dc_chat_info_dialog_confirm_disband_group (DcChatInfoDialog* self,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_)
{
	DcChatInfoDialogConfirmDisbandGroupData* _data_;
	DcChatInfoDialog* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (DcChatInfoDialogConfirmDisbandGroupData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, dc_chat_info_dialog_confirm_disband_group_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	dc_chat_info_dialog_confirm_disband_group_co (_data_);
}

static void
dc_chat_info_dialog_confirm_disband_group_finish (DcChatInfoDialog* self,
                                                  GAsyncResult* _res_)
{
	DcChatInfoDialogConfirmDisbandGroupData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
__lambda121_ (DcChatInfoDialog* self)
{
	dc_chat_info_dialog_do_disband_group (self, NULL, NULL);
}

static void
___lambda121__dc_void_func (gpointer self)
{
	__lambda121_ ((DcChatInfoDialog*) self);
}

static gboolean
dc_chat_info_dialog_confirm_disband_group_co (DcChatInfoDialogConfirmDisbandGroupData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->chat_name;
	_data_->_tmp1_ = g_strdup_printf ("Remove all members from \"%s\" and delete all messages? This cannot be" \
" undone.", _data_->_tmp0_);
	_data_->_tmp2_ = _data_->_tmp1_;
	dc_confirm_action ((GtkWidget*) _data_->self, "Disband Group", _data_->_tmp2_, "disband", "Disband", ___lambda121__dc_void_func, g_object_ref (_data_->self), g_object_unref);
	_g_free0 (_data_->_tmp2_);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

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

static void
dc_chat_info_dialog_do_disband_group (DcChatInfoDialog* self,
                                      GAsyncReadyCallback _callback_,
                                      gpointer _user_data_)
{
	DcChatInfoDialogDoDisbandGroupData* _data_;
	DcChatInfoDialog* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (DcChatInfoDialogDoDisbandGroupData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, dc_chat_info_dialog_do_disband_group_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	dc_chat_info_dialog_do_disband_group_co (_data_);
}

static void
dc_chat_info_dialog_do_disband_group_finish (DcChatInfoDialog* self,
                                             GAsyncResult* _res_)
{
	DcChatInfoDialogDoDisbandGroupData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
dc_chat_info_dialog_do_disband_group_ready (GObject* source_object,
                                            GAsyncResult* _res_,
                                            gpointer _user_data_)
{
	DcChatInfoDialogDoDisbandGroupData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	dc_chat_info_dialog_do_disband_group_co (_data_);
}

static gboolean
dc_chat_info_dialog_do_disband_group_co (DcChatInfoDialogDoDisbandGroupData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		case 4:
		goto _state_4;
		case 5:
		goto _state_5;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_tmp0_ = _data_->self->priv->member_contact_ids;
		_data_->_tmp0__length1 = _data_->self->priv->member_contact_ids_length1;
		{
			_data_->cid_collection_length1 = 0;
			_data_->_cid_collection_size_ = 0;
			_data_->cid_collection = _data_->_tmp0_;
			_data_->cid_collection_length1 = _data_->_tmp0__length1;
			for (_data_->cid_it = 0; _data_->cid_it < _data_->cid_collection_length1; _data_->cid_it = _data_->cid_it + 1) {
				_data_->cid = _data_->cid_collection[_data_->cid_it];
				{
					if (_data_->cid != 1) {
						_data_->_tmp1_ = _data_->self->priv->rpc;
						_data_->_state_ = 1;
						dc_rpc_client_remove_contact_from_chat (_data_->_tmp1_, _data_->self->priv->chat_id, _data_->cid, dc_chat_info_dialog_do_disband_group_ready, _data_);
						return FALSE;
						_state_1:
						dc_rpc_client_remove_contact_from_chat_finish (_data_->_tmp1_, _data_->_res_, &_data_->_inner_error0_);
						if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
							goto __catch0_g_error;
						}
					}
				}
			}
		}
		_data_->_tmp2_ = _data_->self->priv->rpc;
		_data_->_state_ = 2;
		dc_rpc_client_get_message_ids (_data_->_tmp2_, _data_->self->priv->chat_id, FALSE, dc_chat_info_dialog_do_disband_group_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp3_ = dc_rpc_client_get_message_ids_finish (_data_->_tmp2_, _data_->_res_, &_data_->_inner_error0_);
		_data_->msg_ids = _data_->_tmp3_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp5_ = _data_->msg_ids;
		if (_data_->_tmp5_ != NULL) {
			_data_->_tmp6_ = _data_->msg_ids;
			_data_->_tmp4_ = json_array_get_length (_data_->_tmp6_) > ((guint) 0);
		} else {
			_data_->_tmp4_ = FALSE;
		}
		if (_data_->_tmp4_) {
			_data_->_tmp7_ = _data_->self->priv->rpc;
			_data_->_tmp8_ = _data_->msg_ids;
			_data_->_tmp9_ = 0;
			_data_->_tmp10_ = dc_json_ints (_data_->_tmp8_, &_data_->_tmp9_);
			_data_->_tmp11_ = _data_->_tmp10_;
			_data_->_tmp11__length1 = _data_->_tmp9_;
			_data_->_state_ = 3;
			dc_rpc_client_delete_messages_for_all (_data_->_tmp7_, _data_->_tmp11_, (gint) _data_->_tmp9_, dc_chat_info_dialog_do_disband_group_ready, _data_);
			return FALSE;
			_state_3:
			dc_rpc_client_delete_messages_for_all_finish (_data_->_tmp7_, _data_->_res_, &_data_->_inner_error0_);
			_data_->_tmp11_ = (g_free (_data_->_tmp11_), NULL);
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				_json_array_unref0 (_data_->msg_ids);
				goto __catch0_g_error;
			}
		}
		_data_->_tmp12_ = _data_->self->priv->rpc;
		_data_->_state_ = 4;
		dc_rpc_client_leave_group (_data_->_tmp12_, _data_->self->priv->chat_id, dc_chat_info_dialog_do_disband_group_ready, _data_);
		return FALSE;
		_state_4:
		dc_rpc_client_leave_group_finish (_data_->_tmp12_, _data_->_res_, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_json_array_unref0 (_data_->msg_ids);
			goto __catch0_g_error;
		}
		_data_->_tmp13_ = _data_->self->priv->rpc;
		_data_->_state_ = 5;
		dc_rpc_client_delete_chat (_data_->_tmp13_, _data_->self->priv->chat_id, dc_chat_info_dialog_do_disband_group_ready, _data_);
		return FALSE;
		_state_5:
		dc_rpc_client_delete_chat_finish (_data_->_tmp13_, _data_->_res_, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_json_array_unref0 (_data_->msg_ids);
			goto __catch0_g_error;
		}
		g_signal_emit (_data_->self, dc_chat_info_dialog_signals[DC_CHAT_INFO_DIALOG_CHAT_DELETED_SIGNAL], 0, _data_->self->priv->chat_id);
		adw_dialog_close ((AdwDialog*) _data_->self);
		_json_array_unref0 (_data_->msg_ids);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp14_ = _data_->e;
		_data_->_tmp15_ = _data_->_tmp14_->message;
		dc_show_error ((GtkWidget*) _data_->self, _data_->_tmp15_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

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

static void
dc_chat_info_dialog_confirm_delete_chat (DcChatInfoDialog* self,
                                         GAsyncReadyCallback _callback_,
                                         gpointer _user_data_)
{
	DcChatInfoDialogConfirmDeleteChatData* _data_;
	DcChatInfoDialog* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (DcChatInfoDialogConfirmDeleteChatData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, dc_chat_info_dialog_confirm_delete_chat_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	dc_chat_info_dialog_confirm_delete_chat_co (_data_);
}

static void
dc_chat_info_dialog_confirm_delete_chat_finish (DcChatInfoDialog* self,
                                                GAsyncResult* _res_)
{
	DcChatInfoDialogConfirmDeleteChatData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
__lambda125_ (DcChatInfoDialog* self)
{
	dc_chat_info_dialog_do_delete_chat_from_dialog (self, NULL, NULL);
}

static void
___lambda125__dc_void_func (gpointer self)
{
	__lambda125_ ((DcChatInfoDialog*) self);
}

static gboolean
dc_chat_info_dialog_confirm_delete_chat_co (DcChatInfoDialogConfirmDeleteChatData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->chat_name;
	_data_->_tmp1_ = g_strdup_printf ("Remove \"%s\" from your chat list? You may still receive messages if y" \
"ou are a member.", _data_->_tmp0_);
	_data_->_tmp2_ = _data_->_tmp1_;
	dc_confirm_action ((GtkWidget*) _data_->self, "Delete for Me", _data_->_tmp2_, "delete", "Delete", ___lambda125__dc_void_func, g_object_ref (_data_->self), g_object_unref);
	_g_free0 (_data_->_tmp2_);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

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

static void
dc_chat_info_dialog_do_delete_chat_from_dialog (DcChatInfoDialog* self,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_)
{
	DcChatInfoDialogDoDeleteChatFromDialogData* _data_;
	DcChatInfoDialog* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (DcChatInfoDialogDoDeleteChatFromDialogData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, dc_chat_info_dialog_do_delete_chat_from_dialog_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	dc_chat_info_dialog_do_delete_chat_from_dialog_co (_data_);
}

static void
dc_chat_info_dialog_do_delete_chat_from_dialog_finish (DcChatInfoDialog* self,
                                                       GAsyncResult* _res_)
{
	DcChatInfoDialogDoDeleteChatFromDialogData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
dc_chat_info_dialog_do_delete_chat_from_dialog_ready (GObject* source_object,
                                                      GAsyncResult* _res_,
                                                      gpointer _user_data_)
{
	DcChatInfoDialogDoDeleteChatFromDialogData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	dc_chat_info_dialog_do_delete_chat_from_dialog_co (_data_);
}

static gboolean
dc_chat_info_dialog_do_delete_chat_from_dialog_co (DcChatInfoDialogDoDeleteChatFromDialogData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_tmp0_ = _data_->self->priv->rpc;
		_data_->_state_ = 1;
		dc_rpc_client_delete_chat (_data_->_tmp0_, _data_->self->priv->chat_id, dc_chat_info_dialog_do_delete_chat_from_dialog_ready, _data_);
		return FALSE;
		_state_1:
		dc_rpc_client_delete_chat_finish (_data_->_tmp0_, _data_->_res_, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		g_signal_emit (_data_->self, dc_chat_info_dialog_signals[DC_CHAT_INFO_DIALOG_CHAT_DELETED_SIGNAL], 0, _data_->self->priv->chat_id);
		adw_dialog_close ((AdwDialog*) _data_->self);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp1_ = _data_->e;
		_data_->_tmp2_ = _data_->_tmp1_->message;
		dc_show_error ((GtkWidget*) _data_->self, _data_->_tmp2_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

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

static void
dc_chat_info_dialog_pick_avatar (DcChatInfoDialog* self,
                                 GAsyncReadyCallback _callback_,
                                 gpointer _user_data_)
{
	DcChatInfoDialogPickAvatarData* _data_;
	DcChatInfoDialog* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (DcChatInfoDialogPickAvatarData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, dc_chat_info_dialog_pick_avatar_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	dc_chat_info_dialog_pick_avatar_co (_data_);
}

static void
dc_chat_info_dialog_pick_avatar_finish (DcChatInfoDialog* self,
                                        GAsyncResult* _res_)
{
	DcChatInfoDialogPickAvatarData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
dc_chat_info_dialog_pick_avatar_ready (GObject* source_object,
                                       GAsyncResult* _res_,
                                       gpointer _user_data_)
{
	DcChatInfoDialogPickAvatarData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	dc_chat_info_dialog_pick_avatar_co (_data_);
}

static gboolean
dc_chat_info_dialog_pick_avatar_co (DcChatInfoDialogPickAvatarData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = gtk_widget_get_root ((GtkWidget*) _data_->self);
	_data_->_state_ = 1;
	dc_pick_image_file (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp0_, gtk_window_get_type (), GtkWindow), "Select Avatar Image", dc_chat_info_dialog_pick_avatar_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp1_ = dc_pick_image_file_finish (_data_->_res_);
	_data_->path = _data_->_tmp1_;
	_data_->_tmp2_ = _data_->path;
	if (_data_->_tmp2_ == NULL) {
		_g_free0 (_data_->path);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	{
		_data_->_tmp3_ = _data_->self->priv->rpc;
		_data_->_tmp4_ = _data_->path;
		_data_->_state_ = 2;
		dc_rpc_client_set_chat_profile_image (_data_->_tmp3_, _data_->self->priv->chat_id, _data_->_tmp4_, dc_chat_info_dialog_pick_avatar_ready, _data_);
		return FALSE;
		_state_2:
		dc_rpc_client_set_chat_profile_image_finish (_data_->_tmp3_, _data_->_res_, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_data_->_inner_error0_);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_free0 (_data_->path);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_g_free0 (_data_->path);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
dc_chat_info_dialog_class_init (DcChatInfoDialogClass * klass,
                                gpointer klass_data)
{
	dc_chat_info_dialog_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DcChatInfoDialog_private_offset);
	G_OBJECT_CLASS (klass)->finalize = dc_chat_info_dialog_finalize;
	dc_chat_info_dialog_signals[DC_CHAT_INFO_DIALOG_CHAT_DELETED_SIGNAL] = g_signal_new ("chat-deleted", DC_TYPE_CHAT_INFO_DIALOG, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT);
	dc_chat_info_dialog_signals[DC_CHAT_INFO_DIALOG_CHAT_CHANGED_SIGNAL] = g_signal_new ("chat-changed", DC_TYPE_CHAT_INFO_DIALOG, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	dc_chat_info_dialog_signals[DC_CHAT_INFO_DIALOG_CONTACT_BLOCKED_SIGNAL] = g_signal_new ("contact-blocked", DC_TYPE_CHAT_INFO_DIALOG, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT);
}

static void
dc_chat_info_dialog_instance_init (DcChatInfoDialog * self,
                                   gpointer klass)
{
	gchar* _tmp0_;
	gint* _tmp1_;
	self->priv = dc_chat_info_dialog_get_instance_private (self);
	self->priv->is_group = FALSE;
	self->priv->members_list = NULL;
	_tmp0_ = g_strdup ("");
	self->priv->chat_name = _tmp0_;
	_tmp1_ = g_new0 (gint, 0);
	self->priv->member_contact_ids = _tmp1_;
	self->priv->member_contact_ids_length1 = 0;
	self->priv->_member_contact_ids_size_ = self->priv->member_contact_ids_length1;
	self->priv->dm_contact = NULL;
}

static void
dc_chat_info_dialog_finalize (GObject * obj)
{
	DcChatInfoDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DC_TYPE_CHAT_INFO_DIALOG, DcChatInfoDialog);
	_g_object_unref0 (self->priv->rpc);
	_g_object_unref0 (self->priv->members_list);
	_g_object_unref0 (self->priv->content);
	_g_free0 (self->priv->chat_name);
	self->priv->member_contact_ids = (g_free (self->priv->member_contact_ids), NULL);
	_g_object_unref0 (self->priv->dm_contact);
	G_OBJECT_CLASS (dc_chat_info_dialog_parent_class)->finalize (obj);
}

static GType
dc_chat_info_dialog_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DcChatInfoDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dc_chat_info_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DcChatInfoDialog), 0, (GInstanceInitFunc) dc_chat_info_dialog_instance_init, NULL };
	GType dc_chat_info_dialog_type_id;
	dc_chat_info_dialog_type_id = g_type_register_static (adw_dialog_get_type (), "DcChatInfoDialog", &g_define_type_info, 0);
	DcChatInfoDialog_private_offset = g_type_add_instance_private (dc_chat_info_dialog_type_id, sizeof (DcChatInfoDialogPrivate));
	return dc_chat_info_dialog_type_id;
}

GType
dc_chat_info_dialog_get_type (void)
{
	static volatile gsize dc_chat_info_dialog_type_id__once = 0;
	if (g_once_init_enter (&dc_chat_info_dialog_type_id__once)) {
		GType dc_chat_info_dialog_type_id;
		dc_chat_info_dialog_type_id = dc_chat_info_dialog_get_type_once ();
		g_once_init_leave (&dc_chat_info_dialog_type_id__once, dc_chat_info_dialog_type_id);
	}
	return dc_chat_info_dialog_type_id__once;
}

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

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

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

