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

#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <adwaita.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <gio/gio.h>
#include <json-glib/json-glib.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_WINDOW (dc_window_get_type ())
#define DC_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DC_TYPE_WINDOW, DcWindow))
#define DC_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DC_TYPE_WINDOW, DcWindowClass))
#define DC_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DC_TYPE_WINDOW))
#define DC_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DC_TYPE_WINDOW))
#define DC_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DC_TYPE_WINDOW, DcWindowClass))

typedef struct _DcWindow DcWindow;
typedef struct _DcWindowClass DcWindowClass;

#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_IMAGE_VIEWER (dc_image_viewer_get_type ())
#define DC_IMAGE_VIEWER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DC_TYPE_IMAGE_VIEWER, DcImageViewer))
#define DC_IMAGE_VIEWER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DC_TYPE_IMAGE_VIEWER, DcImageViewerClass))
#define DC_IS_IMAGE_VIEWER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DC_TYPE_IMAGE_VIEWER))
#define DC_IS_IMAGE_VIEWER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DC_TYPE_IMAGE_VIEWER))
#define DC_IMAGE_VIEWER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DC_TYPE_IMAGE_VIEWER, DcImageViewerClass))

typedef struct _DcImageViewer DcImageViewer;
typedef struct _DcImageViewerClass DcImageViewerClass;

#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 void (*DcVoidFunc) (gpointer user_data);
typedef struct _Block62Data Block62Data;
typedef struct _Block63Data Block63Data;
typedef struct _Block64Data Block64Data;
typedef struct _Block65Data Block65Data;
#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)))
typedef struct _Block66Data Block66Data;

#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 DC_TYPE_GALLERY_DIALOG (dc_gallery_dialog_get_type ())
#define DC_GALLERY_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DC_TYPE_GALLERY_DIALOG, DcGalleryDialog))
#define DC_GALLERY_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DC_TYPE_GALLERY_DIALOG, DcGalleryDialogClass))
#define DC_IS_GALLERY_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DC_TYPE_GALLERY_DIALOG))
#define DC_IS_GALLERY_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DC_TYPE_GALLERY_DIALOG))
#define DC_GALLERY_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DC_TYPE_GALLERY_DIALOG, DcGalleryDialogClass))

typedef struct _DcGalleryDialog DcGalleryDialog;
typedef struct _DcGalleryDialogClass DcGalleryDialogClass;
typedef struct _DcGalleryDialogPrivate DcGalleryDialogPrivate;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _DcChatInfoDialogLoadInfoData DcChatInfoDialogLoadInfoData;
typedef struct _DcChatInfoDialogSetMuteData DcChatInfoDialogSetMuteData;
typedef struct _Block67Data Block67Data;
typedef struct _Block68Data Block68Data;
typedef struct _Block69Data Block69Data;
typedef struct _Block70Data Block70Data;
typedef struct _Block71Data Block71Data;
typedef struct _DcChatInfoDialogSaveContactNameData DcChatInfoDialogSaveContactNameData;
typedef struct _Block72Data Block72Data;
typedef struct _DcChatInfoDialogSaveGroupNameData DcChatInfoDialogSaveGroupNameData;
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 _Block73Data Block73Data;
typedef struct _DcChatInfoDialogSetContactBlockedData DcChatInfoDialogSetContactBlockedData;
typedef struct _Block74Data Block74Data;
typedef struct _DcChatInfoDialogDoClearHistoryData DcChatInfoDialogDoClearHistoryData;
typedef struct _DcChatInfoDialogDeleteAllMessagesData DcChatInfoDialogDeleteAllMessagesData;
typedef struct _DcChatInfoDialogDoLeaveGroupData DcChatInfoDialogDoLeaveGroupData;
typedef struct _DcChatInfoDialogDoDisbandGroupData DcChatInfoDialogDoDisbandGroupData;
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 {
	DcWindow* app_window;
	DcRpcClient* rpc;
	gint chat_id;
	gboolean is_group;
	GtkListBox* members_list;
	GtkBox* content;
	DcImageViewer* viewer;
	gchar* chat_name;
	gint* member_contact_ids;
	gint member_contact_ids_length1;
	gint _member_contact_ids_size_;
	DcContact* dm_contact;
};

struct _Block62Data {
	int _ref_count_;
	DcChatInfoDialog* self;
	DcVoidFunc action;
	gpointer action_target;
	GDestroyNotify action_target_destroy_notify;
};

struct _Block63Data {
	int _ref_count_;
	DcChatInfoDialog* self;
	DcVoidFunc action;
	gpointer action_target;
	GDestroyNotify action_target_destroy_notify;
};

struct _Block64Data {
	int _ref_count_;
	DcChatInfoDialog* self;
	DcVoidFunc action;
	gpointer action_target;
	GDestroyNotify action_target_destroy_notify;
};

struct _Block65Data {
	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;
	gchar** mute_labels;
	gint mute_labels_length1;
	gint _mute_labels_size_;
	GtkDropDown* mute_combo;
};

struct _Block66Data {
	int _ref_count_;
	Block65Data * _data65_;
	gchar* img;
};

struct _DcGalleryDialog {
	AdwDialog parent_instance;
	DcGalleryDialogPrivate * priv;
	AdwDialog* presenter_dialog;
};

struct _DcGalleryDialogClass {
	AdwDialogClass parent_class;
};

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

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

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

struct _Block68Data {
	int _ref_count_;
	Block67Data * _data67_;
	gchar* addr;
};

struct _Block69Data {
	int _ref_count_;
	Block67Data * _data67_;
	gint cid;
};

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

struct _Block71Data {
	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_;
	DcRpcClient* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	JsonObject* _tmp5_;
	DcContact* _tmp6_;
	JsonObject* _tmp7_;
	JsonObject* _tmp8_;
	DcContact* _tmp9_;
	DcContact* contact;
	DcContact* _tmp10_;
	DcContact* _tmp11_;
	DcContact* _tmp12_;
	DcContact* _tmp13_;
	DcContact* _tmp14_;
	gchar* _tmp15_;
	const gchar* _tmp16_;
	gboolean _tmp17_;
	GtkListBox* _tmp18_;
	GtkListBox* _tmp19_;
	GtkListBox* _tmp20_;
	DcContact* _tmp21_;
	AdwActionRow* _tmp22_;
	AdwActionRow* _tmp23_;
	gint _tmp24_;
	gint _tmp25_;
	gchar* _tmp26_;
	GError* e;
	GError* _tmp27_;
	const gchar* _tmp28_;
	GError* _inner_error0_;
};

struct _Block72Data {
	int _ref_count_;
	DcChatInfoDialog* self;
	AdwAlertDialog* dialog;
	GtkEntry* entry;
	GtkLabel* name_lbl;
};

struct _DcChatInfoDialogSaveGroupNameData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DcChatInfoDialog* self;
	gchar* new_name;
	GtkLabel* name_lbl;
	DcRpcClient* _tmp0_;
	gchar* _tmp1_;
	GError* e;
	GError* _tmp2_;
	const gchar* _tmp3_;
	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_;
	DcRpcClient* _tmp3_;
	gint _tmp4_;
	gint _tmp5_;
	JsonObject* _tmp6_;
	DcContact* _tmp7_;
	JsonObject* _tmp8_;
	JsonObject* _tmp9_;
	DcContact* _tmp10_;
	DcContact* contact;
	DcContact* _tmp11_;
	gboolean _tmp12_;
	DcContact* _tmp13_;
	GtkListBox* _tmp14_;
	AdwActionRow* row;
	DcContact* _tmp15_;
	AdwActionRow* _tmp16_;
	GtkListBox* _tmp17_;
	AdwActionRow* _tmp18_;
	GError* e;
	GError* _tmp19_;
	const gchar* _tmp20_;
	GError* _inner_error0_;
};

struct _Block73Data {
	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 _Block74Data {
	int _ref_count_;
	DcChatInfoDialog* self;
	gboolean for_all;
};

struct _DcChatInfoDialogDoClearHistoryData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DcChatInfoDialog* self;
	gboolean for_all;
	GError* e;
	GError* _tmp0_;
	const gchar* _tmp1_;
	GError* _inner_error0_;
};

struct _DcChatInfoDialogDeleteAllMessagesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DcChatInfoDialog* self;
	gboolean for_all;
	gint* ids;
	DcRpcClient* _tmp0_;
	DcRpcClient* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	gint* _tmp5_;
	gint ids_length1;
	gint _ids_size_;
	gint* _tmp6_;
	gint _tmp6__length1;
	DcRpcClient* _tmp7_;
	gint* _tmp8_;
	gint _tmp8__length1;
	DcRpcClient* _tmp9_;
	gint* _tmp10_;
	gint _tmp10__length1;
	GError* _inner_error0_;
};

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 _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_;
	DcRpcClient* _tmp2_;
	DcRpcClient* _tmp3_;
	GError* e;
	GError* _tmp4_;
	const gchar* _tmp5_;
	GError* _inner_error0_;
};

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_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DcWindow, 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_image_viewer_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DcImageViewer, g_object_unref)
VALA_EXTERN GType dc_contact_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DcContact, g_object_unref)
static GtkListBox* dc_chat_info_dialog_boxed_list (DcChatInfoDialog* self);
static void dc_chat_info_dialog_style_flat_button (DcChatInfoDialog* self,
                                            GtkButton* button,
                                            gboolean _error_);
static GtkButton* dc_chat_info_dialog_flat_button (DcChatInfoDialog* self,
                                            const gchar* label,
                                            DcVoidFunc action,
                                            gpointer action_target,
                                            GDestroyNotify action_target_destroy_notify,
                                            gboolean _error_);
static Block62Data* block62_data_ref (Block62Data* _data62_);
static void block62_data_unref (void * _userdata_);
static void __lambda261_ (Block62Data* _data62_);
static void ___lambda261__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static GtkButton* dc_chat_info_dialog_flat_icon_button (DcChatInfoDialog* self,
                                                 const gchar* icon_name,
                                                 const gchar* tooltip,
                                                 DcVoidFunc action,
                                                 gpointer action_target,
                                                 GDestroyNotify action_target_destroy_notify,
                                                 gboolean _error_);
static Block63Data* block63_data_ref (Block63Data* _data63_);
static void block63_data_unref (void * _userdata_);
static void __lambda262_ (Block63Data* _data63_);
static void ___lambda262__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static AdwActionRow* dc_chat_info_dialog_action_row (DcChatInfoDialog* self,
                                              const gchar* title,
                                              const gchar* subtitle,
                                              const gchar* icon_name,
                                              DcVoidFunc action,
                                              gpointer action_target,
                                              GDestroyNotify action_target_destroy_notify);
static Block64Data* block64_data_ref (Block64Data* _data64_);
static void block64_data_unref (void * _userdata_);
static void __lambda263_ (Block64Data* _data64_);
static void ___lambda263__adw_action_row_activated (AdwActionRow* _sender,
                                             gpointer self);
VALA_EXTERN DcChatInfoDialog* dc_chat_info_dialog_new (DcWindow* window,
                                           DcRpcClient* rpc,
                                           gint chat_id);
VALA_EXTERN DcChatInfoDialog* dc_chat_info_dialog_construct (GType object_type,
                                                 DcWindow* window,
                                                 DcRpcClient* rpc,
                                                 gint chat_id);
VALA_EXTERN DcImageViewer* dc_image_viewer_new (void);
VALA_EXTERN DcImageViewer* dc_image_viewer_construct (GType object_type);
VALA_EXTERN void dc_image_viewer_set_window (DcImageViewer* self,
                                 DcWindow* w);
VALA_EXTERN GtkWidget* dc_image_viewer_get_widget (DcImageViewer* self);
static gboolean __lambda264_ (DcChatInfoDialog* self,
                       guint kv,
                       guint code,
                       GdkModifierType state);
VALA_EXTERN gboolean dc_image_viewer_get_visible (DcImageViewer* self);
VALA_EXTERN gboolean dc_image_viewer_handle_key (DcImageViewer* self,
                                     guint keyval);
static gboolean ___lambda264__gtk_event_controller_key_key_pressed (GtkEventControllerKey* _sender,
                                                             guint keyval,
                                                             guint keycode,
                                                             GdkModifierType state,
                                                             gpointer self);
static void __lambda265_ (DcChatInfoDialog* self);
static void ___lambda265__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
static void __lambda266_ (DcChatInfoDialog* self);
VALA_EXTERN void dc_image_viewer_hide (DcImageViewer* self);
static void ___lambda266__adw_dialog_close_attempt (AdwDialog* _sender,
                                             gpointer self);
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 Block65Data* block65_data_ref (Block65Data* _data65_);
static void block65_data_unref (void * _userdata_);
VALA_EXTERN void dc_rpc_client_get_full_chat_by_id_for (DcRpcClient* self,
                                            gint acct_id,
                                            gint chat_id,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_);
VALA_EXTERN JsonObject* dc_rpc_client_get_full_chat_by_id_for_finish (DcRpcClient* self,
                                                          GAsyncResult* _res_,
                                                          GError** error);
VALA_EXTERN gint dc_rpc_client_get_account_id (DcRpcClient* self);
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 Block66Data* block66_data_ref (Block66Data* _data66_);
static void block66_data_unref (void * _userdata_);
static void ____lambda267_ (Block66Data* _data66_);
VALA_EXTERN void dc_image_viewer_show_list (DcImageViewer* self,
                                gchar** image_paths,
                                gint image_paths_length1,
                                gint start_index);
static void _____lambda267__gtk_button_clicked (GtkButton* _sender,
                                         gpointer self);
static void ____lambda268_ (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 _____lambda268__dc_void_func (gpointer self);
static void ____lambda269_ (Block65Data* _data65_);
static void dc_chat_info_dialog_show_edit_contact_name_dialog (DcChatInfoDialog* self,
                                                        gint contact_id,
                                                        GtkLabel* name_lbl);
static void _____lambda269__dc_void_func (gpointer self);
static void _____lambda274_ (Block65Data* _data65_);
static void dc_chat_info_dialog_show_edit_group_name_dialog (DcChatInfoDialog* self,
                                                      GtkLabel* name_lbl);
static void ______lambda274__dc_void_func (gpointer self);
static void ____lambda277_ (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 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 _____lambda277__dc_void_func (gpointer self);
VALA_EXTERN gint64 dc_json_int (JsonObject* obj,
                    const gchar* key,
                    gint64 fallback);
static void ___lambda278_ (Block65Data* _data65_);
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 ____lambda278__g_object_notify (GObject* _sender,
                                     GParamSpec* pspec,
                                     gpointer self);
static void ___lambda279_ (Block65Data* _data65_);
static void dc_chat_info_dialog_set_mute (DcChatInfoDialog* self,
                                   gint seconds,
                                   GAsyncReadyCallback _callback_,
                                   gpointer _user_data_);
static void dc_chat_info_dialog_set_mute_finish (DcChatInfoDialog* self,
                                          GAsyncResult* _res_);
static void ____lambda279__g_object_notify (GObject* _sender,
                                     GParamSpec* pspec,
                                     gpointer self);
static void ___lambda280_ (DcChatInfoDialog* self);
VALA_EXTERN GType dc_gallery_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DcGalleryDialog, g_object_unref)
VALA_EXTERN DcGalleryDialog* dc_gallery_dialog_new (DcWindow* window,
                                        DcRpcClient* rpc,
                                        gint chat_id,
                                        const gchar* chat_name);
VALA_EXTERN DcGalleryDialog* dc_gallery_dialog_construct (GType object_type,
                                              DcWindow* window,
                                              DcRpcClient* rpc,
                                              gint chat_id,
                                              const gchar* chat_name);
static void ____lambda280__dc_void_func (gpointer self);
static void _____lambda281_ (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 ______lambda281__dc_void_func (gpointer self);
static void _vala_array_add21 (gint* * array,
                        gint* length,
                        gint* size,
                        gint value);
VALA_EXTERN void dc_rpc_client_get_contact_for (DcRpcClient* self,
                                    gint acct_id,
                                    gint contact_id,
                                    GAsyncReadyCallback _callback_,
                                    gpointer _user_data_);
VALA_EXTERN JsonObject* dc_rpc_client_get_contact_for_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 ___lambda283_ (DcChatInfoDialog* self);
static void dc_chat_info_dialog_confirm_clear_history (DcChatInfoDialog* self,
                                                gboolean for_all);
static void ____lambda283__dc_void_func (gpointer self);
static void ___lambda285_ (DcChatInfoDialog* self);
static void ____lambda285__dc_void_func (gpointer self);
static void ____lambda286_ (DcChatInfoDialog* self);
static void dc_chat_info_dialog_confirm_leave_group (DcChatInfoDialog* self);
static void _____lambda286__dc_void_func (gpointer self);
static void ____lambda288_ (DcChatInfoDialog* self);
static void dc_chat_info_dialog_confirm_disband_group (DcChatInfoDialog* self);
static void _____lambda288__dc_void_func (gpointer self);
static AdwActionRow* dc_chat_info_dialog_build_contact_block_row (DcChatInfoDialog* self,
                                                           DcContact* contact);
static void ___lambda292_ (DcChatInfoDialog* self);
static void dc_chat_info_dialog_confirm_delete_chat (DcChatInfoDialog* self);
static void ____lambda292__dc_void_func (gpointer self);
static void dc_chat_info_dialog_set_mute_data_free (gpointer _data);
static gboolean dc_chat_info_dialog_set_mute_co (DcChatInfoDialogSetMuteData* _data_);
VALA_EXTERN void dc_rpc_client_set_chat_mute_duration (DcRpcClient* self,
                                           gint chat_id,
                                           gint seconds,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_);
VALA_EXTERN void dc_rpc_client_set_chat_mute_duration_finish (DcRpcClient* self,
                                                  GAsyncResult* _res_,
                                                  GError** error);
static void dc_chat_info_dialog_set_mute_ready (GObject* source_object,
                                         GAsyncResult* _res_,
                                         gpointer _user_data_);
VALA_EXTERN void dc_show_error (GtkWidget* parent,
                    const gchar* message);
static Block67Data* block67_data_ref (Block67Data* _data67_);
static void block67_data_unref (void * _userdata_);
VALA_EXTERN AdwActionRow* dc_contact_row (DcContact* c,
                              gboolean activatable,
                              gboolean show_presence);
VALA_EXTERN const gchar* dc_contact_get_address (DcContact* self);
static Block68Data* block68_data_ref (Block68Data* _data68_);
static void block68_data_unref (void * _userdata_);
static void ___lambda272_ (Block68Data* _data68_);
static void ____lambda272__dc_void_func (gpointer self);
static Block69Data* block69_data_ref (Block69Data* _data69_);
static void block69_data_unref (void * _userdata_);
static void ___lambda273_ (Block69Data* _data69_);
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 ____lambda273__dc_void_func (gpointer self);
static Block70Data* block70_data_ref (Block70Data* _data70_);
static void block70_data_unref (void * _userdata_);
static void dc_chat_info_dialog_update_contact_block_row (DcChatInfoDialog* self,
                                                   AdwActionRow* row,
                                                   DcContact* contact);
static void __lambda290_ (Block70Data* _data70_);
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 ___lambda290__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 Block71Data* block71_data_ref (Block71Data* _data71_);
static void block71_data_unref (void * _userdata_);
static void __lambda270_ (Block71Data* _data71_);
static void ___lambda270__gtk_entry_activate (GtkEntry* _sender,
                                       gpointer self);
static void __lambda271_ (Block71Data* _data71_,
                   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 ___lambda271__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);
static Block72Data* block72_data_ref (Block72Data* _data72_);
static void block72_data_unref (void * _userdata_);
static void __lambda275_ (Block72Data* _data72_);
static void ___lambda275__gtk_entry_activate (GtkEntry* _sender,
                                       gpointer self);
static void __lambda276_ (Block72Data* _data72_,
                   const gchar* resp);
static void dc_chat_info_dialog_save_group_name (DcChatInfoDialog* self,
                                          const gchar* new_name,
                                          GtkLabel* name_lbl,
                                          GAsyncReadyCallback _callback_,
                                          gpointer _user_data_);
static void dc_chat_info_dialog_save_group_name_finish (DcChatInfoDialog* self,
                                                 GAsyncResult* _res_);
static void ___lambda276__adw_alert_dialog_response (AdwAlertDialog* _sender,
                                              const gchar* response,
                                              gpointer self);
static void dc_chat_info_dialog_save_group_name_data_free (gpointer _data);
static gboolean dc_chat_info_dialog_save_group_name_co (DcChatInfoDialogSaveGroupNameData* _data_);
VALA_EXTERN void dc_rpc_client_set_chat_name (DcRpcClient* self,
                                  gint chat_id,
                                  const gchar* name,
                                  GAsyncReadyCallback _callback_,
                                  gpointer _user_data_);
VALA_EXTERN void dc_rpc_client_set_chat_name_finish (DcRpcClient* self,
                                         GAsyncResult* _res_,
                                         GError** error);
static void dc_chat_info_dialog_save_group_name_ready (GObject* source_object,
                                                GAsyncResult* _res_,
                                                gpointer _user_data_);
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 __lambda282_ (DcChatInfoDialog* self,
                   gint _,
                   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 ___lambda282__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 Block73Data* block73_data_ref (Block73Data* _data73_);
static void block73_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 __lambda291_ (Block73Data* _data73_);
static void ___lambda291__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 Block74Data* block74_data_ref (Block74Data* _data74_);
static void block74_data_unref (void * _userdata_);
static void __lambda284_ (Block74Data* _data74_);
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 ___lambda284__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_);
static void dc_chat_info_dialog_delete_all_messages (DcChatInfoDialog* self,
                                              gboolean for_all,
                                              GAsyncReadyCallback _callback_,
                                              gpointer _user_data_);
static void dc_chat_info_dialog_delete_all_messages_finish (DcChatInfoDialog* self,
                                                     GAsyncResult* _res_,
                                                     GError** error);
static void dc_chat_info_dialog_do_clear_history_ready (GObject* source_object,
                                                 GAsyncResult* _res_,
                                                 gpointer _user_data_);
static void dc_chat_info_dialog_delete_all_messages_data_free (gpointer _data);
static gboolean dc_chat_info_dialog_delete_all_messages_co (DcChatInfoDialogDeleteAllMessagesData* _data_);
VALA_EXTERN void dc_chat_message_ids_for_clear (DcRpcClient* rpc,
                                    gint account_id,
                                    gint chat_id,
                                    gboolean for_all,
                                    GAsyncReadyCallback _callback_,
                                    gpointer _user_data_);
VALA_EXTERN gint* dc_chat_message_ids_for_clear_finish (GAsyncResult* _res_,
                                            gint* result_length1,
                                            GError** error);
static void dc_chat_info_dialog_delete_all_messages_ready (GObject* source_object,
                                                    GAsyncResult* _res_,
                                                    gpointer _user_data_);
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 __lambda287_ (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 ___lambda287__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 __lambda289_ (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 ___lambda289__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 __lambda293_ (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 ___lambda293__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);

const gchar* DC_MUTE_DURATION_LABELS[5] = {"For 1 hour", "For 8 hours", "For 1 day", "For 7 days", "Forever"};
const gint DC_MUTE_DURATION_SECONDS[5] = {3600, 28800, 86400, 604800, -1};

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

static GtkListBox*
dc_chat_info_dialog_boxed_list (DcChatInfoDialog* self)
{
	GtkListBox* list = NULL;
	GtkListBox* _tmp0_;
	GtkListBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkListBox*) gtk_list_box_new ();
	g_object_ref_sink (_tmp0_);
	list = _tmp0_;
	gtk_list_box_set_selection_mode (list, GTK_SELECTION_NONE);
	gtk_widget_add_css_class ((GtkWidget*) list, "boxed-list");
	result = list;
	return result;
}

static void
dc_chat_info_dialog_style_flat_button (DcChatInfoDialog* self,
                                       GtkButton* button,
                                       gboolean _error_)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	gtk_widget_set_valign ((GtkWidget*) button, GTK_ALIGN_CENTER);
	gtk_widget_add_css_class ((GtkWidget*) button, "flat");
	if (_error_) {
		gtk_widget_add_css_class ((GtkWidget*) button, "error");
	}
}

static Block62Data*
block62_data_ref (Block62Data* _data62_)
{
	g_atomic_int_inc (&_data62_->_ref_count_);
	return _data62_;
}

static void
block62_data_unref (void * _userdata_)
{
	Block62Data* _data62_;
	_data62_ = (Block62Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data62_->_ref_count_)) {
		DcChatInfoDialog* self;
		self = _data62_->self;
		(_data62_->action_target_destroy_notify == NULL) ? NULL : (_data62_->action_target_destroy_notify (_data62_->action_target), NULL);
		_data62_->action = NULL;
		_data62_->action_target = NULL;
		_data62_->action_target_destroy_notify = NULL;
		_g_object_unref0 (self);
		g_slice_free (Block62Data, _data62_);
	}
}

static void
__lambda261_ (Block62Data* _data62_)
{
	DcChatInfoDialog* self;
	self = _data62_->self;
	_data62_->action (_data62_->action_target);
}

static void
___lambda261__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda261_ (self);
}

static GtkButton*
dc_chat_info_dialog_flat_button (DcChatInfoDialog* self,
                                 const gchar* label,
                                 DcVoidFunc action,
                                 gpointer action_target,
                                 GDestroyNotify action_target_destroy_notify,
                                 gboolean _error_)
{
	Block62Data* _data62_;
	GtkButton* button = NULL;
	GtkButton* _tmp0_;
	GtkButton* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (label != NULL, NULL);
	_data62_ = g_slice_new0 (Block62Data);
	_data62_->_ref_count_ = 1;
	_data62_->self = g_object_ref (self);
	(_data62_->action_target_destroy_notify == NULL) ? NULL : (_data62_->action_target_destroy_notify (_data62_->action_target), NULL);
	_data62_->action = NULL;
	_data62_->action_target = NULL;
	_data62_->action_target_destroy_notify = NULL;
	_data62_->action = action;
	_data62_->action_target = action_target;
	_data62_->action_target_destroy_notify = action_target_destroy_notify;
	_tmp0_ = (GtkButton*) gtk_button_new_with_label (label);
	g_object_ref_sink (_tmp0_);
	button = _tmp0_;
	dc_chat_info_dialog_style_flat_button (self, button, _error_);
	g_signal_connect_data (button, "clicked", (GCallback) ___lambda261__gtk_button_clicked, block62_data_ref (_data62_), (GClosureNotify) block62_data_unref, 0);
	result = button;
	block62_data_unref (_data62_);
	_data62_ = NULL;
	return result;
}

static Block63Data*
block63_data_ref (Block63Data* _data63_)
{
	g_atomic_int_inc (&_data63_->_ref_count_);
	return _data63_;
}

static void
block63_data_unref (void * _userdata_)
{
	Block63Data* _data63_;
	_data63_ = (Block63Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data63_->_ref_count_)) {
		DcChatInfoDialog* self;
		self = _data63_->self;
		(_data63_->action_target_destroy_notify == NULL) ? NULL : (_data63_->action_target_destroy_notify (_data63_->action_target), NULL);
		_data63_->action = NULL;
		_data63_->action_target = NULL;
		_data63_->action_target_destroy_notify = NULL;
		_g_object_unref0 (self);
		g_slice_free (Block63Data, _data63_);
	}
}

static void
__lambda262_ (Block63Data* _data63_)
{
	DcChatInfoDialog* self;
	self = _data63_->self;
	_data63_->action (_data63_->action_target);
}

static void
___lambda262__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda262_ (self);
}

static GtkButton*
dc_chat_info_dialog_flat_icon_button (DcChatInfoDialog* self,
                                      const gchar* icon_name,
                                      const gchar* tooltip,
                                      DcVoidFunc action,
                                      gpointer action_target,
                                      GDestroyNotify action_target_destroy_notify,
                                      gboolean _error_)
{
	Block63Data* _data63_;
	GtkButton* button = NULL;
	GtkButton* _tmp0_;
	GtkButton* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (icon_name != NULL, NULL);
	g_return_val_if_fail (tooltip != NULL, NULL);
	_data63_ = g_slice_new0 (Block63Data);
	_data63_->_ref_count_ = 1;
	_data63_->self = g_object_ref (self);
	(_data63_->action_target_destroy_notify == NULL) ? NULL : (_data63_->action_target_destroy_notify (_data63_->action_target), NULL);
	_data63_->action = NULL;
	_data63_->action_target = NULL;
	_data63_->action_target_destroy_notify = NULL;
	_data63_->action = action;
	_data63_->action_target = action_target;
	_data63_->action_target_destroy_notify = action_target_destroy_notify;
	_tmp0_ = (GtkButton*) gtk_button_new_from_icon_name (icon_name);
	g_object_ref_sink (_tmp0_);
	button = _tmp0_;
	dc_chat_info_dialog_style_flat_button (self, button, _error_);
	gtk_widget_set_tooltip_text ((GtkWidget*) button, tooltip);
	g_signal_connect_data (button, "clicked", (GCallback) ___lambda262__gtk_button_clicked, block63_data_ref (_data63_), (GClosureNotify) block63_data_unref, 0);
	result = button;
	block63_data_unref (_data63_);
	_data63_ = NULL;
	return result;
}

static Block64Data*
block64_data_ref (Block64Data* _data64_)
{
	g_atomic_int_inc (&_data64_->_ref_count_);
	return _data64_;
}

static void
block64_data_unref (void * _userdata_)
{
	Block64Data* _data64_;
	_data64_ = (Block64Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data64_->_ref_count_)) {
		DcChatInfoDialog* self;
		self = _data64_->self;
		(_data64_->action_target_destroy_notify == NULL) ? NULL : (_data64_->action_target_destroy_notify (_data64_->action_target), NULL);
		_data64_->action = NULL;
		_data64_->action_target = NULL;
		_data64_->action_target_destroy_notify = NULL;
		_g_object_unref0 (self);
		g_slice_free (Block64Data, _data64_);
	}
}

static void
__lambda263_ (Block64Data* _data64_)
{
	DcChatInfoDialog* self;
	self = _data64_->self;
	_data64_->action (_data64_->action_target);
}

static void
___lambda263__adw_action_row_activated (AdwActionRow* _sender,
                                        gpointer self)
{
	__lambda263_ (self);
}

static AdwActionRow*
dc_chat_info_dialog_action_row (DcChatInfoDialog* self,
                                const gchar* title,
                                const gchar* subtitle,
                                const gchar* icon_name,
                                DcVoidFunc action,
                                gpointer action_target,
                                GDestroyNotify action_target_destroy_notify)
{
	Block64Data* _data64_;
	AdwActionRow* row = NULL;
	AdwActionRow* _tmp0_;
	GtkImage* _tmp1_;
	GtkImage* _tmp2_;
	AdwActionRow* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (title != NULL, NULL);
	g_return_val_if_fail (subtitle != NULL, NULL);
	g_return_val_if_fail (icon_name != NULL, NULL);
	_data64_ = g_slice_new0 (Block64Data);
	_data64_->_ref_count_ = 1;
	_data64_->self = g_object_ref (self);
	(_data64_->action_target_destroy_notify == NULL) ? NULL : (_data64_->action_target_destroy_notify (_data64_->action_target), NULL);
	_data64_->action = NULL;
	_data64_->action_target = NULL;
	_data64_->action_target_destroy_notify = NULL;
	_data64_->action = action;
	_data64_->action_target = action_target;
	_data64_->action_target_destroy_notify = action_target_destroy_notify;
	_tmp0_ = (AdwActionRow*) adw_action_row_new ();
	g_object_ref_sink (_tmp0_);
	row = _tmp0_;
	adw_preferences_row_set_title ((AdwPreferencesRow*) row, title);
	adw_action_row_set_subtitle (row, subtitle);
	_tmp1_ = (GtkImage*) gtk_image_new_from_icon_name (icon_name);
	g_object_ref_sink (_tmp1_);
	_tmp2_ = _tmp1_;
	adw_action_row_add_prefix (row, (GtkWidget*) _tmp2_);
	_g_object_unref0 (_tmp2_);
	gtk_list_box_row_set_activatable ((GtkListBoxRow*) row, TRUE);
	g_signal_connect_data (row, "activated", (GCallback) ___lambda263__adw_action_row_activated, block64_data_ref (_data64_), (GClosureNotify) block64_data_unref, 0);
	result = row;
	block64_data_unref (_data64_);
	_data64_ = NULL;
	return result;
}

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

static gboolean
__lambda264_ (DcChatInfoDialog* self,
              guint kv,
              guint code,
              GdkModifierType state)
{
	DcImageViewer* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	gboolean result;
	_tmp0_ = self->priv->viewer;
	_tmp1_ = dc_image_viewer_get_visible (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		DcImageViewer* _tmp3_;
		_tmp3_ = self->priv->viewer;
		result = dc_image_viewer_handle_key (_tmp3_, kv);
		return result;
	}
	result = FALSE;
	return result;
}

static gboolean
___lambda264__gtk_event_controller_key_key_pressed (GtkEventControllerKey* _sender,
                                                    guint keyval,
                                                    guint keycode,
                                                    GdkModifierType state,
                                                    gpointer self)
{
	gboolean result;
	result = __lambda264_ ((DcChatInfoDialog*) self, keyval, keycode, state);
	return result;
}

static void
__lambda265_ (DcChatInfoDialog* self)
{
	DcImageViewer* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	_tmp0_ = self->priv->viewer;
	_tmp1_ = dc_image_viewer_get_visible (_tmp0_);
	_tmp2_ = _tmp1_;
	adw_dialog_set_can_close ((AdwDialog*) self, !_tmp2_);
}

static void
___lambda265__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	__lambda265_ ((DcChatInfoDialog*) self);
}

static void
__lambda266_ (DcChatInfoDialog* self)
{
	DcImageViewer* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	_tmp0_ = self->priv->viewer;
	_tmp1_ = dc_image_viewer_get_visible (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		DcImageViewer* _tmp3_;
		_tmp3_ = self->priv->viewer;
		dc_image_viewer_hide (_tmp3_);
	}
}

static void
___lambda266__adw_dialog_close_attempt (AdwDialog* _sender,
                                        gpointer self)
{
	__lambda266_ ((DcChatInfoDialog*) self);
}

DcChatInfoDialog*
dc_chat_info_dialog_construct (GType object_type,
                               DcWindow* window,
                               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_;
	DcImageViewer* _tmp12_;
	DcImageViewer* _tmp13_;
	GtkOverlay* overlay = NULL;
	GtkOverlay* _tmp14_;
	DcImageViewer* _tmp15_;
	GtkWidget* _tmp16_;
	GtkWidget* _tmp17_;
	GtkEventControllerKey* kc = NULL;
	GtkEventControllerKey* _tmp18_;
	GtkEventController* _tmp19_;
	DcImageViewer* _tmp20_;
	GtkWidget* _tmp21_;
	GtkWidget* _tmp22_;
	g_return_val_if_fail (window != NULL, NULL);
	g_return_val_if_fail (rpc != NULL, NULL);
	self = (DcChatInfoDialog*) g_object_new (object_type, NULL);
	self->priv->app_window = window;
	_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);
	_tmp12_ = dc_image_viewer_new ();
	_g_object_unref0 (self->priv->viewer);
	self->priv->viewer = _tmp12_;
	_tmp13_ = self->priv->viewer;
	dc_image_viewer_set_window (_tmp13_, window);
	_tmp14_ = (GtkOverlay*) gtk_overlay_new ();
	g_object_ref_sink (_tmp14_);
	overlay = _tmp14_;
	gtk_overlay_set_child (overlay, (GtkWidget*) box);
	_tmp15_ = self->priv->viewer;
	_tmp16_ = dc_image_viewer_get_widget (_tmp15_);
	_tmp17_ = _tmp16_;
	gtk_overlay_add_overlay (overlay, _tmp17_);
	adw_dialog_set_child ((AdwDialog*) self, (GtkWidget*) overlay);
	_tmp18_ = (GtkEventControllerKey*) gtk_event_controller_key_new ();
	kc = _tmp18_;
	gtk_event_controller_set_propagation_phase ((GtkEventController*) kc, GTK_PHASE_CAPTURE);
	g_signal_connect_object (kc, "key-pressed", (GCallback) ___lambda264__gtk_event_controller_key_key_pressed, self, 0);
	_tmp19_ = _g_object_ref0 ((GtkEventController*) kc);
	gtk_widget_add_controller (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), _tmp19_);
	_tmp20_ = self->priv->viewer;
	_tmp21_ = dc_image_viewer_get_widget (_tmp20_);
	_tmp22_ = _tmp21_;
	g_signal_connect_object ((GObject*) _tmp22_, "notify::visible", (GCallback) ___lambda265__g_object_notify, self, 0);
	g_signal_connect_object ((AdwDialog*) self, "close-attempt", (GCallback) ___lambda266__adw_dialog_close_attempt, self, 0);
	dc_chat_info_dialog_load_info (self, spinner, NULL, NULL);
	_g_object_unref0 (kc);
	_g_object_unref0 (overlay);
	_g_object_unref0 (scroll);
	_g_object_unref0 (spinner);
	_g_object_unref0 (header);
	_g_object_unref0 (box);
	return self;
}

DcChatInfoDialog*
dc_chat_info_dialog_new (DcWindow* window,
                         DcRpcClient* rpc,
                         gint chat_id)
{
	return dc_chat_info_dialog_construct (DC_TYPE_CHAT_INFO_DIALOG, window, 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 Block65Data*
block65_data_ref (Block65Data* _data65_)
{
	g_atomic_int_inc (&_data65_->_ref_count_);
	return _data65_;
}

static void
block65_data_unref (void * _userdata_)
{
	Block65Data* _data65_;
	_data65_ = (Block65Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data65_->_ref_count_)) {
		DcChatInfoDialog* self;
		self = _data65_->self;
		_g_object_unref0 (_data65_->mute_combo);
		_data65_->mute_labels = (_vala_array_free (_data65_->mute_labels, _data65_->mute_labels_length1, (GDestroyNotify) g_free), NULL);
		_g_object_unref0 (_data65_->combo);
		_data65_->timer_values = (g_free (_data65_->timer_values), NULL);
		_g_object_unref0 (_data65_->name_lbl);
		_g_object_unref0 (self);
		g_slice_free (Block65Data, _data65_);
	}
}

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 Block66Data*
block66_data_ref (Block66Data* _data66_)
{
	g_atomic_int_inc (&_data66_->_ref_count_);
	return _data66_;
}

static void
block66_data_unref (void * _userdata_)
{
	Block66Data* _data66_;
	_data66_ = (Block66Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data66_->_ref_count_)) {
		DcChatInfoDialog* self;
		self = _data66_->_data65_->self;
		_g_free0 (_data66_->img);
		block65_data_unref (_data66_->_data65_);
		_data66_->_data65_ = NULL;
		g_slice_free (Block66Data, _data66_);
	}
}

static void
____lambda267_ (Block66Data* _data66_)
{
	Block65Data* _data65_;
	DcChatInfoDialog* self;
	DcImageViewer* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar** _tmp3_;
	gchar** _tmp4_;
	gint _tmp4__length1;
	_data65_ = _data66_->_data65_;
	self = _data65_->self;
	_tmp0_ = self->priv->viewer;
	_tmp1_ = _data66_->img;
	_tmp2_ = g_strdup (_tmp1_);
	_tmp3_ = g_new0 (gchar*, 1 + 1);
	_tmp3_[0] = _tmp2_;
	_tmp4_ = _tmp3_;
	_tmp4__length1 = 1;
	dc_image_viewer_show_list (_tmp0_, _tmp4_, (gint) 1, 0);
	_tmp4_ = (_vala_array_free (_tmp4_, _tmp4__length1, (GDestroyNotify) g_free), NULL);
}

static void
_____lambda267__gtk_button_clicked (GtkButton* _sender,
                                    gpointer self)
{
	____lambda267_ (self);
}

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

static void
_____lambda268__dc_void_func (gpointer self)
{
	____lambda268_ ((DcChatInfoDialog*) self);
}

static void
____lambda269_ (Block65Data* _data65_)
{
	DcChatInfoDialog* self;
	GtkLabel* _tmp0_;
	self = _data65_->self;
	_tmp0_ = _data65_->name_lbl;
	dc_chat_info_dialog_show_edit_contact_name_dialog (self, _data65_->dm_contact_id, _tmp0_);
}

static void
_____lambda269__dc_void_func (gpointer self)
{
	____lambda269_ (self);
}

static void
_____lambda274_ (Block65Data* _data65_)
{
	DcChatInfoDialog* self;
	GtkLabel* _tmp0_;
	self = _data65_->self;
	_tmp0_ = _data65_->name_lbl;
	dc_chat_info_dialog_show_edit_group_name_dialog (self, _tmp0_);
}

static void
______lambda274__dc_void_func (gpointer self)
{
	_____lambda274_ (self);
}

static void
____lambda277_ (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
_____lambda277__dc_void_func (gpointer self)
{
	____lambda277_ ((DcChatInfoDialog*) self);
}

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

static void
____lambda278__g_object_notify (GObject* _sender,
                                GParamSpec* pspec,
                                gpointer self)
{
	___lambda278_ (self);
}

static void
___lambda279_ (Block65Data* _data65_)
{
	DcChatInfoDialog* self;
	guint idx = 0U;
	GtkDropDown* _tmp0_;
	guint _tmp1_;
	guint _tmp2_;
	gchar** _tmp3_;
	gint _tmp3__length1;
	self = _data65_->self;
	_tmp0_ = _data65_->mute_combo;
	_tmp1_ = gtk_drop_down_get_selected (_tmp0_);
	_tmp2_ = _tmp1_;
	idx = _tmp2_;
	_tmp3_ = _data65_->mute_labels;
	_tmp3__length1 = _data65_->mute_labels_length1;
	if (idx < ((guint) _tmp3__length1)) {
		gint _tmp4_ = 0;
		gint secs = 0;
		if (idx == ((guint) 0)) {
			_tmp4_ = 0;
		} else {
			gint _tmp5_;
			_tmp5_ = DC_MUTE_DURATION_SECONDS[((gint) idx) - 1];
			_tmp4_ = _tmp5_;
		}
		secs = _tmp4_;
		dc_chat_info_dialog_set_mute (self, secs, NULL, NULL);
	}
}

static void
____lambda279__g_object_notify (GObject* _sender,
                                GParamSpec* pspec,
                                gpointer self)
{
	___lambda279_ (self);
}

static void
___lambda280_ (DcChatInfoDialog* self)
{
	DcGalleryDialog* dialog = NULL;
	DcWindow* _tmp0_;
	DcRpcClient* _tmp1_;
	const gchar* _tmp2_;
	DcGalleryDialog* _tmp3_;
	_tmp0_ = self->priv->app_window;
	_tmp1_ = self->priv->rpc;
	_tmp2_ = self->priv->chat_name;
	_tmp3_ = dc_gallery_dialog_new (_tmp0_, _tmp1_, self->priv->chat_id, _tmp2_);
	g_object_ref_sink (_tmp3_);
	dialog = _tmp3_;
	dialog->presenter_dialog = (AdwDialog*) self;
	adw_dialog_present ((AdwDialog*) dialog, (GtkWidget*) self);
	_g_object_unref0 (dialog);
}

static void
____lambda280__dc_void_func (gpointer self)
{
	___lambda280_ ((DcChatInfoDialog*) self);
}

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

static void
______lambda281__dc_void_func (gpointer self)
{
	_____lambda281_ ((DcChatInfoDialog*) self);
}

static void
_vala_array_add21 (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
___lambda283_ (DcChatInfoDialog* self)
{
	dc_chat_info_dialog_confirm_clear_history (self, FALSE);
}

static void
____lambda283__dc_void_func (gpointer self)
{
	___lambda283_ ((DcChatInfoDialog*) self);
}

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

static void
____lambda285__dc_void_func (gpointer self)
{
	___lambda285_ ((DcChatInfoDialog*) self);
}

static void
____lambda286_ (DcChatInfoDialog* self)
{
	dc_chat_info_dialog_confirm_leave_group (self);
}

static void
_____lambda286__dc_void_func (gpointer self)
{
	____lambda286_ ((DcChatInfoDialog*) self);
}

static void
____lambda288_ (DcChatInfoDialog* self)
{
	dc_chat_info_dialog_confirm_disband_group (self);
}

static void
_____lambda288__dc_void_func (gpointer self)
{
	____lambda288_ ((DcChatInfoDialog*) self);
}

static void
___lambda292_ (DcChatInfoDialog* self)
{
	dc_chat_info_dialog_confirm_delete_chat (self);
}

static void
____lambda292__dc_void_func (gpointer self)
{
	___lambda292_ ((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_->_data65_ = g_slice_new0 (Block65Data);
		_data_->_data65_->_ref_count_ = 1;
		_data_->_data65_->self = g_object_ref (_data_->self);
		_data_->_tmp0_ = _data_->self->priv->rpc;
		_data_->_tmp1_ = _data_->self->priv->rpc;
		_data_->_tmp2_ = dc_rpc_client_get_account_id (_data_->_tmp1_);
		_data_->_tmp3_ = _data_->_tmp2_;
		_data_->_state_ = 1;
		dc_rpc_client_get_full_chat_by_id_for (_data_->_tmp0_, _data_->_tmp3_, _data_->self->priv->chat_id, dc_chat_info_dialog_load_info_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp4_ = dc_rpc_client_get_full_chat_by_id_for_finish (_data_->_tmp0_, _data_->_res_, &_data_->_inner_error0_);
		_data_->chat = _data_->_tmp4_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			block65_data_unref (_data_->_data65_);
			_data_->_data65_ = NULL;
			goto __catch0_g_error;
		}
		_data_->_tmp5_ = _data_->chat;
		if (_data_->_tmp5_ == NULL) {
			_json_object_unref0 (_data_->chat);
			block65_data_unref (_data_->_data65_);
			_data_->_data65_ = 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_->_tmp7_ = _data_->chat;
		_data_->_tmp8_ = dc_json_str (_data_->_tmp7_, "name");
		_data_->_tmp6_ = _data_->_tmp8_;
		if (_data_->_tmp6_ == NULL) {
			_data_->_tmp9_ = g_strdup ("Chat");
			_g_free0 (_data_->_tmp6_);
			_data_->_tmp6_ = _data_->_tmp9_;
		}
		_data_->_tmp10_ = _data_->_tmp6_;
		_data_->_tmp6_ = NULL;
		_data_->name = _data_->_tmp10_;
		_data_->_tmp12_ = _data_->chat;
		_data_->_tmp13_ = dc_json_str (_data_->_tmp12_, "chatType");
		_data_->_tmp11_ = _data_->_tmp13_;
		if (_data_->_tmp11_ == NULL) {
			_data_->_tmp14_ = g_strdup ("");
			_g_free0 (_data_->_tmp11_);
			_data_->_tmp11_ = _data_->_tmp14_;
		}
		_data_->_tmp15_ = _data_->_tmp11_;
		_data_->_tmp11_ = NULL;
		_data_->chat_type = _data_->_tmp15_;
		_data_->_tmp16_ = _data_->chat;
		_data_->_tmp17_ = dc_json_str (_data_->_tmp16_, "profileImage");
		_data_->profile_image = _data_->_tmp17_;
		_data_->_tmp18_ = _data_->chat;
		_data_->encrypted = dc_json_bool (_data_->_tmp18_, "isEncrypted");
		_data_->_tmp21_ = _data_->chat_type;
		if (g_strcmp0 (_data_->_tmp21_, "Single") == 0) {
			_data_->_tmp22_ = _data_->chat;
			_data_->_tmp20_ = !dc_json_bool (_data_->_tmp22_, "isSelfTalk");
		} else {
			_data_->_tmp20_ = FALSE;
		}
		if (_data_->_tmp20_) {
			_data_->_tmp23_ = _data_->chat;
			_data_->_tmp19_ = !dc_json_bool (_data_->_tmp23_, "isDeviceChat");
		} else {
			_data_->_tmp19_ = FALSE;
		}
		_data_->is_dm_chat = _data_->_tmp19_;
		_data_->_tmp25_ = _data_->chat_type;
		if (g_strcmp0 (_data_->_tmp25_, "Group") == 0) {
			_data_->_tmp24_ = TRUE;
		} else {
			_data_->_tmp26_ = _data_->chat_type;
			_data_->_tmp24_ = g_strcmp0 (_data_->_tmp26_, "Broadcast") == 0;
		}
		_data_->self->priv->is_group = _data_->_tmp24_;
		_data_->_tmp27_ = _data_->name;
		_data_->_tmp28_ = g_strdup (_data_->_tmp27_);
		_g_free0 (_data_->self->priv->chat_name);
		_data_->self->priv->chat_name = _data_->_tmp28_;
		_g_object_unref0 (_data_->self->priv->dm_contact);
		_data_->self->priv->dm_contact = NULL;
		_data_->_data65_->dm_contact_id = 0;
		if (_data_->is_dm_chat) {
			_data_->_tmp30_ = _data_->chat;
			_data_->_tmp29_ = json_object_has_member (_data_->_tmp30_, "contactIds");
		} else {
			_data_->_tmp29_ = FALSE;
		}
		if (_data_->_tmp29_) {
			_data_->_tmp31_ = _data_->chat;
			_data_->_tmp32_ = json_object_get_array_member (_data_->_tmp31_, "contactIds");
			_data_->_tmp33_ = _json_array_ref0 (_data_->_tmp32_);
			_data_->ids = _data_->_tmp33_;
			_data_->_tmp34_ = _data_->ids;
			if (json_array_get_length (_data_->_tmp34_) > ((guint) 0)) {
				_data_->_tmp35_ = _data_->ids;
				_data_->_data65_->dm_contact_id = (gint) json_array_get_int_element (_data_->_tmp35_, (guint) 0);
			}
			_json_array_unref0 (_data_->ids);
		}
		_data_->_tmp36_ = _data_->name;
		_data_->_tmp37_ = (AdwAvatar*) adw_avatar_new (80, _data_->_tmp36_, TRUE);
		g_object_ref_sink (_data_->_tmp37_);
		_data_->avatar = _data_->_tmp37_;
		_data_->_tmp38_ = _data_->avatar;
		_data_->_tmp39_ = _data_->profile_image;
		_data_->_tmp40_ = dc_load_avatar (_data_->_tmp39_);
		_data_->_tmp41_ = _data_->_tmp40_;
		adw_avatar_set_custom_image (_data_->_tmp38_, (GdkPaintable*) _data_->_tmp41_);
		_g_object_unref0 (_data_->_tmp41_);
		_data_->_tmp43_ = _data_->profile_image;
		if (_data_->_tmp43_ != NULL) {
			_data_->_tmp44_ = _data_->profile_image;
			_data_->_tmp45_ = strlen (_data_->_tmp44_);
			_data_->_tmp46_ = _data_->_tmp45_;
			_data_->_tmp42_ = _data_->_tmp46_ > 0;
		} else {
			_data_->_tmp42_ = FALSE;
		}
		if (_data_->_tmp42_) {
			_data_->_data66_ = g_slice_new0 (Block66Data);
			_data_->_data66_->_ref_count_ = 1;
			_data_->_data66_->_data65_ = block65_data_ref (_data_->_data65_);
			_data_->_tmp47_ = _data_->profile_image;
			_data_->_tmp48_ = g_strdup (_data_->_tmp47_);
			_data_->_data66_->img = _data_->_tmp48_;
			_data_->_tmp49_ = (GtkButton*) gtk_button_new ();
			g_object_ref_sink (_data_->_tmp49_);
			_data_->avatar_btn = _data_->_tmp49_;
			_data_->_tmp50_ = _data_->avatar_btn;
			_data_->_tmp51_ = _data_->avatar;
			gtk_button_set_child (_data_->_tmp50_, (GtkWidget*) _data_->_tmp51_);
			_data_->_tmp52_ = _data_->avatar_btn;
			gtk_widget_add_css_class ((GtkWidget*) _data_->_tmp52_, "flat");
			_data_->_tmp53_ = _data_->avatar_btn;
			gtk_widget_add_css_class ((GtkWidget*) _data_->_tmp53_, "circular");
			_data_->_tmp54_ = _data_->avatar_btn;
			gtk_widget_set_halign ((GtkWidget*) _data_->_tmp54_, GTK_ALIGN_CENTER);
			_data_->_tmp55_ = _data_->avatar_btn;
			gtk_widget_set_tooltip_text ((GtkWidget*) _data_->_tmp55_, "View image");
			_data_->_tmp56_ = _data_->avatar_btn;
			g_signal_connect_data (_data_->_tmp56_, "clicked", (GCallback) _____lambda267__gtk_button_clicked, block66_data_ref (_data_->_data66_), (GClosureNotify) block66_data_unref, 0);
			_data_->_tmp57_ = _data_->self->priv->content;
			_data_->_tmp58_ = _data_->avatar_btn;
			gtk_box_append (_data_->_tmp57_, (GtkWidget*) _data_->_tmp58_);
			_g_object_unref0 (_data_->avatar_btn);
			block66_data_unref (_data_->_data66_);
			_data_->_data66_ = NULL;
		} else {
			_data_->_tmp59_ = _data_->avatar;
			gtk_widget_set_halign ((GtkWidget*) _data_->_tmp59_, GTK_ALIGN_CENTER);
			_data_->_tmp60_ = _data_->self->priv->content;
			_data_->_tmp61_ = _data_->avatar;
			gtk_box_append (_data_->_tmp60_, (GtkWidget*) _data_->_tmp61_);
		}
		if (_data_->self->priv->is_group) {
			_data_->_tmp62_ = dc_chat_info_dialog_flat_button (_data_->self, "Change Avatar", _____lambda268__dc_void_func, g_object_ref (_data_->self), g_object_unref, FALSE);
			_data_->change_avatar_btn = _data_->_tmp62_;
			_data_->_tmp63_ = _data_->change_avatar_btn;
			gtk_widget_set_halign ((GtkWidget*) _data_->_tmp63_, GTK_ALIGN_CENTER);
			_data_->_tmp64_ = _data_->self->priv->content;
			_data_->_tmp65_ = _data_->change_avatar_btn;
			gtk_box_append (_data_->_tmp64_, (GtkWidget*) _data_->_tmp65_);
			_g_object_unref0 (_data_->change_avatar_btn);
		}
		_data_->_tmp66_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
		g_object_ref_sink (_data_->_tmp66_);
		_data_->name_box = _data_->_tmp66_;
		_data_->_tmp67_ = _data_->name_box;
		gtk_widget_set_halign ((GtkWidget*) _data_->_tmp67_, GTK_ALIGN_CENTER);
		_data_->_tmp68_ = _data_->name;
		_data_->_tmp69_ = (GtkLabel*) gtk_label_new (_data_->_tmp68_);
		g_object_ref_sink (_data_->_tmp69_);
		_data_->_data65_->name_lbl = _data_->_tmp69_;
		_data_->_tmp70_ = _data_->_data65_->name_lbl;
		gtk_widget_add_css_class ((GtkWidget*) _data_->_tmp70_, "title-1");
		_data_->_tmp71_ = _data_->_data65_->name_lbl;
		gtk_label_set_ellipsize (_data_->_tmp71_, PANGO_ELLIPSIZE_END);
		_data_->_tmp72_ = _data_->_data65_->name_lbl;
		gtk_label_set_max_width_chars (_data_->_tmp72_, 24);
		_data_->_tmp73_ = _data_->name_box;
		_data_->_tmp74_ = _data_->_data65_->name_lbl;
		gtk_box_append (_data_->_tmp73_, (GtkWidget*) _data_->_tmp74_);
		if (_data_->is_dm_chat) {
			_data_->_tmp75_ = _data_->_data65_->dm_contact_id > 1;
		} else {
			_data_->_tmp75_ = FALSE;
		}
		if (_data_->_tmp75_) {
			_data_->_tmp76_ = _data_->name_box;
			_data_->_tmp77_ = dc_chat_info_dialog_flat_icon_button (_data_->self, "document-edit-symbolic", "Edit contact name", _____lambda269__dc_void_func, block65_data_ref (_data_->_data65_), block65_data_unref, FALSE);
			_data_->_tmp78_ = _data_->_tmp77_;
			gtk_box_append (_data_->_tmp76_, (GtkWidget*) _data_->_tmp78_);
			_g_object_unref0 (_data_->_tmp78_);
		} else {
			if (_data_->self->priv->is_group) {
				_data_->_tmp79_ = _data_->name_box;
				_data_->_tmp80_ = dc_chat_info_dialog_flat_icon_button (_data_->self, "document-edit-symbolic", "Edit group name", ______lambda274__dc_void_func, block65_data_ref (_data_->_data65_), block65_data_unref, FALSE);
				_data_->_tmp81_ = _data_->_tmp80_;
				gtk_box_append (_data_->_tmp79_, (GtkWidget*) _data_->_tmp81_);
				_g_object_unref0 (_data_->_tmp81_);
			}
		}
		_data_->_tmp82_ = _data_->self->priv->content;
		_data_->_tmp83_ = _data_->name_box;
		gtk_box_append (_data_->_tmp82_, (GtkWidget*) _data_->_tmp83_);
		_data_->_tmp84_ = _data_->chat_type;
		_data_->_tmp85_ = g_strdup (_data_->_tmp84_);
		_data_->type_str = _data_->_tmp85_;
		if (_data_->encrypted) {
			_data_->_tmp86_ = _data_->type_str;
			_data_->_tmp87_ = g_strconcat (_data_->_tmp86_, " (encrypted)", NULL);
			_g_free0 (_data_->type_str);
			_data_->type_str = _data_->_tmp87_;
		}
		_data_->_tmp88_ = _data_->type_str;
		_data_->_tmp89_ = (GtkLabel*) gtk_label_new (_data_->_tmp88_);
		g_object_ref_sink (_data_->_tmp89_);
		_data_->type_lbl = _data_->_tmp89_;
		_data_->_tmp90_ = _data_->type_lbl;
		gtk_widget_add_css_class ((GtkWidget*) _data_->_tmp90_, "dim-label");
		_data_->_tmp91_ = _data_->type_lbl;
		gtk_widget_set_halign ((GtkWidget*) _data_->_tmp91_, GTK_ALIGN_CENTER);
		_data_->_tmp92_ = _data_->self->priv->content;
		_data_->_tmp93_ = _data_->type_lbl;
		gtk_box_append (_data_->_tmp92_, (GtkWidget*) _data_->_tmp93_);
		if (_data_->self->priv->is_group) {
			_data_->_tmp94_ = dc_chat_info_dialog_boxed_list (_data_->self);
			_data_->invite_list = _data_->_tmp94_;
			_data_->_tmp95_ = _data_->invite_list;
			_data_->_tmp96_ = dc_chat_info_dialog_action_row (_data_->self, "Invite Link", "Share a link or QR code for others to join", "mail-forward-symbolic", _____lambda277__dc_void_func, g_object_ref (_data_->self), g_object_unref);
			_data_->_tmp97_ = _data_->_tmp96_;
			gtk_list_box_append (_data_->_tmp95_, (GtkWidget*) _data_->_tmp97_);
			_g_object_unref0 (_data_->_tmp97_);
			_data_->_tmp98_ = _data_->self->priv->content;
			_data_->_tmp99_ = _data_->invite_list;
			gtk_box_append (_data_->_tmp98_, (GtkWidget*) _data_->_tmp99_);
			_g_object_unref0 (_data_->invite_list);
		}
		_data_->_tmp100_ = _data_->chat;
		_data_->ephemeral_timer = (gint) dc_json_int (_data_->_tmp100_, "ephemeralTimer", (gint64) 0);
		_data_->_tmp101_ = (AdwActionRow*) adw_action_row_new ();
		g_object_ref_sink (_data_->_tmp101_);
		_data_->ephem_row = _data_->_tmp101_;
		_data_->_tmp102_ = _data_->ephem_row;
		adw_preferences_row_set_title ((AdwPreferencesRow*) _data_->_tmp102_, "Disappearing messages");
		_data_->_tmp103_ = g_new0 (gint, 9);
		_data_->_tmp103_[0] = 0;
		_data_->_tmp103_[1] = 60;
		_data_->_tmp103_[2] = 300;
		_data_->_tmp103_[3] = 1800;
		_data_->_tmp103_[4] = 3600;
		_data_->_tmp103_[5] = 21600;
		_data_->_tmp103_[6] = 86400;
		_data_->_tmp103_[7] = 604800;
		_data_->_tmp103_[8] = 2419200;
		_data_->_data65_->timer_values = _data_->_tmp103_;
		_data_->_data65_->timer_values_length1 = 9;
		_data_->_data65_->_timer_values_size_ = _data_->_data65_->timer_values_length1;
		_data_->_tmp104_ = g_strdup ("Off");
		_data_->_tmp105_ = g_strdup ("1 minute");
		_data_->_tmp106_ = g_strdup ("5 minutes");
		_data_->_tmp107_ = g_strdup ("30 minutes");
		_data_->_tmp108_ = g_strdup ("1 hour");
		_data_->_tmp109_ = g_strdup ("6 hours");
		_data_->_tmp110_ = g_strdup ("1 day");
		_data_->_tmp111_ = g_strdup ("1 week");
		_data_->_tmp112_ = g_strdup ("4 weeks");
		_data_->_tmp113_ = g_new0 (gchar*, 9 + 1);
		_data_->_tmp113_[0] = _data_->_tmp104_;
		_data_->_tmp113_[1] = _data_->_tmp105_;
		_data_->_tmp113_[2] = _data_->_tmp106_;
		_data_->_tmp113_[3] = _data_->_tmp107_;
		_data_->_tmp113_[4] = _data_->_tmp108_;
		_data_->_tmp113_[5] = _data_->_tmp109_;
		_data_->_tmp113_[6] = _data_->_tmp110_;
		_data_->_tmp113_[7] = _data_->_tmp111_;
		_data_->_tmp113_[8] = _data_->_tmp112_;
		_data_->timer_labels = _data_->_tmp113_;
		_data_->timer_labels_length1 = 9;
		_data_->_timer_labels_size_ = _data_->timer_labels_length1;
		_data_->active_idx = 0;
		{
			_data_->i = 0;
			{
				_data_->_tmp114_ = TRUE;
				while (TRUE) {
					if (!_data_->_tmp114_) {
						_data_->_tmp115_ = _data_->i;
						_data_->i = _data_->_tmp115_ + 1;
					}
					_data_->_tmp114_ = FALSE;
					_data_->_tmp116_ = _data_->_data65_->timer_values;
					_data_->_tmp116__length1 = _data_->_data65_->timer_values_length1;
					if (!(_data_->i < _data_->_tmp116__length1)) {
						break;
					}
					_data_->_tmp117_ = _data_->_data65_->timer_values;
					_data_->_tmp117__length1 = _data_->_data65_->timer_values_length1;
					_data_->_tmp118_ = _data_->_tmp117_[_data_->i];
					if (_data_->_tmp118_ == _data_->ephemeral_timer) {
						_data_->active_idx = _data_->i;
					}
				}
			}
		}
		_data_->_tmp119_ = _data_->timer_labels;
		_data_->_tmp119__length1 = _data_->timer_labels_length1;
		_data_->_tmp120_ = (GtkDropDown*) gtk_drop_down_new_from_strings (_data_->_tmp119_);
		g_object_ref_sink (_data_->_tmp120_);
		_data_->_data65_->combo = _data_->_tmp120_;
		_data_->_tmp121_ = _data_->_data65_->combo;
		gtk_drop_down_set_selected (_data_->_tmp121_, (guint) _data_->active_idx);
		_data_->_tmp122_ = _data_->_data65_->combo;
		gtk_widget_set_valign ((GtkWidget*) _data_->_tmp122_, GTK_ALIGN_CENTER);
		_data_->_tmp123_ = _data_->_data65_->combo;
		g_signal_connect_data ((GObject*) _data_->_tmp123_, "notify::selected", (GCallback) ____lambda278__g_object_notify, block65_data_ref (_data_->_data65_), (GClosureNotify) block65_data_unref, 0);
		_data_->_tmp124_ = _data_->ephem_row;
		_data_->_tmp125_ = _data_->_data65_->combo;
		adw_action_row_add_suffix (_data_->_tmp124_, (GtkWidget*) _data_->_tmp125_);
		_data_->_tmp126_ = _data_->ephem_row;
		_data_->_tmp127_ = _data_->_data65_->combo;
		adw_action_row_set_activatable_widget (_data_->_tmp126_, (GtkWidget*) _data_->_tmp127_);
		_data_->_tmp128_ = _data_->chat;
		_data_->is_muted = dc_json_bool (_data_->_tmp128_, "isMuted");
		_data_->_tmp129_ = (AdwActionRow*) adw_action_row_new ();
		g_object_ref_sink (_data_->_tmp129_);
		_data_->mute_row = _data_->_tmp129_;
		_data_->_tmp130_ = _data_->mute_row;
		adw_preferences_row_set_title ((AdwPreferencesRow*) _data_->_tmp130_, "Mute notifications");
		_data_->_tmp131_ = g_new0 (gchar*, (G_N_ELEMENTS (DC_MUTE_DURATION_LABELS) + 1) + 1);
		_data_->_data65_->mute_labels = _data_->_tmp131_;
		_data_->_data65_->mute_labels_length1 = G_N_ELEMENTS (DC_MUTE_DURATION_LABELS) + 1;
		_data_->_data65_->_mute_labels_size_ = _data_->_data65_->mute_labels_length1;
		_data_->_tmp132_ = _data_->_data65_->mute_labels;
		_data_->_tmp132__length1 = _data_->_data65_->mute_labels_length1;
		_data_->_tmp133_ = g_strdup ("Off");
		_g_free0 (_data_->_tmp132_[0]);
		_data_->_tmp132_[0] = _data_->_tmp133_;
		{
			_data_->_vala1_i = 0;
			{
				_data_->_tmp134_ = TRUE;
				while (TRUE) {
					if (!_data_->_tmp134_) {
						_data_->_tmp135_ = _data_->_vala1_i;
						_data_->_vala1_i = _data_->_tmp135_ + 1;
					}
					_data_->_tmp134_ = FALSE;
					if (!(_data_->_vala1_i < G_N_ELEMENTS (DC_MUTE_DURATION_LABELS))) {
						break;
					}
					_data_->_tmp136_ = _data_->_data65_->mute_labels;
					_data_->_tmp136__length1 = _data_->_data65_->mute_labels_length1;
					_data_->_tmp137_ = DC_MUTE_DURATION_LABELS[_data_->_vala1_i];
					_data_->_tmp138_ = g_strdup (_data_->_tmp137_);
					_g_free0 (_data_->_tmp136_[_data_->_vala1_i + 1]);
					_data_->_tmp136_[_data_->_vala1_i + 1] = _data_->_tmp138_;
				}
			}
		}
		_data_->_tmp139_ = _data_->_data65_->mute_labels;
		_data_->_tmp139__length1 = _data_->_data65_->mute_labels_length1;
		_data_->_tmp140_ = (GtkDropDown*) gtk_drop_down_new_from_strings (_data_->_tmp139_);
		g_object_ref_sink (_data_->_tmp140_);
		_data_->_data65_->mute_combo = _data_->_tmp140_;
		if (_data_->is_muted) {
			_data_->_tmp142_ = _data_->_data65_->mute_labels;
			_data_->_tmp142__length1 = _data_->_data65_->mute_labels_length1;
			_data_->_tmp141_ = _data_->_tmp142__length1 - 1;
		} else {
			_data_->_tmp141_ = 0;
		}
		_data_->_tmp143_ = _data_->_data65_->mute_combo;
		gtk_drop_down_set_selected (_data_->_tmp143_, (guint) _data_->_tmp141_);
		_data_->_tmp144_ = _data_->_data65_->mute_combo;
		gtk_widget_set_valign ((GtkWidget*) _data_->_tmp144_, GTK_ALIGN_CENTER);
		_data_->_tmp145_ = _data_->_data65_->mute_combo;
		g_signal_connect_data ((GObject*) _data_->_tmp145_, "notify::selected", (GCallback) ____lambda279__g_object_notify, block65_data_ref (_data_->_data65_), (GClosureNotify) block65_data_unref, 0);
		_data_->_tmp146_ = _data_->mute_row;
		_data_->_tmp147_ = _data_->_data65_->mute_combo;
		adw_action_row_add_suffix (_data_->_tmp146_, (GtkWidget*) _data_->_tmp147_);
		_data_->_tmp148_ = _data_->mute_row;
		_data_->_tmp149_ = _data_->_data65_->mute_combo;
		adw_action_row_set_activatable_widget (_data_->_tmp148_, (GtkWidget*) _data_->_tmp149_);
		_data_->_tmp150_ = dc_chat_info_dialog_boxed_list (_data_->self);
		_data_->ephem_list = _data_->_tmp150_;
		_data_->_tmp151_ = _data_->ephem_list;
		_data_->_tmp152_ = dc_chat_info_dialog_action_row (_data_->self, "View Media", "Browse apps and media shared in this chat", "view-grid-symbolic", ____lambda280__dc_void_func, g_object_ref (_data_->self), g_object_unref);
		_data_->_tmp153_ = _data_->_tmp152_;
		gtk_list_box_append (_data_->_tmp151_, (GtkWidget*) _data_->_tmp153_);
		_g_object_unref0 (_data_->_tmp153_);
		_data_->_tmp154_ = _data_->ephem_list;
		_data_->_tmp155_ = _data_->mute_row;
		gtk_list_box_append (_data_->_tmp154_, (GtkWidget*) _data_->_tmp155_);
		_data_->_tmp156_ = _data_->ephem_list;
		_data_->_tmp157_ = _data_->ephem_row;
		gtk_list_box_append (_data_->_tmp156_, (GtkWidget*) _data_->_tmp157_);
		_data_->_tmp158_ = _data_->self->priv->content;
		_data_->_tmp159_ = _data_->ephem_list;
		gtk_box_append (_data_->_tmp158_, (GtkWidget*) _data_->_tmp159_);
		_data_->_tmp160_ = _data_->self->priv->content;
		_data_->_tmp161_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
		g_object_ref_sink (_data_->_tmp161_);
		_data_->_tmp162_ = _data_->_tmp161_;
		gtk_box_append (_data_->_tmp160_, (GtkWidget*) _data_->_tmp162_);
		_g_object_unref0 (_data_->_tmp162_);
		_data_->_tmp163_ = _data_->chat;
		if (json_object_has_member (_data_->_tmp163_, "contactIds")) {
			_data_->_tmp164_ = _data_->chat;
			_data_->_tmp165_ = json_object_get_array_member (_data_->_tmp164_, "contactIds");
			_data_->_tmp166_ = _json_array_ref0 (_data_->_tmp165_);
			_data_->_vala1_ids = _data_->_tmp166_;
			_data_->_tmp167_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
			g_object_ref_sink (_data_->_tmp167_);
			_data_->header_box = _data_->_tmp167_;
			if (_data_->self->priv->is_group) {
				_data_->_tmp169_ = _data_->_vala1_ids;
				_data_->_tmp170_ = g_strdup_printf ("Members (%u)", json_array_get_length (_data_->_tmp169_));
				_g_free0 (_data_->_tmp168_);
				_data_->_tmp168_ = _data_->_tmp170_;
			} else {
				_data_->_tmp171_ = g_strdup ("Contact");
				_g_free0 (_data_->_tmp168_);
				_data_->_tmp168_ = _data_->_tmp171_;
			}
			_data_->_tmp172_ = (GtkLabel*) gtk_label_new (_data_->_tmp168_);
			g_object_ref_sink (_data_->_tmp172_);
			_data_->members_lbl = _data_->_tmp172_;
			_data_->_tmp173_ = _data_->members_lbl;
			gtk_widget_add_css_class ((GtkWidget*) _data_->_tmp173_, "heading");
			_data_->_tmp174_ = _data_->members_lbl;
			gtk_widget_set_halign ((GtkWidget*) _data_->_tmp174_, GTK_ALIGN_START);
			_data_->_tmp175_ = _data_->members_lbl;
			gtk_widget_set_hexpand ((GtkWidget*) _data_->_tmp175_, TRUE);
			_data_->_tmp176_ = _data_->header_box;
			_data_->_tmp177_ = _data_->members_lbl;
			gtk_box_append (_data_->_tmp176_, (GtkWidget*) _data_->_tmp177_);
			if (_data_->self->priv->is_group) {
				_data_->_tmp178_ = _data_->header_box;
				_data_->_tmp179_ = dc_chat_info_dialog_flat_icon_button (_data_->self, "list-add-symbolic", "Add member", ______lambda281__dc_void_func, g_object_ref (_data_->self), g_object_unref, FALSE);
				_data_->_tmp180_ = _data_->_tmp179_;
				gtk_box_append (_data_->_tmp178_, (GtkWidget*) _data_->_tmp180_);
				_g_object_unref0 (_data_->_tmp180_);
			}
			_data_->_tmp181_ = _data_->self->priv->content;
			_data_->_tmp182_ = _data_->header_box;
			gtk_box_append (_data_->_tmp181_, (GtkWidget*) _data_->_tmp182_);
			_data_->_tmp183_ = dc_chat_info_dialog_boxed_list (_data_->self);
			_g_object_unref0 (_data_->self->priv->members_list);
			_data_->self->priv->members_list = _data_->_tmp183_;
			{
				_data_->_vala2_i = (guint) 0;
				{
					_data_->_tmp184_ = TRUE;
					while (TRUE) {
						if (!_data_->_tmp184_) {
							_data_->_tmp185_ = _data_->_vala2_i;
							_data_->_vala2_i = _data_->_tmp185_ + 1;
						}
						_data_->_tmp184_ = FALSE;
						_data_->_tmp186_ = _data_->_vala1_ids;
						if (!(_data_->_vala2_i < json_array_get_length (_data_->_tmp186_))) {
							break;
						}
						_data_->_tmp187_ = _data_->_vala1_ids;
						_data_->cid = (gint) json_array_get_int_element (_data_->_tmp187_, _data_->_vala2_i);
						_vala_array_add21 (&_data_->self->priv->member_contact_ids, &_data_->self->priv->member_contact_ids_length1, &_data_->self->priv->_member_contact_ids_size_, _data_->cid);
						_data_->_tmp188_ = _data_->self->priv->rpc;
						_data_->_tmp189_ = _data_->self->priv->rpc;
						_data_->_tmp190_ = dc_rpc_client_get_account_id (_data_->_tmp189_);
						_data_->_tmp191_ = _data_->_tmp190_;
						_data_->_state_ = 2;
						dc_rpc_client_get_contact_for (_data_->_tmp188_, _data_->_tmp191_, _data_->cid, dc_chat_info_dialog_load_info_ready, _data_);
						return FALSE;
						_state_2:
						_data_->_tmp192_ = dc_rpc_client_get_contact_for_finish (_data_->_tmp188_, _data_->_res_, &_data_->_inner_error0_);
						_data_->contact_obj = _data_->_tmp192_;
						if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
							_g_object_unref0 (_data_->members_lbl);
							_g_free0 (_data_->_tmp168_);
							_g_object_unref0 (_data_->header_box);
							_json_array_unref0 (_data_->_vala1_ids);
							_g_object_unref0 (_data_->ephem_list);
							_g_object_unref0 (_data_->mute_row);
							_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_->_tmp11_);
							_g_free0 (_data_->name);
							_g_free0 (_data_->_tmp6_);
							_json_object_unref0 (_data_->chat);
							block65_data_unref (_data_->_data65_);
							_data_->_data65_ = NULL;
							goto __catch0_g_error;
						}
						_data_->_tmp194_ = _data_->contact_obj;
						if (_data_->_tmp194_ != NULL) {
							_data_->_tmp195_ = _data_->contact_obj;
							_data_->_tmp196_ = dc_rpc_parsers_parse_contact (_data_->cid, _data_->_tmp195_);
							_g_object_unref0 (_data_->_tmp193_);
							_data_->_tmp193_ = _data_->_tmp196_;
						} else {
							_g_object_unref0 (_data_->_tmp193_);
							_data_->_tmp193_ = NULL;
						}
						_data_->_tmp197_ = _data_->_tmp193_;
						_data_->_tmp193_ = NULL;
						_data_->contact = _data_->_tmp197_;
						_data_->_tmp198_ = _data_->contact;
						if (_data_->_tmp198_ == NULL) {
							_g_object_unref0 (_data_->contact);
							_g_object_unref0 (_data_->_tmp193_);
							_json_object_unref0 (_data_->contact_obj);
							continue;
						}
						if (_data_->is_dm_chat) {
							_data_->_tmp201_ = _data_->contact;
							_data_->_tmp202_ = dc_contact_get_id (_data_->_tmp201_);
							_data_->_tmp203_ = _data_->_tmp202_;
							_data_->_tmp200_ = _data_->_tmp203_ > 1;
						} else {
							_data_->_tmp200_ = FALSE;
						}
						if (_data_->_tmp200_) {
							_data_->_tmp204_ = _data_->self->priv->dm_contact;
							_data_->_tmp199_ = _data_->_tmp204_ == NULL;
						} else {
							_data_->_tmp199_ = FALSE;
						}
						if (_data_->_tmp199_) {
							_data_->_tmp205_ = _data_->contact;
							_data_->_tmp206_ = _g_object_ref0 (_data_->_tmp205_);
							_g_object_unref0 (_data_->self->priv->dm_contact);
							_data_->self->priv->dm_contact = _data_->_tmp206_;
						}
						_data_->_tmp207_ = _data_->contact;
						_data_->_tmp208_ = dc_chat_info_dialog_build_contact_row (_data_->self, _data_->_tmp207_);
						_data_->row = _data_->_tmp208_;
						_data_->_tmp209_ = _data_->self->priv->members_list;
						_data_->_tmp210_ = _data_->row;
						gtk_list_box_append (_data_->_tmp209_, (GtkWidget*) _data_->_tmp210_);
						_g_object_unref0 (_data_->row);
						_g_object_unref0 (_data_->contact);
						_g_object_unref0 (_data_->_tmp193_);
						_json_object_unref0 (_data_->contact_obj);
					}
				}
			}
			_data_->_tmp211_ = _data_->self->priv->content;
			_data_->_tmp212_ = _data_->self->priv->members_list;
			gtk_box_append (_data_->_tmp211_, (GtkWidget*) _data_->_tmp212_);
			_g_object_unref0 (_data_->members_lbl);
			_g_free0 (_data_->_tmp168_);
			_g_object_unref0 (_data_->header_box);
			_json_array_unref0 (_data_->_vala1_ids);
		}
		_data_->_tmp213_ = _data_->self->priv->content;
		_data_->_tmp214_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
		g_object_ref_sink (_data_->_tmp214_);
		_data_->_tmp215_ = _data_->_tmp214_;
		gtk_box_append (_data_->_tmp213_, (GtkWidget*) _data_->_tmp215_);
		_g_object_unref0 (_data_->_tmp215_);
		_data_->_tmp216_ = dc_chat_info_dialog_boxed_list (_data_->self);
		_data_->actions_list = _data_->_tmp216_;
		_data_->_tmp217_ = _data_->actions_list;
		_data_->_tmp218_ = dc_chat_info_dialog_action_row (_data_->self, "Clear Chat", "Remove messages from this device", "edit-clear-symbolic", ____lambda283__dc_void_func, g_object_ref (_data_->self), g_object_unref);
		_data_->_tmp219_ = _data_->_tmp218_;
		gtk_list_box_append (_data_->_tmp217_, (GtkWidget*) _data_->_tmp219_);
		_g_object_unref0 (_data_->_tmp219_);
		_data_->_tmp220_ = _data_->actions_list;
		_data_->_tmp221_ = dc_chat_info_dialog_action_row (_data_->self, "Clear Sent Messages for Everyone", "Delete messages you sent for all participants", "edit-delete-symbolic", ____lambda285__dc_void_func, g_object_ref (_data_->self), g_object_unref);
		_data_->_tmp222_ = _data_->_tmp221_;
		gtk_list_box_append (_data_->_tmp220_, (GtkWidget*) _data_->_tmp222_);
		_g_object_unref0 (_data_->_tmp222_);
		if (_data_->self->priv->is_group) {
			_data_->_tmp223_ = _data_->actions_list;
			_data_->_tmp224_ = dc_chat_info_dialog_action_row (_data_->self, "Leave Group", "Stop receiving messages", "system-log-out-symbolic", _____lambda286__dc_void_func, g_object_ref (_data_->self), g_object_unref);
			_data_->_tmp225_ = _data_->_tmp224_;
			gtk_list_box_append (_data_->_tmp223_, (GtkWidget*) _data_->_tmp225_);
			_g_object_unref0 (_data_->_tmp225_);
			_data_->_tmp226_ = _data_->actions_list;
			_data_->_tmp227_ = dc_chat_info_dialog_action_row (_data_->self, "Disband Group", "Remove all members and delete messages", "edit-delete-symbolic", _____lambda288__dc_void_func, g_object_ref (_data_->self), g_object_unref);
			_data_->_tmp228_ = _data_->_tmp227_;
			gtk_list_box_append (_data_->_tmp226_, (GtkWidget*) _data_->_tmp228_);
			_g_object_unref0 (_data_->_tmp228_);
		}
		_data_->_tmp229_ = _data_->self->priv->dm_contact;
		if (_data_->_tmp229_ != NULL) {
			_data_->_tmp230_ = _data_->actions_list;
			_data_->_tmp231_ = _data_->self->priv->dm_contact;
			_data_->_tmp232_ = dc_chat_info_dialog_build_contact_block_row (_data_->self, _data_->_tmp231_);
			_data_->_tmp233_ = _data_->_tmp232_;
			gtk_list_box_append (_data_->_tmp230_, (GtkWidget*) _data_->_tmp233_);
			_g_object_unref0 (_data_->_tmp233_);
		}
		_data_->_tmp234_ = _data_->actions_list;
		_data_->_tmp235_ = dc_chat_info_dialog_action_row (_data_->self, "Delete for Me", "Remove from your chat list", "user-trash-symbolic", ____lambda292__dc_void_func, g_object_ref (_data_->self), g_object_unref);
		_data_->_tmp236_ = _data_->_tmp235_;
		gtk_list_box_append (_data_->_tmp234_, (GtkWidget*) _data_->_tmp236_);
		_g_object_unref0 (_data_->_tmp236_);
		_data_->_tmp237_ = _data_->self->priv->content;
		_data_->_tmp238_ = _data_->actions_list;
		gtk_box_append (_data_->_tmp237_, (GtkWidget*) _data_->_tmp238_);
		_g_object_unref0 (_data_->actions_list);
		_g_object_unref0 (_data_->ephem_list);
		_g_object_unref0 (_data_->mute_row);
		_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_->_tmp11_);
		_g_free0 (_data_->name);
		_g_free0 (_data_->_tmp6_);
		_json_object_unref0 (_data_->chat);
		block65_data_unref (_data_->_data65_);
		_data_->_data65_ = NULL;
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		gtk_widget_set_visible ((GtkWidget*) _data_->spinner, FALSE);
		_data_->_tmp239_ = _data_->e;
		_data_->_tmp240_ = _data_->_tmp239_->message;
		_data_->_tmp241_ = g_strconcat ("Failed to load: ", _data_->_tmp240_, NULL);
		_data_->_tmp242_ = _data_->_tmp241_;
		_data_->_tmp243_ = (GtkLabel*) gtk_label_new (_data_->_tmp242_);
		g_object_ref_sink (_data_->_tmp243_);
		_data_->_tmp244_ = _data_->_tmp243_;
		_g_free0 (_data_->_tmp242_);
		_data_->err = _data_->_tmp244_;
		_data_->_tmp245_ = _data_->err;
		gtk_widget_add_css_class ((GtkWidget*) _data_->_tmp245_, "dim-label");
		_data_->_tmp246_ = _data_->err;
		gtk_label_set_wrap (_data_->_tmp246_, TRUE);
		_data_->_tmp247_ = _data_->self->priv->content;
		_data_->_tmp248_ = _data_->err;
		gtk_box_append (_data_->_tmp247_, (GtkWidget*) _data_->_tmp248_);
		_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 void
dc_chat_info_dialog_set_mute_data_free (gpointer _data)
{
	DcChatInfoDialogSetMuteData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (DcChatInfoDialogSetMuteData, _data_);
}

static void
dc_chat_info_dialog_set_mute (DcChatInfoDialog* self,
                              gint seconds,
                              GAsyncReadyCallback _callback_,
                              gpointer _user_data_)
{
	DcChatInfoDialogSetMuteData* _data_;
	DcChatInfoDialog* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (DcChatInfoDialogSetMuteData);
	_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_mute_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->seconds = seconds;
	dc_chat_info_dialog_set_mute_co (_data_);
}

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

static void
dc_chat_info_dialog_set_mute_ready (GObject* source_object,
                                    GAsyncResult* _res_,
                                    gpointer _user_data_)
{
	DcChatInfoDialogSetMuteData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	dc_chat_info_dialog_set_mute_co (_data_);
}

static gboolean
dc_chat_info_dialog_set_mute_co (DcChatInfoDialogSetMuteData* _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_set_chat_mute_duration (_data_->_tmp0_, _data_->self->priv->chat_id, _data_->seconds, dc_chat_info_dialog_set_mute_ready, _data_);
		return FALSE;
		_state_1:
		dc_rpc_client_set_chat_mute_duration_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);
	}
	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 Block67Data*
block67_data_ref (Block67Data* _data67_)
{
	g_atomic_int_inc (&_data67_->_ref_count_);
	return _data67_;
}

static void
block67_data_unref (void * _userdata_)
{
	Block67Data* _data67_;
	_data67_ = (Block67Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data67_->_ref_count_)) {
		DcChatInfoDialog* self;
		self = _data67_->self;
		_g_object_unref0 (_data67_->row);
		_g_object_unref0 (self);
		g_slice_free (Block67Data, _data67_);
	}
}

static Block68Data*
block68_data_ref (Block68Data* _data68_)
{
	g_atomic_int_inc (&_data68_->_ref_count_);
	return _data68_;
}

static void
block68_data_unref (void * _userdata_)
{
	Block68Data* _data68_;
	_data68_ = (Block68Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data68_->_ref_count_)) {
		DcChatInfoDialog* self;
		self = _data68_->_data67_->self;
		_g_free0 (_data68_->addr);
		block67_data_unref (_data68_->_data67_);
		_data68_->_data67_ = NULL;
		g_slice_free (Block68Data, _data68_);
	}
}

static void
___lambda272_ (Block68Data* _data68_)
{
	Block67Data* _data67_;
	DcChatInfoDialog* self;
	GdkClipboard* clipboard = NULL;
	GdkClipboard* _tmp0_;
	GdkClipboard* _tmp1_;
	const gchar* _tmp2_;
	_data67_ = _data68_->_data67_;
	self = _data67_->self;
	_tmp0_ = gtk_widget_get_clipboard ((GtkWidget*) self);
	_tmp1_ = _g_object_ref0 (_tmp0_);
	clipboard = _tmp1_;
	_tmp2_ = _data68_->addr;
	gdk_clipboard_set_text (clipboard, _tmp2_);
	_g_object_unref0 (clipboard);
}

static void
____lambda272__dc_void_func (gpointer self)
{
	___lambda272_ (self);
}

static Block69Data*
block69_data_ref (Block69Data* _data69_)
{
	g_atomic_int_inc (&_data69_->_ref_count_);
	return _data69_;
}

static void
block69_data_unref (void * _userdata_)
{
	Block69Data* _data69_;
	_data69_ = (Block69Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data69_->_ref_count_)) {
		DcChatInfoDialog* self;
		self = _data69_->_data67_->self;
		block67_data_unref (_data69_->_data67_);
		_data69_->_data67_ = NULL;
		g_slice_free (Block69Data, _data69_);
	}
}

static void
___lambda273_ (Block69Data* _data69_)
{
	Block67Data* _data67_;
	DcChatInfoDialog* self;
	AdwActionRow* _tmp0_;
	_data67_ = _data69_->_data67_;
	self = _data67_->self;
	_tmp0_ = _data67_->row;
	dc_chat_info_dialog_remove_member (self, _data69_->cid, _tmp0_, NULL, NULL);
}

static void
____lambda273__dc_void_func (gpointer self)
{
	___lambda273_ (self);
}

static AdwActionRow*
dc_chat_info_dialog_build_contact_row (DcChatInfoDialog* self,
                                       DcContact* contact)
{
	Block67Data* _data67_;
	AdwActionRow* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	gboolean _tmp11_ = FALSE;
	AdwActionRow* _tmp19_;
	AdwActionRow* _tmp20_;
	AdwActionRow* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (contact != NULL, NULL);
	_data67_ = g_slice_new0 (Block67Data);
	_data67_->_ref_count_ = 1;
	_data67_->self = g_object_ref (self);
	_tmp0_ = dc_contact_row (contact, FALSE, FALSE);
	_data67_->row = _tmp0_;
	_tmp1_ = dc_contact_get_address (contact);
	_tmp2_ = _tmp1_;
	_tmp3_ = strlen (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_ > 0) {
		Block68Data* _data68_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		gchar* _tmp7_;
		GtkButton* copy_btn = NULL;
		GtkButton* _tmp8_;
		AdwActionRow* _tmp9_;
		GtkButton* _tmp10_;
		_data68_ = g_slice_new0 (Block68Data);
		_data68_->_ref_count_ = 1;
		_data68_->_data67_ = block67_data_ref (_data67_);
		_tmp5_ = dc_contact_get_address (contact);
		_tmp6_ = _tmp5_;
		_tmp7_ = g_strdup (_tmp6_);
		_data68_->addr = _tmp7_;
		_tmp8_ = dc_chat_info_dialog_flat_icon_button (self, "edit-copy-symbolic", "Copy email address", ____lambda272__dc_void_func, block68_data_ref (_data68_), block68_data_unref, FALSE);
		copy_btn = _tmp8_;
		_tmp9_ = _data67_->row;
		_tmp10_ = copy_btn;
		adw_action_row_add_suffix (_tmp9_, (GtkWidget*) _tmp10_);
		_g_object_unref0 (copy_btn);
		block68_data_unref (_data68_);
		_data68_ = NULL;
	}
	if (self->priv->is_group) {
		gint _tmp12_;
		gint _tmp13_;
		_tmp12_ = dc_contact_get_id (contact);
		_tmp13_ = _tmp12_;
		_tmp11_ = _tmp13_ != 1;
	} else {
		_tmp11_ = FALSE;
	}
	if (_tmp11_) {
		Block69Data* _data69_;
		gint _tmp14_;
		gint _tmp15_;
		AdwActionRow* _tmp16_;
		GtkButton* _tmp17_;
		GtkButton* _tmp18_;
		_data69_ = g_slice_new0 (Block69Data);
		_data69_->_ref_count_ = 1;
		_data69_->_data67_ = block67_data_ref (_data67_);
		_tmp14_ = dc_contact_get_id (contact);
		_tmp15_ = _tmp14_;
		_data69_->cid = _tmp15_;
		_tmp16_ = _data67_->row;
		_tmp17_ = dc_chat_info_dialog_flat_icon_button (self, "user-trash-symbolic", "Remove from group", ____lambda273__dc_void_func, block69_data_ref (_data69_), block69_data_unref, TRUE);
		_tmp18_ = _tmp17_;
		adw_action_row_add_suffix (_tmp16_, (GtkWidget*) _tmp18_);
		_g_object_unref0 (_tmp18_);
		block69_data_unref (_data69_);
		_data69_ = NULL;
	}
	_tmp19_ = _data67_->row;
	_tmp20_ = _g_object_ref0 (_tmp19_);
	result = _tmp20_;
	block67_data_unref (_data67_);
	_data67_ = NULL;
	return result;
}

static Block70Data*
block70_data_ref (Block70Data* _data70_)
{
	g_atomic_int_inc (&_data70_->_ref_count_);
	return _data70_;
}

static void
block70_data_unref (void * _userdata_)
{
	Block70Data* _data70_;
	_data70_ = (Block70Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data70_->_ref_count_)) {
		DcChatInfoDialog* self;
		self = _data70_->self;
		_g_object_unref0 (_data70_->row);
		_g_object_unref0 (_data70_->contact);
		_g_object_unref0 (self);
		g_slice_free (Block70Data, _data70_);
	}
}

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

static void
___lambda290__adw_action_row_activated (AdwActionRow* _sender,
                                        gpointer self)
{
	__lambda290_ (self);
}

static AdwActionRow*
dc_chat_info_dialog_build_contact_block_row (DcChatInfoDialog* self,
                                             DcContact* contact)
{
	Block70Data* _data70_;
	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);
	_data70_ = g_slice_new0 (Block70Data);
	_data70_->_ref_count_ = 1;
	_data70_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (contact);
	_g_object_unref0 (_data70_->contact);
	_data70_->contact = _tmp0_;
	_tmp1_ = (AdwActionRow*) adw_action_row_new ();
	g_object_ref_sink (_tmp1_);
	_data70_->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 (_data70_->row, (GtkWidget*) _tmp3_);
	_g_object_unref0 (_tmp3_);
	gtk_list_box_row_set_activatable ((GtkListBoxRow*) _data70_->row, TRUE);
	dc_chat_info_dialog_update_contact_block_row (self, _data70_->row, _data70_->contact);
	g_signal_connect_data (_data70_->row, "activated", (GCallback) ___lambda290__adw_action_row_activated, block70_data_ref (_data70_), (GClosureNotify) block70_data_unref, 0);
	_tmp4_ = _g_object_ref0 (_data70_->row);
	result = _tmp4_;
	block70_data_unref (_data70_);
	_data70_ = 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 Block71Data*
block71_data_ref (Block71Data* _data71_)
{
	g_atomic_int_inc (&_data71_->_ref_count_);
	return _data71_;
}

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

static void
__lambda270_ (Block71Data* _data71_)
{
	DcChatInfoDialog* self;
	self = _data71_->self;
	g_signal_emit_by_name (_data71_->dialog, "response", "save");
}

static void
___lambda270__gtk_entry_activate (GtkEntry* _sender,
                                  gpointer self)
{
	__lambda270_ (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
__lambda271_ (Block71Data* _data71_,
              const gchar* resp)
{
	DcChatInfoDialog* self;
	self = _data71_->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*) _data71_->entry);
		_tmp1_ = _tmp0_;
		_tmp2_ = string_strip (_tmp1_);
		_tmp3_ = _tmp2_;
		dc_chat_info_dialog_save_contact_name (self, _data71_->contact_id, _tmp3_, _data71_->name_lbl, NULL, NULL);
		_g_free0 (_tmp3_);
	}
}

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

static void
dc_chat_info_dialog_show_edit_contact_name_dialog (DcChatInfoDialog* self,
                                                   gint contact_id,
                                                   GtkLabel* name_lbl)
{
	Block71Data* _data71_;
	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);
	_data71_ = g_slice_new0 (Block71Data);
	_data71_->_ref_count_ = 1;
	_data71_->self = g_object_ref (self);
	_data71_->contact_id = contact_id;
	_tmp0_ = _g_object_ref0 (name_lbl);
	_g_object_unref0 (_data71_->name_lbl);
	_data71_->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_);
	_data71_->dialog = _tmp1_;
	_tmp2_ = (GtkEntry*) gtk_entry_new ();
	g_object_ref_sink (_tmp2_);
	_data71_->entry = _tmp2_;
	_tmp3_ = gtk_label_get_label (_data71_->name_lbl);
	_tmp4_ = _tmp3_;
	gtk_editable_set_text ((GtkEditable*) _data71_->entry, _tmp4_);
	gtk_entry_set_placeholder_text (_data71_->entry, "Contact name");
	gtk_entry_set_activates_default (_data71_->entry, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) _data71_->entry, TRUE);
	adw_alert_dialog_set_extra_child (_data71_->dialog, (GtkWidget*) _data71_->entry);
	adw_alert_dialog_add_response (_data71_->dialog, "cancel", "Cancel");
	adw_alert_dialog_add_response (_data71_->dialog, "save", "Save");
	adw_alert_dialog_set_response_appearance (_data71_->dialog, "save", ADW_RESPONSE_SUGGESTED);
	adw_alert_dialog_set_default_response (_data71_->dialog, "save");
	adw_alert_dialog_set_close_response (_data71_->dialog, "cancel");
	g_signal_connect_data (_data71_->entry, "activate", (GCallback) ___lambda270__gtk_entry_activate, block71_data_ref (_data71_), (GClosureNotify) block71_data_unref, 0);
	g_signal_connect_data (_data71_->dialog, "response", (GCallback) ___lambda271__adw_alert_dialog_response, block71_data_ref (_data71_), (GClosureNotify) block71_data_unref, 0);
	adw_dialog_present ((AdwDialog*) _data71_->dialog, (GtkWidget*) self);
	gtk_widget_grab_focus ((GtkWidget*) _data71_->entry);
	block71_data_unref (_data71_);
	_data71_ = 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_->_tmp2_ = _data_->self->priv->rpc;
		_data_->_tmp3_ = dc_rpc_client_get_account_id (_data_->_tmp2_);
		_data_->_tmp4_ = _data_->_tmp3_;
		_data_->_state_ = 2;
		dc_rpc_client_get_contact_for (_data_->_tmp1_, _data_->_tmp4_, _data_->contact_id, dc_chat_info_dialog_save_contact_name_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp5_ = dc_rpc_client_get_contact_for_finish (_data_->_tmp1_, _data_->_res_, &_data_->_inner_error0_);
		_data_->contact_obj = _data_->_tmp5_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp7_ = _data_->contact_obj;
		if (_data_->_tmp7_ != NULL) {
			_data_->_tmp8_ = _data_->contact_obj;
			_data_->_tmp9_ = dc_rpc_parsers_parse_contact (_data_->contact_id, _data_->_tmp8_);
			_g_object_unref0 (_data_->_tmp6_);
			_data_->_tmp6_ = _data_->_tmp9_;
		} else {
			_g_object_unref0 (_data_->_tmp6_);
			_data_->_tmp6_ = NULL;
		}
		_data_->_tmp10_ = _data_->_tmp6_;
		_data_->_tmp6_ = NULL;
		_data_->contact = _data_->_tmp10_;
		_data_->_tmp11_ = _data_->contact;
		if (_data_->_tmp11_ != NULL) {
			_data_->_tmp12_ = _data_->contact;
			_data_->_tmp13_ = _g_object_ref0 (_data_->_tmp12_);
			_g_object_unref0 (_data_->self->priv->dm_contact);
			_data_->self->priv->dm_contact = _data_->_tmp13_;
			_data_->_tmp14_ = _data_->contact;
			_data_->_tmp15_ = dc_chat_info_dialog_contact_label (_data_->_tmp14_);
			_g_free0 (_data_->self->priv->chat_name);
			_data_->self->priv->chat_name = _data_->_tmp15_;
			_data_->_tmp16_ = _data_->self->priv->chat_name;
			gtk_label_set_label (_data_->name_lbl, _data_->_tmp16_);
			_data_->_tmp18_ = _data_->self->priv->members_list;
			if (_data_->_tmp18_ != NULL) {
				_data_->_tmp17_ = !_data_->self->priv->is_group;
			} else {
				_data_->_tmp17_ = FALSE;
			}
			if (_data_->_tmp17_) {
				_data_->_tmp19_ = _data_->self->priv->members_list;
				dc_clear_listbox (_data_->_tmp19_);
				_data_->_tmp20_ = _data_->self->priv->members_list;
				_data_->_tmp21_ = _data_->contact;
				_data_->_tmp22_ = dc_chat_info_dialog_build_contact_row (_data_->self, _data_->_tmp21_);
				_data_->_tmp23_ = _data_->_tmp22_;
				gtk_list_box_append (_data_->_tmp20_, (GtkWidget*) _data_->_tmp23_);
				_g_object_unref0 (_data_->_tmp23_);
			}
		} else {
			_data_->_tmp24_ = strlen (_data_->new_name);
			_data_->_tmp25_ = _data_->_tmp24_;
			if (_data_->_tmp25_ > 0) {
				_data_->_tmp26_ = g_strdup (_data_->new_name);
				_g_free0 (_data_->self->priv->chat_name);
				_data_->self->priv->chat_name = _data_->_tmp26_;
				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);
		_g_object_unref0 (_data_->contact);
		_g_object_unref0 (_data_->_tmp6_);
		_json_object_unref0 (_data_->contact_obj);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp27_ = _data_->e;
		_data_->_tmp28_ = _data_->_tmp27_->message;
		dc_show_error ((GtkWidget*) _data_->self, _data_->_tmp28_);
		_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 Block72Data*
block72_data_ref (Block72Data* _data72_)
{
	g_atomic_int_inc (&_data72_->_ref_count_);
	return _data72_;
}

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

static void
__lambda275_ (Block72Data* _data72_)
{
	DcChatInfoDialog* self;
	self = _data72_->self;
	g_signal_emit_by_name (_data72_->dialog, "response", "save");
}

static void
___lambda275__gtk_entry_activate (GtkEntry* _sender,
                                  gpointer self)
{
	__lambda275_ (self);
}

static void
__lambda276_ (Block72Data* _data72_,
              const gchar* resp)
{
	DcChatInfoDialog* self;
	gchar* new_name = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	const gchar* _tmp3_;
	gint _tmp4_;
	gint _tmp5_;
	self = _data72_->self;
	g_return_if_fail (resp != NULL);
	if (g_strcmp0 (resp, "save") != 0) {
		return;
	}
	_tmp0_ = gtk_editable_get_text ((GtkEditable*) _data72_->entry);
	_tmp1_ = _tmp0_;
	_tmp2_ = string_strip (_tmp1_);
	new_name = _tmp2_;
	_tmp3_ = new_name;
	_tmp4_ = strlen (_tmp3_);
	_tmp5_ = _tmp4_;
	if (_tmp5_ > 0) {
		const gchar* _tmp6_;
		_tmp6_ = new_name;
		dc_chat_info_dialog_save_group_name (self, _tmp6_, _data72_->name_lbl, NULL, NULL);
	}
	_g_free0 (new_name);
}

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

static void
dc_chat_info_dialog_show_edit_group_name_dialog (DcChatInfoDialog* self,
                                                 GtkLabel* name_lbl)
{
	Block72Data* _data72_;
	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);
	_data72_ = g_slice_new0 (Block72Data);
	_data72_->_ref_count_ = 1;
	_data72_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (name_lbl);
	_g_object_unref0 (_data72_->name_lbl);
	_data72_->name_lbl = _tmp0_;
	_tmp1_ = (AdwAlertDialog*) adw_alert_dialog_new ("Edit Group Name", NULL);
	g_object_ref_sink (_tmp1_);
	_data72_->dialog = _tmp1_;
	_tmp2_ = (GtkEntry*) gtk_entry_new ();
	g_object_ref_sink (_tmp2_);
	_data72_->entry = _tmp2_;
	_tmp3_ = gtk_label_get_label (_data72_->name_lbl);
	_tmp4_ = _tmp3_;
	gtk_editable_set_text ((GtkEditable*) _data72_->entry, _tmp4_);
	gtk_entry_set_placeholder_text (_data72_->entry, "Group name");
	gtk_entry_set_activates_default (_data72_->entry, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) _data72_->entry, TRUE);
	adw_alert_dialog_set_extra_child (_data72_->dialog, (GtkWidget*) _data72_->entry);
	adw_alert_dialog_add_response (_data72_->dialog, "cancel", "Cancel");
	adw_alert_dialog_add_response (_data72_->dialog, "save", "Save");
	adw_alert_dialog_set_response_appearance (_data72_->dialog, "save", ADW_RESPONSE_SUGGESTED);
	adw_alert_dialog_set_default_response (_data72_->dialog, "save");
	adw_alert_dialog_set_close_response (_data72_->dialog, "cancel");
	g_signal_connect_data (_data72_->entry, "activate", (GCallback) ___lambda275__gtk_entry_activate, block72_data_ref (_data72_), (GClosureNotify) block72_data_unref, 0);
	g_signal_connect_data (_data72_->dialog, "response", (GCallback) ___lambda276__adw_alert_dialog_response, block72_data_ref (_data72_), (GClosureNotify) block72_data_unref, 0);
	adw_dialog_present ((AdwDialog*) _data72_->dialog, (GtkWidget*) self);
	gtk_widget_grab_focus ((GtkWidget*) _data72_->entry);
	block72_data_unref (_data72_);
	_data72_ = NULL;
}

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

static void
dc_chat_info_dialog_save_group_name (DcChatInfoDialog* self,
                                     const gchar* new_name,
                                     GtkLabel* name_lbl,
                                     GAsyncReadyCallback _callback_,
                                     gpointer _user_data_)
{
	DcChatInfoDialogSaveGroupNameData* _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 (DcChatInfoDialogSaveGroupNameData);
	_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_group_name_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_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_group_name_co (_data_);
}

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

static void
dc_chat_info_dialog_save_group_name_ready (GObject* source_object,
                                           GAsyncResult* _res_,
                                           gpointer _user_data_)
{
	DcChatInfoDialogSaveGroupNameData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	dc_chat_info_dialog_save_group_name_co (_data_);
}

static gboolean
dc_chat_info_dialog_save_group_name_co (DcChatInfoDialogSaveGroupNameData* _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_set_chat_name (_data_->_tmp0_, _data_->self->priv->chat_id, _data_->new_name, dc_chat_info_dialog_save_group_name_ready, _data_);
		return FALSE;
		_state_1:
		dc_rpc_client_set_chat_name_finish (_data_->_tmp0_, _data_->_res_, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp1_ = g_strdup (_data_->new_name);
		_g_free0 (_data_->self->priv->chat_name);
		_data_->self->priv->chat_name = _data_->_tmp1_;
		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);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp2_ = _data_->e;
		_data_->_tmp3_ = _data_->_tmp2_->message;
		dc_show_error ((GtkWidget*) _data_->self, _data_->_tmp3_);
		_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
__lambda282_ (DcChatInfoDialog* self,
              gint _,
              const gchar* email)
{
	g_return_if_fail (email != NULL);
	dc_chat_info_dialog_do_add_member (self, email, NULL, NULL);
}

static void
___lambda282__dc_contact_picker_dialog_contact_picked (DcContactPickerDialog* _sender,
                                                       gint contact_id,
                                                       const gchar* email,
                                                       gpointer self)
{
	__lambda282_ ((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) ___lambda282__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_->_tmp3_ = _data_->self->priv->rpc;
		_data_->_tmp4_ = dc_rpc_client_get_account_id (_data_->_tmp3_);
		_data_->_tmp5_ = _data_->_tmp4_;
		_data_->_state_ = 3;
		dc_rpc_client_get_contact_for (_data_->_tmp2_, _data_->_tmp5_, _data_->contact_id, dc_chat_info_dialog_do_add_member_ready, _data_);
		return FALSE;
		_state_3:
		_data_->_tmp6_ = dc_rpc_client_get_contact_for_finish (_data_->_tmp2_, _data_->_res_, &_data_->_inner_error0_);
		_data_->contact_obj = _data_->_tmp6_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp8_ = _data_->contact_obj;
		if (_data_->_tmp8_ != NULL) {
			_data_->_tmp9_ = _data_->contact_obj;
			_data_->_tmp10_ = dc_rpc_parsers_parse_contact (_data_->contact_id, _data_->_tmp9_);
			_g_object_unref0 (_data_->_tmp7_);
			_data_->_tmp7_ = _data_->_tmp10_;
		} else {
			_g_object_unref0 (_data_->_tmp7_);
			_data_->_tmp7_ = NULL;
		}
		_data_->_tmp11_ = _data_->_tmp7_;
		_data_->_tmp7_ = NULL;
		_data_->contact = _data_->_tmp11_;
		_data_->_tmp13_ = _data_->contact;
		if (_data_->_tmp13_ != NULL) {
			_data_->_tmp14_ = _data_->self->priv->members_list;
			_data_->_tmp12_ = _data_->_tmp14_ != NULL;
		} else {
			_data_->_tmp12_ = FALSE;
		}
		if (_data_->_tmp12_) {
			_data_->_tmp15_ = _data_->contact;
			_data_->_tmp16_ = dc_chat_info_dialog_build_contact_row (_data_->self, _data_->_tmp15_);
			_data_->row = _data_->_tmp16_;
			_data_->_tmp17_ = _data_->self->priv->members_list;
			_data_->_tmp18_ = _data_->row;
			gtk_list_box_append (_data_->_tmp17_, (GtkWidget*) _data_->_tmp18_);
			_g_object_unref0 (_data_->row);
		}
		_g_object_unref0 (_data_->contact);
		_g_object_unref0 (_data_->_tmp7_);
		_json_object_unref0 (_data_->contact_obj);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp19_ = _data_->e;
		_data_->_tmp20_ = _data_->_tmp19_->message;
		dc_show_error ((GtkWidget*) _data_->self, _data_->_tmp20_);
		_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 Block73Data*
block73_data_ref (Block73Data* _data73_)
{
	g_atomic_int_inc (&_data73_->_ref_count_);
	return _data73_;
}

static void
block73_data_unref (void * _userdata_)
{
	Block73Data* _data73_;
	_data73_ = (Block73Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data73_->_ref_count_)) {
		DcChatInfoDialog* self;
		self = _data73_->self;
		_g_object_unref0 (_data73_->contact);
		_g_object_unref0 (_data73_->row);
		_g_object_unref0 (self);
		g_slice_free (Block73Data, _data73_);
	}
}

static void
__lambda291_ (Block73Data* _data73_)
{
	DcChatInfoDialog* self;
	self = _data73_->self;
	dc_chat_info_dialog_set_contact_blocked (self, _data73_->contact, _data73_->row, TRUE, NULL, NULL);
}

static void
___lambda291__dc_void_func (gpointer self)
{
	__lambda291_ (self);
}

static void
dc_chat_info_dialog_confirm_block_contact (DcChatInfoDialog* self,
                                           DcContact* contact,
                                           AdwActionRow* row)
{
	Block73Data* _data73_;
	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);
	_data73_ = g_slice_new0 (Block73Data);
	_data73_->_ref_count_ = 1;
	_data73_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (contact);
	_g_object_unref0 (_data73_->contact);
	_data73_->contact = _tmp0_;
	_tmp1_ = _g_object_ref0 (row);
	_g_object_unref0 (_data73_->row);
	_data73_->row = _tmp1_;
	_tmp2_ = dc_chat_info_dialog_contact_label (_data73_->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", ___lambda291__dc_void_func, block73_data_ref (_data73_), block73_data_unref);
	_g_free0 (_tmp4_);
	_g_free0 (label);
	block73_data_unref (_data73_);
	_data73_ = 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 Block74Data*
block74_data_ref (Block74Data* _data74_)
{
	g_atomic_int_inc (&_data74_->_ref_count_);
	return _data74_;
}

static void
block74_data_unref (void * _userdata_)
{
	Block74Data* _data74_;
	_data74_ = (Block74Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data74_->_ref_count_)) {
		DcChatInfoDialog* self;
		self = _data74_->self;
		_g_object_unref0 (self);
		g_slice_free (Block74Data, _data74_);
	}
}

static void
__lambda284_ (Block74Data* _data74_)
{
	DcChatInfoDialog* self;
	self = _data74_->self;
	dc_chat_info_dialog_do_clear_history (self, _data74_->for_all, NULL, NULL);
}

static void
___lambda284__dc_void_func (gpointer self)
{
	__lambda284_ (self);
}

static void
dc_chat_info_dialog_confirm_clear_history (DcChatInfoDialog* self,
                                           gboolean for_all)
{
	Block74Data* _data74_;
	const gchar* _tmp0_ = NULL;
	gchar* title = NULL;
	gchar* _tmp1_;
	const gchar* _tmp2_ = NULL;
	gchar* body = NULL;
	gchar* _tmp3_;
	const gchar* _tmp4_ = NULL;
	gchar* action_label = NULL;
	gchar* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	g_return_if_fail (self != NULL);
	_data74_ = g_slice_new0 (Block74Data);
	_data74_->_ref_count_ = 1;
	_data74_->self = g_object_ref (self);
	_data74_->for_all = for_all;
	if (_data74_->for_all) {
		_tmp0_ = "Clear Sent Messages for Everyone";
	} else {
		_tmp0_ = "Clear Chat";
	}
	_tmp1_ = g_strdup (_tmp0_);
	title = _tmp1_;
	if (_data74_->for_all) {
		_tmp2_ = "Delete messages you sent for all participants? Messages from other peo" \
"ple can only be cleared from your device.";
	} else {
		_tmp2_ = "Remove all messages from this device? The chat will stay in your conve" \
"rsation list.";
	}
	_tmp3_ = g_strdup (_tmp2_);
	body = _tmp3_;
	if (_data74_->for_all) {
		_tmp4_ = "Clear Sent Messages";
	} else {
		_tmp4_ = "Clear Chat";
	}
	_tmp5_ = g_strdup (_tmp4_);
	action_label = _tmp5_;
	_tmp6_ = title;
	_tmp7_ = body;
	dc_confirm_action ((GtkWidget*) self, _tmp6_, _tmp7_, "clear", action_label, ___lambda284__dc_void_func, block74_data_ref (_data74_), block74_data_unref);
	_g_free0 (action_label);
	_g_free0 (body);
	_g_free0 (title);
	block74_data_unref (_data74_);
	_data74_ = NULL;
}

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;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_state_ = 1;
		dc_chat_info_dialog_delete_all_messages (_data_->self, _data_->for_all, dc_chat_info_dialog_do_clear_history_ready, _data_);
		return FALSE;
		_state_1:
		dc_chat_info_dialog_delete_all_messages_finish (_data_->self, _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);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp0_ = _data_->e;
		_data_->_tmp1_ = _data_->_tmp0_->message;
		dc_show_error ((GtkWidget*) _data_->self, _data_->_tmp1_);
		_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_delete_all_messages_data_free (gpointer _data)
{
	DcChatInfoDialogDeleteAllMessagesData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (DcChatInfoDialogDeleteAllMessagesData, _data_);
}

static void
dc_chat_info_dialog_delete_all_messages (DcChatInfoDialog* self,
                                         gboolean for_all,
                                         GAsyncReadyCallback _callback_,
                                         gpointer _user_data_)
{
	DcChatInfoDialogDeleteAllMessagesData* _data_;
	DcChatInfoDialog* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (DcChatInfoDialogDeleteAllMessagesData);
	_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_delete_all_messages_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->for_all = for_all;
	dc_chat_info_dialog_delete_all_messages_co (_data_);
}

static void
dc_chat_info_dialog_delete_all_messages_finish (DcChatInfoDialog* self,
                                                GAsyncResult* _res_,
                                                GError** error)
{
	DcChatInfoDialogDeleteAllMessagesData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return;
	}
}

static void
dc_chat_info_dialog_delete_all_messages_ready (GObject* source_object,
                                               GAsyncResult* _res_,
                                               gpointer _user_data_)
{
	DcChatInfoDialogDeleteAllMessagesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	dc_chat_info_dialog_delete_all_messages_co (_data_);
}

static gboolean
dc_chat_info_dialog_delete_all_messages_co (DcChatInfoDialogDeleteAllMessagesData* _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_->_tmp1_ = _data_->self->priv->rpc;
	_data_->_tmp2_ = dc_rpc_client_get_account_id (_data_->_tmp1_);
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->_tmp4_ = 0;
	_data_->_state_ = 1;
	dc_chat_message_ids_for_clear (_data_->_tmp0_, _data_->_tmp3_, _data_->self->priv->chat_id, _data_->for_all, dc_chat_info_dialog_delete_all_messages_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp5_ = dc_chat_message_ids_for_clear_finish (_data_->_res_, &_data_->_tmp4_, &_data_->_inner_error0_);
	_data_->ids = _data_->_tmp5_;
	_data_->ids_length1 = _data_->_tmp4_;
	_data_->_ids_size_ = _data_->ids_length1;
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp6_ = _data_->ids;
	_data_->_tmp6__length1 = _data_->ids_length1;
	if (_data_->_tmp6__length1 == 0) {
		_data_->ids = (g_free (_data_->ids), 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;
	}
	if (_data_->for_all) {
		_data_->_tmp7_ = _data_->self->priv->rpc;
		_data_->_tmp8_ = _data_->ids;
		_data_->_tmp8__length1 = _data_->ids_length1;
		_data_->_state_ = 2;
		dc_rpc_client_delete_messages_for_all (_data_->_tmp7_, _data_->_tmp8_, (gint) _data_->_tmp8__length1, dc_chat_info_dialog_delete_all_messages_ready, _data_);
		return FALSE;
		_state_2:
		dc_rpc_client_delete_messages_for_all_finish (_data_->_tmp7_, _data_->_res_, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
			_data_->ids = (g_free (_data_->ids), NULL);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
	} else {
		_data_->_tmp9_ = _data_->self->priv->rpc;
		_data_->_tmp10_ = _data_->ids;
		_data_->_tmp10__length1 = _data_->ids_length1;
		_data_->_state_ = 3;
		dc_rpc_client_delete_messages (_data_->_tmp9_, _data_->_tmp10_, (gint) _data_->_tmp10__length1, dc_chat_info_dialog_delete_all_messages_ready, _data_);
		return FALSE;
		_state_3:
		dc_rpc_client_delete_messages_finish (_data_->_tmp9_, _data_->_res_, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
			_data_->ids = (g_free (_data_->ids), NULL);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
	}
	_data_->ids = (g_free (_data_->ids), 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
__lambda287_ (DcChatInfoDialog* self)
{
	dc_chat_info_dialog_do_leave_group (self, NULL, NULL);
}

static void
___lambda287__dc_void_func (gpointer self)
{
	__lambda287_ ((DcChatInfoDialog*) self);
}

static void
dc_chat_info_dialog_confirm_leave_group (DcChatInfoDialog* self)
{
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->chat_name;
	_tmp1_ = g_strdup_printf ("Leave \"%s\"? You will stop receiving messages.", _tmp0_);
	_tmp2_ = _tmp1_;
	dc_confirm_action ((GtkWidget*) self, "Leave Group", _tmp2_, "leave", "Leave", ___lambda287__dc_void_func, g_object_ref (self), g_object_unref);
	_g_free0 (_tmp2_);
}

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
__lambda289_ (DcChatInfoDialog* self)
{
	dc_chat_info_dialog_do_disband_group (self, NULL, NULL);
}

static void
___lambda289__dc_void_func (gpointer self)
{
	__lambda289_ ((DcChatInfoDialog*) self);
}

static void
dc_chat_info_dialog_confirm_disband_group (DcChatInfoDialog* self)
{
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->chat_name;
	_tmp1_ = g_strdup_printf ("Remove all members from \"%s\" and delete your sent messages for every" \
"one? Other messages will only be removed locally.", _tmp0_);
	_tmp2_ = _tmp1_;
	dc_confirm_action ((GtkWidget*) self, "Disband Group", _tmp2_, "disband", "Disband", ___lambda289__dc_void_func, g_object_ref (self), g_object_unref);
	_g_free0 (_tmp2_);
}

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;
		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_->_state_ = 2;
		dc_chat_info_dialog_delete_all_messages (_data_->self, TRUE, dc_chat_info_dialog_do_disband_group_ready, _data_);
		return FALSE;
		_state_2:
		dc_chat_info_dialog_delete_all_messages_finish (_data_->self, _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_leave_group (_data_->_tmp2_, _data_->self->priv->chat_id, dc_chat_info_dialog_do_disband_group_ready, _data_);
		return FALSE;
		_state_3:
		dc_rpc_client_leave_group_finish (_data_->_tmp2_, _data_->_res_, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp3_ = _data_->self->priv->rpc;
		_data_->_state_ = 4;
		dc_rpc_client_delete_chat (_data_->_tmp3_, _data_->self->priv->chat_id, dc_chat_info_dialog_do_disband_group_ready, _data_);
		return FALSE;
		_state_4:
		dc_rpc_client_delete_chat_finish (_data_->_tmp3_, _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_->_tmp4_ = _data_->e;
		_data_->_tmp5_ = _data_->_tmp4_->message;
		dc_show_error ((GtkWidget*) _data_->self, _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
__lambda293_ (DcChatInfoDialog* self)
{
	dc_chat_info_dialog_do_delete_chat_from_dialog (self, NULL, NULL);
}

static void
___lambda293__dc_void_func (gpointer self)
{
	__lambda293_ ((DcChatInfoDialog*) self);
}

static void
dc_chat_info_dialog_confirm_delete_chat (DcChatInfoDialog* self)
{
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->chat_name;
	_tmp1_ = g_strdup_printf ("Remove \"%s\" from your chat list? You may still receive messages if y" \
"ou are a member.", _tmp0_);
	_tmp2_ = _tmp1_;
	dc_confirm_action ((GtkWidget*) self, "Delete for Me", _tmp2_, "delete", "Delete", ___lambda293__dc_void_func, g_object_ref (self), g_object_unref);
	_g_free0 (_tmp2_);
}

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_object_unref0 (self->priv->viewer);
	_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);
}

