/* 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 struct _Block50Data Block50Data;
#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 _Block51Data Block51Data;

#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 _Block52Data Block52Data;
typedef struct _Block53Data Block53Data;
typedef struct _Block54Data Block54Data;
typedef struct _Block55Data Block55Data;
typedef struct _Block56Data Block56Data;
typedef struct _DcChatInfoDialogSaveContactNameData DcChatInfoDialogSaveContactNameData;
typedef struct _Block57Data Block57Data;
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 _DcChatInfoDialogConfirmBlockContactData DcChatInfoDialogConfirmBlockContactData;
typedef struct _DcChatInfoDialogSetContactBlockedData DcChatInfoDialogSetContactBlockedData;
typedef struct _DcChatInfoDialogConfirmClearHistoryData DcChatInfoDialogConfirmClearHistoryData;
typedef struct _DcChatInfoDialogDoClearHistoryData DcChatInfoDialogDoClearHistoryData;
typedef struct _DcChatInfoDialogDeleteAllMessagesData DcChatInfoDialogDeleteAllMessagesData;

#define DC_TYPE_NEW_GROUP_DIALOG (dc_new_group_dialog_get_type ())
#define DC_NEW_GROUP_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DC_TYPE_NEW_GROUP_DIALOG, DcNewGroupDialog))
#define DC_NEW_GROUP_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DC_TYPE_NEW_GROUP_DIALOG, DcNewGroupDialogClass))
#define DC_IS_NEW_GROUP_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DC_TYPE_NEW_GROUP_DIALOG))
#define DC_IS_NEW_GROUP_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DC_TYPE_NEW_GROUP_DIALOG))
#define DC_NEW_GROUP_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DC_TYPE_NEW_GROUP_DIALOG, DcNewGroupDialogClass))

typedef struct _DcNewGroupDialog DcNewGroupDialog;
typedef struct _DcNewGroupDialogClass DcNewGroupDialogClass;
typedef struct _DcChatInfoDialogShowDuplicateGroupDialogData DcChatInfoDialogShowDuplicateGroupDialogData;
typedef struct _DcChatInfoDialogOnDuplicateCreatedData DcChatInfoDialogOnDuplicateCreatedData;
typedef struct _DcChatInfoDialogConfirmLeaveGroupData DcChatInfoDialogConfirmLeaveGroupData;
typedef struct _DcChatInfoDialogDoLeaveGroupData DcChatInfoDialogDoLeaveGroupData;
typedef struct _DcChatInfoDialogConfirmDisbandGroupData DcChatInfoDialogConfirmDisbandGroupData;
typedef struct _DcChatInfoDialogDoDisbandGroupData DcChatInfoDialogDoDisbandGroupData;
typedef struct _DcChatInfoDialogConfirmDeleteChatData DcChatInfoDialogConfirmDeleteChatData;
typedef struct _DcChatInfoDialogDoDeleteChatFromDialogData DcChatInfoDialogDoDeleteChatFromDialogData;
typedef struct _DcChatInfoDialogPickAvatarData DcChatInfoDialogPickAvatarData;
enum  {
	DC_CHAT_INFO_DIALOG_CHAT_DELETED_SIGNAL,
	DC_CHAT_INFO_DIALOG_CHAT_CHANGED_SIGNAL,
	DC_CHAT_INFO_DIALOG_CONTACT_BLOCKED_SIGNAL,
	DC_CHAT_INFO_DIALOG_NUM_SIGNALS
};
static guint dc_chat_info_dialog_signals[DC_CHAT_INFO_DIALOG_NUM_SIGNALS] = {0};

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

struct _DcChatInfoDialogClass {
	AdwDialogClass parent_class;
};

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

struct _Block50Data {
	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 _Block51Data {
	int _ref_count_;
	Block50Data * _data50_;
	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;
	Block50Data* _data50_;
	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_;
	const gchar* _tmp28_;
	gchar* _tmp29_;
	gboolean _tmp30_;
	JsonObject* _tmp31_;
	JsonArray* ids;
	JsonObject* _tmp32_;
	JsonArray* _tmp33_;
	JsonArray* _tmp34_;
	JsonArray* _tmp35_;
	JsonArray* _tmp36_;
	AdwAvatar* avatar;
	const gchar* _tmp37_;
	AdwAvatar* _tmp38_;
	AdwAvatar* _tmp39_;
	const gchar* _tmp40_;
	GdkTexture* _tmp41_;
	GdkTexture* _tmp42_;
	gboolean _tmp43_;
	const gchar* _tmp44_;
	const gchar* _tmp45_;
	gint _tmp46_;
	gint _tmp47_;
	Block51Data* _data51_;
	const gchar* _tmp48_;
	gchar* _tmp49_;
	GtkButton* avatar_btn;
	GtkButton* _tmp50_;
	GtkButton* _tmp51_;
	AdwAvatar* _tmp52_;
	GtkButton* _tmp53_;
	GtkButton* _tmp54_;
	GtkButton* _tmp55_;
	GtkButton* _tmp56_;
	GtkButton* _tmp57_;
	GtkBox* _tmp58_;
	GtkButton* _tmp59_;
	AdwAvatar* _tmp60_;
	GtkBox* _tmp61_;
	AdwAvatar* _tmp62_;
	GtkButton* change_avatar_btn;
	GtkButton* _tmp63_;
	GtkButton* _tmp64_;
	GtkButton* _tmp65_;
	GtkBox* _tmp66_;
	GtkButton* _tmp67_;
	GtkBox* name_box;
	GtkBox* _tmp68_;
	GtkBox* _tmp69_;
	const gchar* _tmp70_;
	GtkLabel* _tmp71_;
	GtkLabel* _tmp72_;
	GtkLabel* _tmp73_;
	GtkLabel* _tmp74_;
	GtkBox* _tmp75_;
	GtkLabel* _tmp76_;
	gboolean _tmp77_;
	GtkButton* edit_contact_btn;
	GtkButton* _tmp78_;
	GtkButton* _tmp79_;
	GtkBox* _tmp80_;
	GtkButton* _tmp81_;
	GtkButton* edit_group_btn;
	GtkButton* _tmp82_;
	GtkButton* _tmp83_;
	GtkBox* _tmp84_;
	GtkButton* _tmp85_;
	GtkBox* _tmp86_;
	GtkBox* _tmp87_;
	gchar* type_str;
	const gchar* _tmp88_;
	gchar* _tmp89_;
	const gchar* _tmp90_;
	gchar* _tmp91_;
	GtkLabel* type_lbl;
	const gchar* _tmp92_;
	GtkLabel* _tmp93_;
	GtkLabel* _tmp94_;
	GtkLabel* _tmp95_;
	GtkBox* _tmp96_;
	GtkLabel* _tmp97_;
	GtkListBox* invite_list;
	GtkListBox* _tmp98_;
	AdwActionRow* invite_row;
	AdwActionRow* _tmp99_;
	AdwActionRow* _tmp100_;
	GtkListBox* _tmp101_;
	AdwActionRow* _tmp102_;
	GtkBox* _tmp103_;
	GtkListBox* _tmp104_;
	gint ephemeral_timer;
	JsonObject* _tmp105_;
	AdwActionRow* ephem_row;
	AdwActionRow* _tmp106_;
	AdwActionRow* _tmp107_;
	gint* _tmp108_;
	gchar** timer_labels;
	gchar* _tmp109_;
	gchar* _tmp110_;
	gchar* _tmp111_;
	gchar* _tmp112_;
	gchar* _tmp113_;
	gchar* _tmp114_;
	gchar* _tmp115_;
	gchar* _tmp116_;
	gchar* _tmp117_;
	gchar** _tmp118_;
	gint timer_labels_length1;
	gint _timer_labels_size_;
	gint active_idx;
	gint i;
	gboolean _tmp119_;
	gint _tmp120_;
	gint* _tmp121_;
	gint _tmp121__length1;
	gint* _tmp122_;
	gint _tmp122__length1;
	gint _tmp123_;
	gchar** _tmp124_;
	gint _tmp124__length1;
	GtkDropDown* _tmp125_;
	GtkDropDown* _tmp126_;
	GtkDropDown* _tmp127_;
	GtkDropDown* _tmp128_;
	AdwActionRow* _tmp129_;
	GtkDropDown* _tmp130_;
	AdwActionRow* _tmp131_;
	GtkDropDown* _tmp132_;
	gboolean is_muted;
	JsonObject* _tmp133_;
	AdwActionRow* mute_row;
	AdwActionRow* _tmp134_;
	AdwActionRow* _tmp135_;
	gchar** _tmp136_;
	gchar** _tmp137_;
	gint _tmp137__length1;
	gchar* _tmp138_;
	gint _vala1_i;
	gboolean _tmp139_;
	gint _tmp140_;
	gchar** _tmp141_;
	gint _tmp141__length1;
	const gchar* _tmp142_;
	gchar* _tmp143_;
	gchar** _tmp144_;
	gint _tmp144__length1;
	GtkDropDown* _tmp145_;
	gint _tmp146_;
	gchar** _tmp147_;
	gint _tmp147__length1;
	GtkDropDown* _tmp148_;
	GtkDropDown* _tmp149_;
	GtkDropDown* _tmp150_;
	AdwActionRow* _tmp151_;
	GtkDropDown* _tmp152_;
	AdwActionRow* _tmp153_;
	GtkDropDown* _tmp154_;
	GtkListBox* ephem_list;
	GtkListBox* _tmp155_;
	AdwActionRow* media_row;
	AdwActionRow* _tmp156_;
	AdwActionRow* _tmp157_;
	GtkListBox* _tmp158_;
	AdwActionRow* _tmp159_;
	GtkListBox* _tmp160_;
	AdwActionRow* _tmp161_;
	GtkListBox* _tmp162_;
	AdwActionRow* _tmp163_;
	GtkBox* _tmp164_;
	GtkListBox* _tmp165_;
	GtkBox* _tmp166_;
	GtkSeparator* _tmp167_;
	GtkSeparator* _tmp168_;
	JsonObject* _tmp169_;
	JsonArray* _vala1_ids;
	JsonObject* _tmp170_;
	JsonArray* _tmp171_;
	JsonArray* _tmp172_;
	GtkBox* header_box;
	GtkBox* _tmp173_;
	gchar* _tmp174_;
	JsonArray* _tmp175_;
	gchar* _tmp176_;
	gchar* _tmp177_;
	GtkLabel* members_lbl;
	GtkLabel* _tmp178_;
	GtkLabel* _tmp179_;
	GtkLabel* _tmp180_;
	GtkLabel* _tmp181_;
	GtkBox* _tmp182_;
	GtkLabel* _tmp183_;
	GtkButton* add_member_btn;
	GtkButton* _tmp184_;
	GtkButton* _tmp185_;
	GtkBox* _tmp186_;
	GtkButton* _tmp187_;
	GtkBox* _tmp188_;
	GtkBox* _tmp189_;
	GtkListBox* _tmp190_;
	guint _vala2_i;
	gboolean _tmp191_;
	guint _tmp192_;
	JsonArray* _tmp193_;
	gint cid;
	JsonArray* _tmp194_;
	JsonObject* contact_obj;
	DcRpcClient* _tmp195_;
	DcRpcClient* _tmp196_;
	gint _tmp197_;
	gint _tmp198_;
	JsonObject* _tmp199_;
	DcContact* _tmp200_;
	JsonObject* _tmp201_;
	JsonObject* _tmp202_;
	DcContact* _tmp203_;
	DcContact* contact;
	DcContact* _tmp204_;
	DcContact* _tmp205_;
	gboolean _tmp206_;
	gboolean _tmp207_;
	DcContact* _tmp208_;
	gint _tmp209_;
	gint _tmp210_;
	DcContact* _tmp211_;
	DcContact* _tmp212_;
	DcContact* _tmp213_;
	AdwActionRow* row;
	DcContact* _tmp214_;
	AdwActionRow* _tmp215_;
	GtkListBox* _tmp216_;
	AdwActionRow* _tmp217_;
	GtkBox* _tmp218_;
	GtkListBox* _tmp219_;
	GtkBox* _tmp220_;
	GtkSeparator* _tmp221_;
	GtkSeparator* _tmp222_;
	GtkListBox* actions_list;
	GtkListBox* _tmp223_;
	const gchar* _tmp224_;
	AdwActionRow* duplicate_row;
	AdwActionRow* _tmp225_;
	AdwActionRow* _tmp226_;
	GtkListBox* _tmp227_;
	AdwActionRow* _tmp228_;
	AdwActionRow* clear_row;
	AdwActionRow* _tmp229_;
	AdwActionRow* _tmp230_;
	GtkListBox* _tmp231_;
	AdwActionRow* _tmp232_;
	AdwActionRow* clear_sent_row;
	AdwActionRow* _tmp233_;
	AdwActionRow* _tmp234_;
	GtkListBox* _tmp235_;
	AdwActionRow* _tmp236_;
	AdwActionRow* leave_row;
	AdwActionRow* _tmp237_;
	AdwActionRow* _tmp238_;
	GtkListBox* _tmp239_;
	AdwActionRow* _tmp240_;
	AdwActionRow* disband_row;
	AdwActionRow* _tmp241_;
	AdwActionRow* _tmp242_;
	GtkListBox* _tmp243_;
	AdwActionRow* _tmp244_;
	DcContact* _tmp245_;
	GtkListBox* _tmp246_;
	DcContact* _tmp247_;
	AdwActionRow* _tmp248_;
	AdwActionRow* _tmp249_;
	AdwActionRow* delete_row;
	AdwActionRow* _tmp250_;
	AdwActionRow* _tmp251_;
	GtkListBox* _tmp252_;
	AdwActionRow* _tmp253_;
	GtkBox* _tmp254_;
	GtkListBox* _tmp255_;
	GError* e;
	GtkLabel* err;
	GError* _tmp256_;
	const gchar* _tmp257_;
	gchar* _tmp258_;
	gchar* _tmp259_;
	GtkLabel* _tmp260_;
	GtkLabel* _tmp261_;
	GtkLabel* _tmp262_;
	GtkLabel* _tmp263_;
	GtkBox* _tmp264_;
	GtkLabel* _tmp265_;
	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 _Block52Data {
	int _ref_count_;
	DcChatInfoDialog* self;
	AdwActionRow* row;
};

struct _Block53Data {
	int _ref_count_;
	Block52Data * _data52_;
	gchar* addr;
};

struct _Block54Data {
	int _ref_count_;
	Block52Data * _data52_;
	gint cid;
};

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

struct _Block56Data {
	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 _Block57Data {
	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 _DcChatInfoDialogConfirmBlockContactData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DcChatInfoDialog* self;
	DcContact* contact;
	AdwActionRow* row;
	gchar* label;
	gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gboolean _tmp4_;
};

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 _DcChatInfoDialogConfirmClearHistoryData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DcChatInfoDialog* self;
	gboolean for_all;
	const gchar* _tmp0_;
	gchar* title;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* body;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* action_label;
	gchar* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
};

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 _DcChatInfoDialogShowDuplicateGroupDialogData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DcChatInfoDialog* self;
	gchar** addresses;
	gchar** _tmp0_;
	gint addresses_length1;
	gint _addresses_size_;
	JsonObject* chat;
	DcRpcClient* _tmp1_;
	DcRpcClient* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	JsonObject* _tmp5_;
	gboolean _tmp6_;
	JsonObject* _tmp7_;
	JsonObject* _tmp8_;
	JsonArray* ids;
	JsonObject* _tmp9_;
	JsonArray* _tmp10_;
	JsonArray* _tmp11_;
	guint i;
	gboolean _tmp12_;
	guint _tmp13_;
	JsonArray* _tmp14_;
	gint cid;
	JsonArray* _tmp15_;
	JsonObject* contact_obj;
	DcRpcClient* _tmp16_;
	DcRpcClient* _tmp17_;
	gint _tmp18_;
	gint _tmp19_;
	JsonObject* _tmp20_;
	DcContact* _tmp21_;
	JsonObject* _tmp22_;
	JsonObject* _tmp23_;
	DcContact* _tmp24_;
	DcContact* contact;
	DcContact* _tmp25_;
	gboolean _tmp26_;
	DcContact* _tmp27_;
	DcContact* _tmp28_;
	const gchar* _tmp29_;
	const gchar* _tmp30_;
	DcContact* _tmp31_;
	const gchar* _tmp32_;
	const gchar* _tmp33_;
	gchar* _tmp34_;
	GError* e;
	GError* _tmp35_;
	const gchar* _tmp36_;
	DcNewGroupDialog* dialog;
	DcRpcClient* _tmp37_;
	DcNewGroupDialog* _tmp38_;
	gchar** _tmp39_;
	gint _tmp39__length1;
	gchar** address_collection;
	gint address_collection_length1;
	gint _address_collection_size_;
	gint address_it;
	gchar* _tmp40_;
	gchar* address;
	DcNewGroupDialog* _tmp41_;
	const gchar* _tmp42_;
	DcNewGroupDialog* _tmp43_;
	DcNewGroupDialog* _tmp44_;
	GError* _inner_error0_;
};

struct _DcChatInfoDialogOnDuplicateCreatedData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DcChatInfoDialog* self;
	gint new_chat_id;
	DcWindow* _tmp0_;
	DcWindow* _tmp1_;
	const gchar* _tmp2_;
	DcWindow* _tmp3_;
};

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

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

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

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 _DcChatInfoDialogConfirmDeleteChatData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DcChatInfoDialog* self;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gboolean _tmp3_;
};

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,
                                            gboolean _error_);
static GtkButton* dc_chat_info_dialog_flat_icon_button (DcChatInfoDialog* self,
                                                 const gchar* icon_name,
                                                 const gchar* tooltip,
                                                 gboolean _error_);
static AdwActionRow* dc_chat_info_dialog_action_row (DcChatInfoDialog* self,
                                              const gchar* title,
                                              const gchar* subtitle,
                                              const gchar* icon_name);
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 __lambda252_ (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 ___lambda252__gtk_event_controller_key_key_pressed (GtkEventControllerKey* _sender,
                                                             guint keyval,
                                                             guint keycode,
                                                             GdkModifierType state,
                                                             gpointer self);
static void __lambda253_ (DcChatInfoDialog* self);
static void ___lambda253__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
static void __lambda254_ (DcChatInfoDialog* self);
VALA_EXTERN void dc_image_viewer_hide (DcImageViewer* self);
static void ___lambda254__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 Block50Data* block50_data_ref (Block50Data* _data50_);
static void block50_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 Block51Data* block51_data_ref (Block51Data* _data51_);
static void block51_data_unref (void * _userdata_);
static void ____lambda255_ (Block51Data* _data51_);
VALA_EXTERN void dc_image_viewer_show_list (DcImageViewer* self,
                                gchar** image_paths,
                                gint image_paths_length1,
                                gint start_index);
static void _____lambda255__gtk_button_clicked (GtkButton* _sender,
                                         gpointer self);
static void ____lambda256_ (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 _____lambda256__gtk_button_clicked (GtkButton* _sender,
                                         gpointer self);
static void ____lambda257_ (Block50Data* _data50_);
static void dc_chat_info_dialog_show_edit_contact_name_dialog (DcChatInfoDialog* self,
                                                        gint contact_id,
                                                        GtkLabel* name_lbl);
static void _____lambda257__gtk_button_clicked (GtkButton* _sender,
                                         gpointer self);
static void _____lambda262_ (Block50Data* _data50_);
static void dc_chat_info_dialog_show_edit_group_name_dialog (DcChatInfoDialog* self,
                                                      GtkLabel* name_lbl);
static void ______lambda262__gtk_button_clicked (GtkButton* _sender,
                                          gpointer self);
static void ____lambda265_ (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 _____lambda265__adw_action_row_activated (AdwActionRow* _sender,
                                               gpointer self);
VALA_EXTERN gint64 dc_json_int (JsonObject* obj,
                    const gchar* key,
                    gint64 fallback);
static void ___lambda266_ (Block50Data* _data50_);
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 ____lambda266__g_object_notify (GObject* _sender,
                                     GParamSpec* pspec,
                                     gpointer self);
static void ___lambda267_ (Block50Data* _data50_);
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 ____lambda267__g_object_notify (GObject* _sender,
                                     GParamSpec* pspec,
                                     gpointer self);
static void ___lambda268_ (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 ____lambda268__adw_action_row_activated (AdwActionRow* _sender,
                                              gpointer self);
static void _____lambda269_ (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 ______lambda269__gtk_button_clicked (GtkButton* _sender,
                                          gpointer self);
static void _vala_array_add40 (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 ____lambda271_ (DcChatInfoDialog* self);
static void dc_chat_info_dialog_show_duplicate_group_dialog (DcChatInfoDialog* self,
                                                      GAsyncReadyCallback _callback_,
                                                      gpointer _user_data_);
static void dc_chat_info_dialog_show_duplicate_group_dialog_finish (DcChatInfoDialog* self,
                                                             GAsyncResult* _res_);
static void _____lambda271__adw_action_row_activated (AdwActionRow* _sender,
                                               gpointer self);
static void ___lambda278_ (DcChatInfoDialog* self);
static void dc_chat_info_dialog_confirm_clear_history (DcChatInfoDialog* self,
                                                gboolean for_all,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_);
static void dc_chat_info_dialog_confirm_clear_history_finish (DcChatInfoDialog* self,
                                                       GAsyncResult* _res_);
static void ____lambda278__adw_action_row_activated (AdwActionRow* _sender,
                                              gpointer self);
static void ___lambda279_ (DcChatInfoDialog* self);
static void ____lambda279__adw_action_row_activated (AdwActionRow* _sender,
                                              gpointer self);
static void ____lambda280_ (DcChatInfoDialog* self);
static void dc_chat_info_dialog_confirm_leave_group (DcChatInfoDialog* self,
                                              GAsyncReadyCallback _callback_,
                                              gpointer _user_data_);
static void dc_chat_info_dialog_confirm_leave_group_finish (DcChatInfoDialog* self,
                                                     GAsyncResult* _res_);
static void _____lambda280__adw_action_row_activated (AdwActionRow* _sender,
                                               gpointer self);
static void ____lambda281_ (DcChatInfoDialog* self);
static void dc_chat_info_dialog_confirm_disband_group (DcChatInfoDialog* self,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_);
static void dc_chat_info_dialog_confirm_disband_group_finish (DcChatInfoDialog* self,
                                                       GAsyncResult* _res_);
static void _____lambda281__adw_action_row_activated (AdwActionRow* _sender,
                                               gpointer self);
static AdwActionRow* dc_chat_info_dialog_build_contact_block_row (DcChatInfoDialog* self,
                                                           DcContact* contact);
static void ___lambda283_ (DcChatInfoDialog* self);
static void dc_chat_info_dialog_confirm_delete_chat (DcChatInfoDialog* self,
                                              GAsyncReadyCallback _callback_,
                                              gpointer _user_data_);
static void dc_chat_info_dialog_confirm_delete_chat_finish (DcChatInfoDialog* self,
                                                     GAsyncResult* _res_);
static void ____lambda283__adw_action_row_activated (AdwActionRow* _sender,
                                              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 Block52Data* block52_data_ref (Block52Data* _data52_);
static void block52_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 Block53Data* block53_data_ref (Block53Data* _data53_);
static void block53_data_unref (void * _userdata_);
static void ___lambda260_ (Block53Data* _data53_);
static void ____lambda260__gtk_button_clicked (GtkButton* _sender,
                                        gpointer self);
static Block54Data* block54_data_ref (Block54Data* _data54_);
static void block54_data_unref (void * _userdata_);
static void ___lambda261_ (Block54Data* _data54_);
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 ____lambda261__gtk_button_clicked (GtkButton* _sender,
                                        gpointer self);
static Block55Data* block55_data_ref (Block55Data* _data55_);
static void block55_data_unref (void * _userdata_);
static void dc_chat_info_dialog_update_contact_block_row (DcChatInfoDialog* self,
                                                   AdwActionRow* row,
                                                   DcContact* contact);
static void __lambda282_ (Block55Data* _data55_);
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,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_);
static void dc_chat_info_dialog_confirm_block_contact_finish (DcChatInfoDialog* self,
                                                       GAsyncResult* _res_);
static void ___lambda282__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 Block56Data* block56_data_ref (Block56Data* _data56_);
static void block56_data_unref (void * _userdata_);
static void __lambda258_ (Block56Data* _data56_);
static void ___lambda258__gtk_entry_activate (GtkEntry* _sender,
                                       gpointer self);
static void __lambda259_ (Block56Data* _data56_,
                   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 ___lambda259__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 Block57Data* block57_data_ref (Block57Data* _data57_);
static void block57_data_unref (void * _userdata_);
static void __lambda263_ (Block57Data* _data57_);
static void ___lambda263__gtk_entry_activate (GtkEntry* _sender,
                                       gpointer self);
static void __lambda264_ (Block57Data* _data57_,
                   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 ___lambda264__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 __lambda270_ (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 ___lambda270__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 void dc_chat_info_dialog_confirm_block_contact_data_free (gpointer _data);
static gboolean dc_chat_info_dialog_confirm_block_contact_co (DcChatInfoDialogConfirmBlockContactData* _data_);
VALA_EXTERN void dc_confirm_action (GtkWidget* parent,
                        const gchar* title,
                        const gchar* body,
                        const gchar* action_id,
                        const gchar* action_label,
                        GAsyncReadyCallback _callback_,
                        gpointer _user_data_);
VALA_EXTERN gboolean dc_confirm_action_finish (GAsyncResult* _res_);
static void dc_chat_info_dialog_confirm_block_contact_ready (GObject* source_object,
                                                      GAsyncResult* _res_,
                                                      gpointer _user_data_);
static void dc_chat_info_dialog_set_contact_blocked_data_free (gpointer _data);
static gboolean dc_chat_info_dialog_set_contact_blocked_co (DcChatInfoDialogSetContactBlockedData* _data_);
VALA_EXTERN void dc_rpc_client_block_contact (DcRpcClient* self,
                                  gint contact_id,
                                  GAsyncReadyCallback _callback_,
                                  gpointer _user_data_);
VALA_EXTERN void dc_rpc_client_block_contact_finish (DcRpcClient* self,
                                         GAsyncResult* _res_,
                                         GError** error);
static void dc_chat_info_dialog_set_contact_blocked_ready (GObject* source_object,
                                                    GAsyncResult* _res_,
                                                    gpointer _user_data_);
VALA_EXTERN void dc_rpc_client_unblock_contact (DcRpcClient* self,
                                    gint contact_id,
                                    GAsyncReadyCallback _callback_,
                                    gpointer _user_data_);
VALA_EXTERN void dc_rpc_client_unblock_contact_finish (DcRpcClient* self,
                                           GAsyncResult* _res_,
                                           GError** error);
VALA_EXTERN void dc_contact_set_is_blocked (DcContact* self,
                                gboolean value);
static void dc_chat_info_dialog_confirm_clear_history_data_free (gpointer _data);
static gboolean dc_chat_info_dialog_confirm_clear_history_co (DcChatInfoDialogConfirmClearHistoryData* _data_);
static void dc_chat_info_dialog_confirm_clear_history_ready (GObject* source_object,
                                                      GAsyncResult* _res_,
                                                      gpointer _user_data_);
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 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 dc_chat_info_dialog_show_duplicate_group_dialog_data_free (gpointer _data);
static gboolean dc_chat_info_dialog_show_duplicate_group_dialog_co (DcChatInfoDialogShowDuplicateGroupDialogData* _data_);
static void dc_chat_info_dialog_show_duplicate_group_dialog_ready (GObject* source_object,
                                                            GAsyncResult* _res_,
                                                            gpointer _user_data_);
static void _vala_array_add41 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
VALA_EXTERN GType dc_new_group_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DcNewGroupDialog, g_object_unref)
VALA_EXTERN DcNewGroupDialog* dc_new_group_dialog_new (DcRpcClient* rpc,
                                           gboolean is_channel);
VALA_EXTERN DcNewGroupDialog* dc_new_group_dialog_construct (GType object_type,
                                                 DcRpcClient* rpc,
                                                 gboolean is_channel);
VALA_EXTERN void dc_new_group_dialog_add_member_email (DcNewGroupDialog* self,
                                           const gchar* email);
static void __lambda277_ (DcChatInfoDialog* self,
                   gint new_chat_id);
static void dc_chat_info_dialog_on_duplicate_created (DcChatInfoDialog* self,
                                               gint new_chat_id,
                                               GAsyncReadyCallback _callback_,
                                               gpointer _user_data_);
static void dc_chat_info_dialog_on_duplicate_created_finish (DcChatInfoDialog* self,
                                                      GAsyncResult* _res_);
static void ___lambda277__dc_new_group_dialog_group_created (DcNewGroupDialog* _sender,
                                                      gint chat_id,
                                                      gpointer self);
static void dc_chat_info_dialog_on_duplicate_created_data_free (gpointer _data);
static gboolean dc_chat_info_dialog_on_duplicate_created_co (DcChatInfoDialogOnDuplicateCreatedData* _data_);
VALA_EXTERN void dc_window_load_chats (DcWindow* self,
                           GAsyncReadyCallback _callback_,
                           gpointer _user_data_);
VALA_EXTERN void dc_window_load_chats_finish (DcWindow* self,
                                  GAsyncResult* _res_);
static void dc_chat_info_dialog_on_duplicate_created_ready (GObject* source_object,
                                                     GAsyncResult* _res_,
                                                     gpointer _user_data_);
VALA_EXTERN gboolean dc_window_select_chat_by_id (DcWindow* self,
                                      gint chat_id);
VALA_EXTERN void dc_window_show_toast (DcWindow* self,
                           const gchar* message);
static void dc_chat_info_dialog_confirm_leave_group_data_free (gpointer _data);
static gboolean dc_chat_info_dialog_confirm_leave_group_co (DcChatInfoDialogConfirmLeaveGroupData* _data_);
static void dc_chat_info_dialog_confirm_leave_group_ready (GObject* source_object,
                                                    GAsyncResult* _res_,
                                                    gpointer _user_data_);
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 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_);
VALA_EXTERN void dc_rpc_client_delete_chat (DcRpcClient* self,
                                gint chat_id,
                                GAsyncReadyCallback _callback_,
                                gpointer _user_data_);
VALA_EXTERN void dc_rpc_client_delete_chat_finish (DcRpcClient* self,
                                       GAsyncResult* _res_,
                                       GError** error);
static void dc_chat_info_dialog_confirm_disband_group_data_free (gpointer _data);
static gboolean dc_chat_info_dialog_confirm_disband_group_co (DcChatInfoDialogConfirmDisbandGroupData* _data_);
static void dc_chat_info_dialog_confirm_disband_group_ready (GObject* source_object,
                                                      GAsyncResult* _res_,
                                                      gpointer _user_data_);
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 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_);
static void dc_chat_info_dialog_confirm_delete_chat_data_free (gpointer _data);
static gboolean dc_chat_info_dialog_confirm_delete_chat_co (DcChatInfoDialogConfirmDeleteChatData* _data_);
static void dc_chat_info_dialog_confirm_delete_chat_ready (GObject* source_object,
                                                    GAsyncResult* _res_,
                                                    gpointer _user_data_);
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 dc_chat_info_dialog_do_delete_chat_from_dialog_data_free (gpointer _data);
static gboolean dc_chat_info_dialog_do_delete_chat_from_dialog_co (DcChatInfoDialogDoDeleteChatFromDialogData* _data_);
static void dc_chat_info_dialog_do_delete_chat_from_dialog_ready (GObject* source_object,
                                                           GAsyncResult* _res_,
                                                           gpointer _user_data_);
static void dc_chat_info_dialog_pick_avatar_data_free (gpointer _data);
static gboolean dc_chat_info_dialog_pick_avatar_co (DcChatInfoDialogPickAvatarData* _data_);
VALA_EXTERN void dc_pick_image_file (GtkWindow* parent,
                         const gchar* title,
                         GAsyncReadyCallback _callback_,
                         gpointer _user_data_);
VALA_EXTERN gchar* dc_pick_image_file_finish (GAsyncResult* _res_);
static void dc_chat_info_dialog_pick_avatar_ready (GObject* source_object,
                                            GAsyncResult* _res_,
                                            gpointer _user_data_);
VALA_EXTERN void dc_rpc_client_set_chat_profile_image (DcRpcClient* self,
                                           gint chat_id,
                                           const gchar* image_path,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_);
VALA_EXTERN void dc_rpc_client_set_chat_profile_image_finish (DcRpcClient* self,
                                                  GAsyncResult* _res_,
                                                  GError** error);
static void dc_chat_info_dialog_finalize (GObject * obj);
static GType dc_chat_info_dialog_get_type_once (void);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

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 GtkButton*
dc_chat_info_dialog_flat_button (DcChatInfoDialog* self,
                                 const gchar* label,
                                 gboolean _error_)
{
	GtkButton* button = NULL;
	GtkButton* _tmp0_;
	GtkButton* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (label != NULL, NULL);
	_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_);
	result = button;
	return result;
}

static GtkButton*
dc_chat_info_dialog_flat_icon_button (DcChatInfoDialog* self,
                                      const gchar* icon_name,
                                      const gchar* tooltip,
                                      gboolean _error_)
{
	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);
	_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);
	result = button;
	return result;
}

static AdwActionRow*
dc_chat_info_dialog_action_row (DcChatInfoDialog* self,
                                const gchar* title,
                                const gchar* subtitle,
                                const gchar* icon_name)
{
	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);
	_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);
	result = row;
	return result;
}

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

static gboolean
__lambda252_ (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
___lambda252__gtk_event_controller_key_key_pressed (GtkEventControllerKey* _sender,
                                                    guint keyval,
                                                    guint keycode,
                                                    GdkModifierType state,
                                                    gpointer self)
{
	gboolean result;
	result = __lambda252_ ((DcChatInfoDialog*) self, keyval, keycode, state);
	return result;
}

static void
__lambda253_ (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
___lambda253__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	__lambda253_ ((DcChatInfoDialog*) self);
}

static void
__lambda254_ (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
___lambda254__adw_dialog_close_attempt (AdwDialog* _sender,
                                        gpointer self)
{
	__lambda254_ ((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) ___lambda252__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) ___lambda253__g_object_notify, self, 0);
	g_signal_connect_object ((AdwDialog*) self, "close-attempt", (GCallback) ___lambda254__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 Block50Data*
block50_data_ref (Block50Data* _data50_)
{
	g_atomic_int_inc (&_data50_->_ref_count_);
	return _data50_;
}

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

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 Block51Data*
block51_data_ref (Block51Data* _data51_)
{
	g_atomic_int_inc (&_data51_->_ref_count_);
	return _data51_;
}

static void
block51_data_unref (void * _userdata_)
{
	Block51Data* _data51_;
	_data51_ = (Block51Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data51_->_ref_count_)) {
		DcChatInfoDialog* self;
		self = _data51_->_data50_->self;
		_g_free0 (_data51_->img);
		block50_data_unref (_data51_->_data50_);
		_data51_->_data50_ = NULL;
		g_slice_free (Block51Data, _data51_);
	}
}

static void
____lambda255_ (Block51Data* _data51_)
{
	Block50Data* _data50_;
	DcChatInfoDialog* self;
	DcImageViewer* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar** _tmp3_;
	gchar** _tmp4_;
	gint _tmp4__length1;
	_data50_ = _data51_->_data50_;
	self = _data50_->self;
	_tmp0_ = self->priv->viewer;
	_tmp1_ = _data51_->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
_____lambda255__gtk_button_clicked (GtkButton* _sender,
                                    gpointer self)
{
	____lambda255_ (self);
}

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

static void
_____lambda256__gtk_button_clicked (GtkButton* _sender,
                                    gpointer self)
{
	____lambda256_ ((DcChatInfoDialog*) self);
}

static void
____lambda257_ (Block50Data* _data50_)
{
	DcChatInfoDialog* self;
	GtkLabel* _tmp0_;
	self = _data50_->self;
	_tmp0_ = _data50_->name_lbl;
	dc_chat_info_dialog_show_edit_contact_name_dialog (self, _data50_->dm_contact_id, _tmp0_);
}

static void
_____lambda257__gtk_button_clicked (GtkButton* _sender,
                                    gpointer self)
{
	____lambda257_ (self);
}

static void
_____lambda262_ (Block50Data* _data50_)
{
	DcChatInfoDialog* self;
	GtkLabel* _tmp0_;
	self = _data50_->self;
	_tmp0_ = _data50_->name_lbl;
	dc_chat_info_dialog_show_edit_group_name_dialog (self, _tmp0_);
}

static void
______lambda262__gtk_button_clicked (GtkButton* _sender,
                                     gpointer self)
{
	_____lambda262_ (self);
}

static void
____lambda265_ (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
_____lambda265__adw_action_row_activated (AdwActionRow* _sender,
                                          gpointer self)
{
	____lambda265_ ((DcChatInfoDialog*) self);
}

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

static void
____lambda266__g_object_notify (GObject* _sender,
                                GParamSpec* pspec,
                                gpointer self)
{
	___lambda266_ (self);
}

static void
___lambda267_ (Block50Data* _data50_)
{
	DcChatInfoDialog* self;
	guint idx = 0U;
	GtkDropDown* _tmp0_;
	guint _tmp1_;
	guint _tmp2_;
	gchar** _tmp3_;
	gint _tmp3__length1;
	self = _data50_->self;
	_tmp0_ = _data50_->mute_combo;
	_tmp1_ = gtk_drop_down_get_selected (_tmp0_);
	_tmp2_ = _tmp1_;
	idx = _tmp2_;
	_tmp3_ = _data50_->mute_labels;
	_tmp3__length1 = _data50_->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
____lambda267__g_object_notify (GObject* _sender,
                                GParamSpec* pspec,
                                gpointer self)
{
	___lambda267_ (self);
}

static void
___lambda268_ (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
____lambda268__adw_action_row_activated (AdwActionRow* _sender,
                                         gpointer self)
{
	___lambda268_ ((DcChatInfoDialog*) self);
}

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

static void
______lambda269__gtk_button_clicked (GtkButton* _sender,
                                     gpointer self)
{
	_____lambda269_ ((DcChatInfoDialog*) self);
}

static void
_vala_array_add40 (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
____lambda271_ (DcChatInfoDialog* self)
{
	dc_chat_info_dialog_show_duplicate_group_dialog (self, NULL, NULL);
}

static void
_____lambda271__adw_action_row_activated (AdwActionRow* _sender,
                                          gpointer self)
{
	____lambda271_ ((DcChatInfoDialog*) self);
}

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

static void
____lambda278__adw_action_row_activated (AdwActionRow* _sender,
                                         gpointer self)
{
	___lambda278_ ((DcChatInfoDialog*) self);
}

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

static void
____lambda279__adw_action_row_activated (AdwActionRow* _sender,
                                         gpointer self)
{
	___lambda279_ ((DcChatInfoDialog*) self);
}

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

static void
_____lambda280__adw_action_row_activated (AdwActionRow* _sender,
                                          gpointer self)
{
	____lambda280_ ((DcChatInfoDialog*) self);
}

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

static void
_____lambda281__adw_action_row_activated (AdwActionRow* _sender,
                                          gpointer self)
{
	____lambda281_ ((DcChatInfoDialog*) self);
}

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

static void
____lambda283__adw_action_row_activated (AdwActionRow* _sender,
                                         gpointer self)
{
	___lambda283_ ((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_->_data50_ = g_slice_new0 (Block50Data);
		_data_->_data50_->_ref_count_ = 1;
		_data_->_data50_->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)) {
			block50_data_unref (_data_->_data50_);
			_data_->_data50_ = NULL;
			goto __catch0_g_error;
		}
		_data_->_tmp5_ = _data_->chat;
		if (_data_->_tmp5_ == NULL) {
			_json_object_unref0 (_data_->chat);
			block50_data_unref (_data_->_data50_);
			_data_->_data50_ = 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_->chat_type;
		_data_->self->priv->is_channel = g_strcmp0 (_data_->_tmp27_, "Broadcast") == 0;
		_data_->_tmp28_ = _data_->name;
		_data_->_tmp29_ = g_strdup (_data_->_tmp28_);
		_g_free0 (_data_->self->priv->chat_name);
		_data_->self->priv->chat_name = _data_->_tmp29_;
		_g_object_unref0 (_data_->self->priv->dm_contact);
		_data_->self->priv->dm_contact = NULL;
		_data_->_data50_->dm_contact_id = 0;
		if (_data_->is_dm_chat) {
			_data_->_tmp31_ = _data_->chat;
			_data_->_tmp30_ = json_object_has_member (_data_->_tmp31_, "contactIds");
		} else {
			_data_->_tmp30_ = FALSE;
		}
		if (_data_->_tmp30_) {
			_data_->_tmp32_ = _data_->chat;
			_data_->_tmp33_ = json_object_get_array_member (_data_->_tmp32_, "contactIds");
			_data_->_tmp34_ = _json_array_ref0 (_data_->_tmp33_);
			_data_->ids = _data_->_tmp34_;
			_data_->_tmp35_ = _data_->ids;
			if (json_array_get_length (_data_->_tmp35_) > ((guint) 0)) {
				_data_->_tmp36_ = _data_->ids;
				_data_->_data50_->dm_contact_id = (gint) json_array_get_int_element (_data_->_tmp36_, (guint) 0);
			}
			_json_array_unref0 (_data_->ids);
		}
		_data_->_tmp37_ = _data_->name;
		_data_->_tmp38_ = (AdwAvatar*) adw_avatar_new (80, _data_->_tmp37_, TRUE);
		g_object_ref_sink (_data_->_tmp38_);
		_data_->avatar = _data_->_tmp38_;
		_data_->_tmp39_ = _data_->avatar;
		_data_->_tmp40_ = _data_->profile_image;
		_data_->_tmp41_ = dc_load_avatar (_data_->_tmp40_);
		_data_->_tmp42_ = _data_->_tmp41_;
		adw_avatar_set_custom_image (_data_->_tmp39_, (GdkPaintable*) _data_->_tmp42_);
		_g_object_unref0 (_data_->_tmp42_);
		_data_->_tmp44_ = _data_->profile_image;
		if (_data_->_tmp44_ != NULL) {
			_data_->_tmp45_ = _data_->profile_image;
			_data_->_tmp46_ = strlen (_data_->_tmp45_);
			_data_->_tmp47_ = _data_->_tmp46_;
			_data_->_tmp43_ = _data_->_tmp47_ > 0;
		} else {
			_data_->_tmp43_ = FALSE;
		}
		if (_data_->_tmp43_) {
			_data_->_data51_ = g_slice_new0 (Block51Data);
			_data_->_data51_->_ref_count_ = 1;
			_data_->_data51_->_data50_ = block50_data_ref (_data_->_data50_);
			_data_->_tmp48_ = _data_->profile_image;
			_data_->_tmp49_ = g_strdup (_data_->_tmp48_);
			_data_->_data51_->img = _data_->_tmp49_;
			_data_->_tmp50_ = (GtkButton*) gtk_button_new ();
			g_object_ref_sink (_data_->_tmp50_);
			_data_->avatar_btn = _data_->_tmp50_;
			_data_->_tmp51_ = _data_->avatar_btn;
			_data_->_tmp52_ = _data_->avatar;
			gtk_button_set_child (_data_->_tmp51_, (GtkWidget*) _data_->_tmp52_);
			_data_->_tmp53_ = _data_->avatar_btn;
			gtk_widget_add_css_class ((GtkWidget*) _data_->_tmp53_, "flat");
			_data_->_tmp54_ = _data_->avatar_btn;
			gtk_widget_add_css_class ((GtkWidget*) _data_->_tmp54_, "circular");
			_data_->_tmp55_ = _data_->avatar_btn;
			gtk_widget_set_halign ((GtkWidget*) _data_->_tmp55_, GTK_ALIGN_CENTER);
			_data_->_tmp56_ = _data_->avatar_btn;
			gtk_widget_set_tooltip_text ((GtkWidget*) _data_->_tmp56_, "View image");
			_data_->_tmp57_ = _data_->avatar_btn;
			g_signal_connect_data (_data_->_tmp57_, "clicked", (GCallback) _____lambda255__gtk_button_clicked, block51_data_ref (_data_->_data51_), (GClosureNotify) block51_data_unref, 0);
			_data_->_tmp58_ = _data_->self->priv->content;
			_data_->_tmp59_ = _data_->avatar_btn;
			gtk_box_append (_data_->_tmp58_, (GtkWidget*) _data_->_tmp59_);
			_g_object_unref0 (_data_->avatar_btn);
			block51_data_unref (_data_->_data51_);
			_data_->_data51_ = NULL;
		} else {
			_data_->_tmp60_ = _data_->avatar;
			gtk_widget_set_halign ((GtkWidget*) _data_->_tmp60_, GTK_ALIGN_CENTER);
			_data_->_tmp61_ = _data_->self->priv->content;
			_data_->_tmp62_ = _data_->avatar;
			gtk_box_append (_data_->_tmp61_, (GtkWidget*) _data_->_tmp62_);
		}
		if (_data_->self->priv->is_group) {
			_data_->_tmp63_ = dc_chat_info_dialog_flat_button (_data_->self, "Change Avatar", FALSE);
			_data_->change_avatar_btn = _data_->_tmp63_;
			_data_->_tmp64_ = _data_->change_avatar_btn;
			g_signal_connect_object (_data_->_tmp64_, "clicked", (GCallback) _____lambda256__gtk_button_clicked, _data_->self, 0);
			_data_->_tmp65_ = _data_->change_avatar_btn;
			gtk_widget_set_halign ((GtkWidget*) _data_->_tmp65_, GTK_ALIGN_CENTER);
			_data_->_tmp66_ = _data_->self->priv->content;
			_data_->_tmp67_ = _data_->change_avatar_btn;
			gtk_box_append (_data_->_tmp66_, (GtkWidget*) _data_->_tmp67_);
			_g_object_unref0 (_data_->change_avatar_btn);
		}
		_data_->_tmp68_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
		g_object_ref_sink (_data_->_tmp68_);
		_data_->name_box = _data_->_tmp68_;
		_data_->_tmp69_ = _data_->name_box;
		gtk_widget_set_halign ((GtkWidget*) _data_->_tmp69_, GTK_ALIGN_CENTER);
		_data_->_tmp70_ = _data_->name;
		_data_->_tmp71_ = (GtkLabel*) gtk_label_new (_data_->_tmp70_);
		g_object_ref_sink (_data_->_tmp71_);
		_data_->_data50_->name_lbl = _data_->_tmp71_;
		_data_->_tmp72_ = _data_->_data50_->name_lbl;
		gtk_widget_add_css_class ((GtkWidget*) _data_->_tmp72_, "title-1");
		_data_->_tmp73_ = _data_->_data50_->name_lbl;
		gtk_label_set_ellipsize (_data_->_tmp73_, PANGO_ELLIPSIZE_END);
		_data_->_tmp74_ = _data_->_data50_->name_lbl;
		gtk_label_set_max_width_chars (_data_->_tmp74_, 24);
		_data_->_tmp75_ = _data_->name_box;
		_data_->_tmp76_ = _data_->_data50_->name_lbl;
		gtk_box_append (_data_->_tmp75_, (GtkWidget*) _data_->_tmp76_);
		if (_data_->is_dm_chat) {
			_data_->_tmp77_ = _data_->_data50_->dm_contact_id > 1;
		} else {
			_data_->_tmp77_ = FALSE;
		}
		if (_data_->_tmp77_) {
			_data_->_tmp78_ = dc_chat_info_dialog_flat_icon_button (_data_->self, "document-edit-symbolic", "Edit contact name", FALSE);
			_data_->edit_contact_btn = _data_->_tmp78_;
			_data_->_tmp79_ = _data_->edit_contact_btn;
			g_signal_connect_data (_data_->_tmp79_, "clicked", (GCallback) _____lambda257__gtk_button_clicked, block50_data_ref (_data_->_data50_), (GClosureNotify) block50_data_unref, 0);
			_data_->_tmp80_ = _data_->name_box;
			_data_->_tmp81_ = _data_->edit_contact_btn;
			gtk_box_append (_data_->_tmp80_, (GtkWidget*) _data_->_tmp81_);
			_g_object_unref0 (_data_->edit_contact_btn);
		} else {
			if (_data_->self->priv->is_group) {
				_data_->_tmp82_ = dc_chat_info_dialog_flat_icon_button (_data_->self, "document-edit-symbolic", "Edit group name", FALSE);
				_data_->edit_group_btn = _data_->_tmp82_;
				_data_->_tmp83_ = _data_->edit_group_btn;
				g_signal_connect_data (_data_->_tmp83_, "clicked", (GCallback) ______lambda262__gtk_button_clicked, block50_data_ref (_data_->_data50_), (GClosureNotify) block50_data_unref, 0);
				_data_->_tmp84_ = _data_->name_box;
				_data_->_tmp85_ = _data_->edit_group_btn;
				gtk_box_append (_data_->_tmp84_, (GtkWidget*) _data_->_tmp85_);
				_g_object_unref0 (_data_->edit_group_btn);
			}
		}
		_data_->_tmp86_ = _data_->self->priv->content;
		_data_->_tmp87_ = _data_->name_box;
		gtk_box_append (_data_->_tmp86_, (GtkWidget*) _data_->_tmp87_);
		_data_->_tmp88_ = _data_->chat_type;
		_data_->_tmp89_ = g_strdup (_data_->_tmp88_);
		_data_->type_str = _data_->_tmp89_;
		if (_data_->encrypted) {
			_data_->_tmp90_ = _data_->type_str;
			_data_->_tmp91_ = g_strconcat (_data_->_tmp90_, " (encrypted)", NULL);
			_g_free0 (_data_->type_str);
			_data_->type_str = _data_->_tmp91_;
		}
		_data_->_tmp92_ = _data_->type_str;
		_data_->_tmp93_ = (GtkLabel*) gtk_label_new (_data_->_tmp92_);
		g_object_ref_sink (_data_->_tmp93_);
		_data_->type_lbl = _data_->_tmp93_;
		_data_->_tmp94_ = _data_->type_lbl;
		gtk_widget_add_css_class ((GtkWidget*) _data_->_tmp94_, "dim-label");
		_data_->_tmp95_ = _data_->type_lbl;
		gtk_widget_set_halign ((GtkWidget*) _data_->_tmp95_, GTK_ALIGN_CENTER);
		_data_->_tmp96_ = _data_->self->priv->content;
		_data_->_tmp97_ = _data_->type_lbl;
		gtk_box_append (_data_->_tmp96_, (GtkWidget*) _data_->_tmp97_);
		if (_data_->self->priv->is_group) {
			_data_->_tmp98_ = dc_chat_info_dialog_boxed_list (_data_->self);
			_data_->invite_list = _data_->_tmp98_;
			_data_->_tmp99_ = dc_chat_info_dialog_action_row (_data_->self, "Invite Link", "Share a link or QR code for others to join", "mail-forward-symbolic");
			_data_->invite_row = _data_->_tmp99_;
			_data_->_tmp100_ = _data_->invite_row;
			g_signal_connect_object (_data_->_tmp100_, "activated", (GCallback) _____lambda265__adw_action_row_activated, _data_->self, 0);
			_data_->_tmp101_ = _data_->invite_list;
			_data_->_tmp102_ = _data_->invite_row;
			gtk_list_box_append (_data_->_tmp101_, (GtkWidget*) _data_->_tmp102_);
			_data_->_tmp103_ = _data_->self->priv->content;
			_data_->_tmp104_ = _data_->invite_list;
			gtk_box_append (_data_->_tmp103_, (GtkWidget*) _data_->_tmp104_);
			_g_object_unref0 (_data_->invite_row);
			_g_object_unref0 (_data_->invite_list);
		}
		_data_->_tmp105_ = _data_->chat;
		_data_->ephemeral_timer = (gint) dc_json_int (_data_->_tmp105_, "ephemeralTimer", (gint64) 0);
		_data_->_tmp106_ = (AdwActionRow*) adw_action_row_new ();
		g_object_ref_sink (_data_->_tmp106_);
		_data_->ephem_row = _data_->_tmp106_;
		_data_->_tmp107_ = _data_->ephem_row;
		adw_preferences_row_set_title ((AdwPreferencesRow*) _data_->_tmp107_, "Disappearing messages");
		_data_->_tmp108_ = g_new0 (gint, 9);
		_data_->_tmp108_[0] = 0;
		_data_->_tmp108_[1] = 60;
		_data_->_tmp108_[2] = 300;
		_data_->_tmp108_[3] = 1800;
		_data_->_tmp108_[4] = 3600;
		_data_->_tmp108_[5] = 21600;
		_data_->_tmp108_[6] = 86400;
		_data_->_tmp108_[7] = 604800;
		_data_->_tmp108_[8] = 2419200;
		_data_->_data50_->timer_values = _data_->_tmp108_;
		_data_->_data50_->timer_values_length1 = 9;
		_data_->_data50_->_timer_values_size_ = _data_->_data50_->timer_values_length1;
		_data_->_tmp109_ = g_strdup ("Off");
		_data_->_tmp110_ = g_strdup ("1 minute");
		_data_->_tmp111_ = g_strdup ("5 minutes");
		_data_->_tmp112_ = g_strdup ("30 minutes");
		_data_->_tmp113_ = g_strdup ("1 hour");
		_data_->_tmp114_ = g_strdup ("6 hours");
		_data_->_tmp115_ = g_strdup ("1 day");
		_data_->_tmp116_ = g_strdup ("1 week");
		_data_->_tmp117_ = g_strdup ("4 weeks");
		_data_->_tmp118_ = g_new0 (gchar*, 9 + 1);
		_data_->_tmp118_[0] = _data_->_tmp109_;
		_data_->_tmp118_[1] = _data_->_tmp110_;
		_data_->_tmp118_[2] = _data_->_tmp111_;
		_data_->_tmp118_[3] = _data_->_tmp112_;
		_data_->_tmp118_[4] = _data_->_tmp113_;
		_data_->_tmp118_[5] = _data_->_tmp114_;
		_data_->_tmp118_[6] = _data_->_tmp115_;
		_data_->_tmp118_[7] = _data_->_tmp116_;
		_data_->_tmp118_[8] = _data_->_tmp117_;
		_data_->timer_labels = _data_->_tmp118_;
		_data_->timer_labels_length1 = 9;
		_data_->_timer_labels_size_ = _data_->timer_labels_length1;
		_data_->active_idx = 0;
		{
			_data_->i = 0;
			{
				_data_->_tmp119_ = TRUE;
				while (TRUE) {
					if (!_data_->_tmp119_) {
						_data_->_tmp120_ = _data_->i;
						_data_->i = _data_->_tmp120_ + 1;
					}
					_data_->_tmp119_ = FALSE;
					_data_->_tmp121_ = _data_->_data50_->timer_values;
					_data_->_tmp121__length1 = _data_->_data50_->timer_values_length1;
					if (!(_data_->i < _data_->_tmp121__length1)) {
						break;
					}
					_data_->_tmp122_ = _data_->_data50_->timer_values;
					_data_->_tmp122__length1 = _data_->_data50_->timer_values_length1;
					_data_->_tmp123_ = _data_->_tmp122_[_data_->i];
					if (_data_->_tmp123_ == _data_->ephemeral_timer) {
						_data_->active_idx = _data_->i;
					}
				}
			}
		}
		_data_->_tmp124_ = _data_->timer_labels;
		_data_->_tmp124__length1 = _data_->timer_labels_length1;
		_data_->_tmp125_ = (GtkDropDown*) gtk_drop_down_new_from_strings (_data_->_tmp124_);
		g_object_ref_sink (_data_->_tmp125_);
		_data_->_data50_->combo = _data_->_tmp125_;
		_data_->_tmp126_ = _data_->_data50_->combo;
		gtk_drop_down_set_selected (_data_->_tmp126_, (guint) _data_->active_idx);
		_data_->_tmp127_ = _data_->_data50_->combo;
		gtk_widget_set_valign ((GtkWidget*) _data_->_tmp127_, GTK_ALIGN_CENTER);
		_data_->_tmp128_ = _data_->_data50_->combo;
		g_signal_connect_data ((GObject*) _data_->_tmp128_, "notify::selected", (GCallback) ____lambda266__g_object_notify, block50_data_ref (_data_->_data50_), (GClosureNotify) block50_data_unref, 0);
		_data_->_tmp129_ = _data_->ephem_row;
		_data_->_tmp130_ = _data_->_data50_->combo;
		adw_action_row_add_suffix (_data_->_tmp129_, (GtkWidget*) _data_->_tmp130_);
		_data_->_tmp131_ = _data_->ephem_row;
		_data_->_tmp132_ = _data_->_data50_->combo;
		adw_action_row_set_activatable_widget (_data_->_tmp131_, (GtkWidget*) _data_->_tmp132_);
		_data_->_tmp133_ = _data_->chat;
		_data_->is_muted = dc_json_bool (_data_->_tmp133_, "isMuted");
		_data_->_tmp134_ = (AdwActionRow*) adw_action_row_new ();
		g_object_ref_sink (_data_->_tmp134_);
		_data_->mute_row = _data_->_tmp134_;
		_data_->_tmp135_ = _data_->mute_row;
		adw_preferences_row_set_title ((AdwPreferencesRow*) _data_->_tmp135_, "Mute notifications");
		_data_->_tmp136_ = g_new0 (gchar*, (G_N_ELEMENTS (DC_MUTE_DURATION_LABELS) + 1) + 1);
		_data_->_data50_->mute_labels = _data_->_tmp136_;
		_data_->_data50_->mute_labels_length1 = G_N_ELEMENTS (DC_MUTE_DURATION_LABELS) + 1;
		_data_->_data50_->_mute_labels_size_ = _data_->_data50_->mute_labels_length1;
		_data_->_tmp137_ = _data_->_data50_->mute_labels;
		_data_->_tmp137__length1 = _data_->_data50_->mute_labels_length1;
		_data_->_tmp138_ = g_strdup ("Off");
		_g_free0 (_data_->_tmp137_[0]);
		_data_->_tmp137_[0] = _data_->_tmp138_;
		{
			_data_->_vala1_i = 0;
			{
				_data_->_tmp139_ = TRUE;
				while (TRUE) {
					if (!_data_->_tmp139_) {
						_data_->_tmp140_ = _data_->_vala1_i;
						_data_->_vala1_i = _data_->_tmp140_ + 1;
					}
					_data_->_tmp139_ = FALSE;
					if (!(_data_->_vala1_i < G_N_ELEMENTS (DC_MUTE_DURATION_LABELS))) {
						break;
					}
					_data_->_tmp141_ = _data_->_data50_->mute_labels;
					_data_->_tmp141__length1 = _data_->_data50_->mute_labels_length1;
					_data_->_tmp142_ = DC_MUTE_DURATION_LABELS[_data_->_vala1_i];
					_data_->_tmp143_ = g_strdup (_data_->_tmp142_);
					_g_free0 (_data_->_tmp141_[_data_->_vala1_i + 1]);
					_data_->_tmp141_[_data_->_vala1_i + 1] = _data_->_tmp143_;
				}
			}
		}
		_data_->_tmp144_ = _data_->_data50_->mute_labels;
		_data_->_tmp144__length1 = _data_->_data50_->mute_labels_length1;
		_data_->_tmp145_ = (GtkDropDown*) gtk_drop_down_new_from_strings (_data_->_tmp144_);
		g_object_ref_sink (_data_->_tmp145_);
		_data_->_data50_->mute_combo = _data_->_tmp145_;
		if (_data_->is_muted) {
			_data_->_tmp147_ = _data_->_data50_->mute_labels;
			_data_->_tmp147__length1 = _data_->_data50_->mute_labels_length1;
			_data_->_tmp146_ = _data_->_tmp147__length1 - 1;
		} else {
			_data_->_tmp146_ = 0;
		}
		_data_->_tmp148_ = _data_->_data50_->mute_combo;
		gtk_drop_down_set_selected (_data_->_tmp148_, (guint) _data_->_tmp146_);
		_data_->_tmp149_ = _data_->_data50_->mute_combo;
		gtk_widget_set_valign ((GtkWidget*) _data_->_tmp149_, GTK_ALIGN_CENTER);
		_data_->_tmp150_ = _data_->_data50_->mute_combo;
		g_signal_connect_data ((GObject*) _data_->_tmp150_, "notify::selected", (GCallback) ____lambda267__g_object_notify, block50_data_ref (_data_->_data50_), (GClosureNotify) block50_data_unref, 0);
		_data_->_tmp151_ = _data_->mute_row;
		_data_->_tmp152_ = _data_->_data50_->mute_combo;
		adw_action_row_add_suffix (_data_->_tmp151_, (GtkWidget*) _data_->_tmp152_);
		_data_->_tmp153_ = _data_->mute_row;
		_data_->_tmp154_ = _data_->_data50_->mute_combo;
		adw_action_row_set_activatable_widget (_data_->_tmp153_, (GtkWidget*) _data_->_tmp154_);
		_data_->_tmp155_ = dc_chat_info_dialog_boxed_list (_data_->self);
		_data_->ephem_list = _data_->_tmp155_;
		_data_->_tmp156_ = dc_chat_info_dialog_action_row (_data_->self, "View Media", "Browse apps and media shared in this chat", "view-grid-symbolic");
		_data_->media_row = _data_->_tmp156_;
		_data_->_tmp157_ = _data_->media_row;
		g_signal_connect_object (_data_->_tmp157_, "activated", (GCallback) ____lambda268__adw_action_row_activated, _data_->self, 0);
		_data_->_tmp158_ = _data_->ephem_list;
		_data_->_tmp159_ = _data_->media_row;
		gtk_list_box_append (_data_->_tmp158_, (GtkWidget*) _data_->_tmp159_);
		_data_->_tmp160_ = _data_->ephem_list;
		_data_->_tmp161_ = _data_->mute_row;
		gtk_list_box_append (_data_->_tmp160_, (GtkWidget*) _data_->_tmp161_);
		_data_->_tmp162_ = _data_->ephem_list;
		_data_->_tmp163_ = _data_->ephem_row;
		gtk_list_box_append (_data_->_tmp162_, (GtkWidget*) _data_->_tmp163_);
		_data_->_tmp164_ = _data_->self->priv->content;
		_data_->_tmp165_ = _data_->ephem_list;
		gtk_box_append (_data_->_tmp164_, (GtkWidget*) _data_->_tmp165_);
		_data_->_tmp166_ = _data_->self->priv->content;
		_data_->_tmp167_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
		g_object_ref_sink (_data_->_tmp167_);
		_data_->_tmp168_ = _data_->_tmp167_;
		gtk_box_append (_data_->_tmp166_, (GtkWidget*) _data_->_tmp168_);
		_g_object_unref0 (_data_->_tmp168_);
		_data_->_tmp169_ = _data_->chat;
		if (json_object_has_member (_data_->_tmp169_, "contactIds")) {
			_data_->_tmp170_ = _data_->chat;
			_data_->_tmp171_ = json_object_get_array_member (_data_->_tmp170_, "contactIds");
			_data_->_tmp172_ = _json_array_ref0 (_data_->_tmp171_);
			_data_->_vala1_ids = _data_->_tmp172_;
			_data_->_tmp173_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
			g_object_ref_sink (_data_->_tmp173_);
			_data_->header_box = _data_->_tmp173_;
			if (_data_->self->priv->is_group) {
				_data_->_tmp175_ = _data_->_vala1_ids;
				_data_->_tmp176_ = g_strdup_printf ("Members (%u)", json_array_get_length (_data_->_tmp175_));
				_g_free0 (_data_->_tmp174_);
				_data_->_tmp174_ = _data_->_tmp176_;
			} else {
				_data_->_tmp177_ = g_strdup ("Contact");
				_g_free0 (_data_->_tmp174_);
				_data_->_tmp174_ = _data_->_tmp177_;
			}
			_data_->_tmp178_ = (GtkLabel*) gtk_label_new (_data_->_tmp174_);
			g_object_ref_sink (_data_->_tmp178_);
			_data_->members_lbl = _data_->_tmp178_;
			_data_->_tmp179_ = _data_->members_lbl;
			gtk_widget_add_css_class ((GtkWidget*) _data_->_tmp179_, "heading");
			_data_->_tmp180_ = _data_->members_lbl;
			gtk_widget_set_halign ((GtkWidget*) _data_->_tmp180_, GTK_ALIGN_START);
			_data_->_tmp181_ = _data_->members_lbl;
			gtk_widget_set_hexpand ((GtkWidget*) _data_->_tmp181_, TRUE);
			_data_->_tmp182_ = _data_->header_box;
			_data_->_tmp183_ = _data_->members_lbl;
			gtk_box_append (_data_->_tmp182_, (GtkWidget*) _data_->_tmp183_);
			if (_data_->self->priv->is_group) {
				_data_->_tmp184_ = dc_chat_info_dialog_flat_icon_button (_data_->self, "list-add-symbolic", "Add member", FALSE);
				_data_->add_member_btn = _data_->_tmp184_;
				_data_->_tmp185_ = _data_->add_member_btn;
				g_signal_connect_object (_data_->_tmp185_, "clicked", (GCallback) ______lambda269__gtk_button_clicked, _data_->self, 0);
				_data_->_tmp186_ = _data_->header_box;
				_data_->_tmp187_ = _data_->add_member_btn;
				gtk_box_append (_data_->_tmp186_, (GtkWidget*) _data_->_tmp187_);
				_g_object_unref0 (_data_->add_member_btn);
			}
			_data_->_tmp188_ = _data_->self->priv->content;
			_data_->_tmp189_ = _data_->header_box;
			gtk_box_append (_data_->_tmp188_, (GtkWidget*) _data_->_tmp189_);
			_data_->_tmp190_ = dc_chat_info_dialog_boxed_list (_data_->self);
			_g_object_unref0 (_data_->self->priv->members_list);
			_data_->self->priv->members_list = _data_->_tmp190_;
			{
				_data_->_vala2_i = (guint) 0;
				{
					_data_->_tmp191_ = TRUE;
					while (TRUE) {
						if (!_data_->_tmp191_) {
							_data_->_tmp192_ = _data_->_vala2_i;
							_data_->_vala2_i = _data_->_tmp192_ + 1;
						}
						_data_->_tmp191_ = FALSE;
						_data_->_tmp193_ = _data_->_vala1_ids;
						if (!(_data_->_vala2_i < json_array_get_length (_data_->_tmp193_))) {
							break;
						}
						_data_->_tmp194_ = _data_->_vala1_ids;
						_data_->cid = (gint) json_array_get_int_element (_data_->_tmp194_, _data_->_vala2_i);
						_vala_array_add40 (&_data_->self->priv->member_contact_ids, &_data_->self->priv->member_contact_ids_length1, &_data_->self->priv->_member_contact_ids_size_, _data_->cid);
						_data_->_tmp195_ = _data_->self->priv->rpc;
						_data_->_tmp196_ = _data_->self->priv->rpc;
						_data_->_tmp197_ = dc_rpc_client_get_account_id (_data_->_tmp196_);
						_data_->_tmp198_ = _data_->_tmp197_;
						_data_->_state_ = 2;
						dc_rpc_client_get_contact_for (_data_->_tmp195_, _data_->_tmp198_, _data_->cid, dc_chat_info_dialog_load_info_ready, _data_);
						return FALSE;
						_state_2:
						_data_->_tmp199_ = dc_rpc_client_get_contact_for_finish (_data_->_tmp195_, _data_->_res_, &_data_->_inner_error0_);
						_data_->contact_obj = _data_->_tmp199_;
						if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
							_g_object_unref0 (_data_->members_lbl);
							_g_free0 (_data_->_tmp174_);
							_g_object_unref0 (_data_->header_box);
							_json_array_unref0 (_data_->_vala1_ids);
							_g_object_unref0 (_data_->media_row);
							_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);
							block50_data_unref (_data_->_data50_);
							_data_->_data50_ = NULL;
							goto __catch0_g_error;
						}
						_data_->_tmp201_ = _data_->contact_obj;
						if (_data_->_tmp201_ != NULL) {
							_data_->_tmp202_ = _data_->contact_obj;
							_data_->_tmp203_ = dc_rpc_parsers_parse_contact (_data_->cid, _data_->_tmp202_);
							_g_object_unref0 (_data_->_tmp200_);
							_data_->_tmp200_ = _data_->_tmp203_;
						} else {
							_g_object_unref0 (_data_->_tmp200_);
							_data_->_tmp200_ = NULL;
						}
						_data_->_tmp204_ = _data_->_tmp200_;
						_data_->_tmp200_ = NULL;
						_data_->contact = _data_->_tmp204_;
						_data_->_tmp205_ = _data_->contact;
						if (_data_->_tmp205_ == NULL) {
							_g_object_unref0 (_data_->contact);
							_g_object_unref0 (_data_->_tmp200_);
							_json_object_unref0 (_data_->contact_obj);
							continue;
						}
						if (_data_->is_dm_chat) {
							_data_->_tmp208_ = _data_->contact;
							_data_->_tmp209_ = dc_contact_get_id (_data_->_tmp208_);
							_data_->_tmp210_ = _data_->_tmp209_;
							_data_->_tmp207_ = _data_->_tmp210_ > 1;
						} else {
							_data_->_tmp207_ = FALSE;
						}
						if (_data_->_tmp207_) {
							_data_->_tmp211_ = _data_->self->priv->dm_contact;
							_data_->_tmp206_ = _data_->_tmp211_ == NULL;
						} else {
							_data_->_tmp206_ = FALSE;
						}
						if (_data_->_tmp206_) {
							_data_->_tmp212_ = _data_->contact;
							_data_->_tmp213_ = _g_object_ref0 (_data_->_tmp212_);
							_g_object_unref0 (_data_->self->priv->dm_contact);
							_data_->self->priv->dm_contact = _data_->_tmp213_;
						}
						_data_->_tmp214_ = _data_->contact;
						_data_->_tmp215_ = dc_chat_info_dialog_build_contact_row (_data_->self, _data_->_tmp214_);
						_data_->row = _data_->_tmp215_;
						_data_->_tmp216_ = _data_->self->priv->members_list;
						_data_->_tmp217_ = _data_->row;
						gtk_list_box_append (_data_->_tmp216_, (GtkWidget*) _data_->_tmp217_);
						_g_object_unref0 (_data_->row);
						_g_object_unref0 (_data_->contact);
						_g_object_unref0 (_data_->_tmp200_);
						_json_object_unref0 (_data_->contact_obj);
					}
				}
			}
			_data_->_tmp218_ = _data_->self->priv->content;
			_data_->_tmp219_ = _data_->self->priv->members_list;
			gtk_box_append (_data_->_tmp218_, (GtkWidget*) _data_->_tmp219_);
			_g_object_unref0 (_data_->members_lbl);
			_g_free0 (_data_->_tmp174_);
			_g_object_unref0 (_data_->header_box);
			_json_array_unref0 (_data_->_vala1_ids);
		}
		_data_->_tmp220_ = _data_->self->priv->content;
		_data_->_tmp221_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
		g_object_ref_sink (_data_->_tmp221_);
		_data_->_tmp222_ = _data_->_tmp221_;
		gtk_box_append (_data_->_tmp220_, (GtkWidget*) _data_->_tmp222_);
		_g_object_unref0 (_data_->_tmp222_);
		_data_->_tmp223_ = dc_chat_info_dialog_boxed_list (_data_->self);
		_data_->actions_list = _data_->_tmp223_;
		if (_data_->self->priv->is_group) {
			if (_data_->self->priv->is_channel) {
				_data_->_tmp224_ = "New Channel with Same Members";
			} else {
				_data_->_tmp224_ = "New Group with Same Members";
			}
			_data_->_tmp225_ = dc_chat_info_dialog_action_row (_data_->self, _data_->_tmp224_, "Start a new one without picking members again", "system-users-symbolic");
			_data_->duplicate_row = _data_->_tmp225_;
			_data_->_tmp226_ = _data_->duplicate_row;
			g_signal_connect_object (_data_->_tmp226_, "activated", (GCallback) _____lambda271__adw_action_row_activated, _data_->self, 0);
			_data_->_tmp227_ = _data_->actions_list;
			_data_->_tmp228_ = _data_->duplicate_row;
			gtk_list_box_append (_data_->_tmp227_, (GtkWidget*) _data_->_tmp228_);
			_g_object_unref0 (_data_->duplicate_row);
		}
		_data_->_tmp229_ = dc_chat_info_dialog_action_row (_data_->self, "Clear Chat", "Remove messages from this device", "edit-clear-symbolic");
		_data_->clear_row = _data_->_tmp229_;
		_data_->_tmp230_ = _data_->clear_row;
		g_signal_connect_object (_data_->_tmp230_, "activated", (GCallback) ____lambda278__adw_action_row_activated, _data_->self, 0);
		_data_->_tmp231_ = _data_->actions_list;
		_data_->_tmp232_ = _data_->clear_row;
		gtk_list_box_append (_data_->_tmp231_, (GtkWidget*) _data_->_tmp232_);
		_data_->_tmp233_ = dc_chat_info_dialog_action_row (_data_->self, "Clear Sent Messages for Everyone", "Delete messages you sent for all participants", "edit-delete-symbolic");
		_data_->clear_sent_row = _data_->_tmp233_;
		_data_->_tmp234_ = _data_->clear_sent_row;
		g_signal_connect_object (_data_->_tmp234_, "activated", (GCallback) ____lambda279__adw_action_row_activated, _data_->self, 0);
		_data_->_tmp235_ = _data_->actions_list;
		_data_->_tmp236_ = _data_->clear_sent_row;
		gtk_list_box_append (_data_->_tmp235_, (GtkWidget*) _data_->_tmp236_);
		if (_data_->self->priv->is_group) {
			_data_->_tmp237_ = dc_chat_info_dialog_action_row (_data_->self, "Leave Group", "Stop receiving messages and remove the chat", "system-log-out-symbolic");
			_data_->leave_row = _data_->_tmp237_;
			_data_->_tmp238_ = _data_->leave_row;
			g_signal_connect_object (_data_->_tmp238_, "activated", (GCallback) _____lambda280__adw_action_row_activated, _data_->self, 0);
			_data_->_tmp239_ = _data_->actions_list;
			_data_->_tmp240_ = _data_->leave_row;
			gtk_list_box_append (_data_->_tmp239_, (GtkWidget*) _data_->_tmp240_);
			_data_->_tmp241_ = dc_chat_info_dialog_action_row (_data_->self, "Disband Group", "Remove all members and delete messages", "edit-delete-symbolic");
			_data_->disband_row = _data_->_tmp241_;
			_data_->_tmp242_ = _data_->disband_row;
			g_signal_connect_object (_data_->_tmp242_, "activated", (GCallback) _____lambda281__adw_action_row_activated, _data_->self, 0);
			_data_->_tmp243_ = _data_->actions_list;
			_data_->_tmp244_ = _data_->disband_row;
			gtk_list_box_append (_data_->_tmp243_, (GtkWidget*) _data_->_tmp244_);
			_g_object_unref0 (_data_->disband_row);
			_g_object_unref0 (_data_->leave_row);
		}
		_data_->_tmp245_ = _data_->self->priv->dm_contact;
		if (_data_->_tmp245_ != NULL) {
			_data_->_tmp246_ = _data_->actions_list;
			_data_->_tmp247_ = _data_->self->priv->dm_contact;
			_data_->_tmp248_ = dc_chat_info_dialog_build_contact_block_row (_data_->self, _data_->_tmp247_);
			_data_->_tmp249_ = _data_->_tmp248_;
			gtk_list_box_append (_data_->_tmp246_, (GtkWidget*) _data_->_tmp249_);
			_g_object_unref0 (_data_->_tmp249_);
		}
		_data_->_tmp250_ = dc_chat_info_dialog_action_row (_data_->self, "Delete for Me", "Remove from your chat list", "user-trash-symbolic");
		_data_->delete_row = _data_->_tmp250_;
		_data_->_tmp251_ = _data_->delete_row;
		g_signal_connect_object (_data_->_tmp251_, "activated", (GCallback) ____lambda283__adw_action_row_activated, _data_->self, 0);
		_data_->_tmp252_ = _data_->actions_list;
		_data_->_tmp253_ = _data_->delete_row;
		gtk_list_box_append (_data_->_tmp252_, (GtkWidget*) _data_->_tmp253_);
		_data_->_tmp254_ = _data_->self->priv->content;
		_data_->_tmp255_ = _data_->actions_list;
		gtk_box_append (_data_->_tmp254_, (GtkWidget*) _data_->_tmp255_);
		_g_object_unref0 (_data_->delete_row);
		_g_object_unref0 (_data_->clear_sent_row);
		_g_object_unref0 (_data_->clear_row);
		_g_object_unref0 (_data_->actions_list);
		_g_object_unref0 (_data_->media_row);
		_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);
		block50_data_unref (_data_->_data50_);
		_data_->_data50_ = NULL;
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		gtk_widget_set_visible ((GtkWidget*) _data_->spinner, FALSE);
		_data_->_tmp256_ = _data_->e;
		_data_->_tmp257_ = _data_->_tmp256_->message;
		_data_->_tmp258_ = g_strconcat ("Failed to load: ", _data_->_tmp257_, NULL);
		_data_->_tmp259_ = _data_->_tmp258_;
		_data_->_tmp260_ = (GtkLabel*) gtk_label_new (_data_->_tmp259_);
		g_object_ref_sink (_data_->_tmp260_);
		_data_->_tmp261_ = _data_->_tmp260_;
		_g_free0 (_data_->_tmp259_);
		_data_->err = _data_->_tmp261_;
		_data_->_tmp262_ = _data_->err;
		gtk_widget_add_css_class ((GtkWidget*) _data_->_tmp262_, "dim-label");
		_data_->_tmp263_ = _data_->err;
		gtk_label_set_wrap (_data_->_tmp263_, TRUE);
		_data_->_tmp264_ = _data_->self->priv->content;
		_data_->_tmp265_ = _data_->err;
		gtk_box_append (_data_->_tmp264_, (GtkWidget*) _data_->_tmp265_);
		_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 Block52Data*
block52_data_ref (Block52Data* _data52_)
{
	g_atomic_int_inc (&_data52_->_ref_count_);
	return _data52_;
}

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

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

static void
block53_data_unref (void * _userdata_)
{
	Block53Data* _data53_;
	_data53_ = (Block53Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data53_->_ref_count_)) {
		DcChatInfoDialog* self;
		self = _data53_->_data52_->self;
		_g_free0 (_data53_->addr);
		block52_data_unref (_data53_->_data52_);
		_data53_->_data52_ = NULL;
		g_slice_free (Block53Data, _data53_);
	}
}

static void
___lambda260_ (Block53Data* _data53_)
{
	Block52Data* _data52_;
	DcChatInfoDialog* self;
	GdkClipboard* _tmp0_;
	const gchar* _tmp1_;
	_data52_ = _data53_->_data52_;
	self = _data52_->self;
	_tmp0_ = gtk_widget_get_clipboard ((GtkWidget*) self);
	_tmp1_ = _data53_->addr;
	gdk_clipboard_set_text (_tmp0_, _tmp1_);
}

static void
____lambda260__gtk_button_clicked (GtkButton* _sender,
                                   gpointer self)
{
	___lambda260_ (self);
}

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

static void
block54_data_unref (void * _userdata_)
{
	Block54Data* _data54_;
	_data54_ = (Block54Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data54_->_ref_count_)) {
		DcChatInfoDialog* self;
		self = _data54_->_data52_->self;
		block52_data_unref (_data54_->_data52_);
		_data54_->_data52_ = NULL;
		g_slice_free (Block54Data, _data54_);
	}
}

static void
___lambda261_ (Block54Data* _data54_)
{
	Block52Data* _data52_;
	DcChatInfoDialog* self;
	AdwActionRow* _tmp0_;
	_data52_ = _data54_->_data52_;
	self = _data52_->self;
	_tmp0_ = _data52_->row;
	dc_chat_info_dialog_remove_member (self, _data54_->cid, _tmp0_, NULL, NULL);
}

static void
____lambda261__gtk_button_clicked (GtkButton* _sender,
                                   gpointer self)
{
	___lambda261_ (self);
}

static AdwActionRow*
dc_chat_info_dialog_build_contact_row (DcChatInfoDialog* self,
                                       DcContact* contact)
{
	Block52Data* _data52_;
	AdwActionRow* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	gboolean _tmp12_ = FALSE;
	AdwActionRow* _tmp21_;
	AdwActionRow* _tmp22_;
	AdwActionRow* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (contact != NULL, NULL);
	_data52_ = g_slice_new0 (Block52Data);
	_data52_->_ref_count_ = 1;
	_data52_->self = g_object_ref (self);
	_tmp0_ = dc_contact_row (contact, FALSE, FALSE);
	_data52_->row = _tmp0_;
	_tmp1_ = dc_contact_get_address (contact);
	_tmp2_ = _tmp1_;
	_tmp3_ = strlen (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_ > 0) {
		Block53Data* _data53_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		gchar* _tmp7_;
		GtkButton* copy_btn = NULL;
		GtkButton* _tmp8_;
		GtkButton* _tmp9_;
		AdwActionRow* _tmp10_;
		GtkButton* _tmp11_;
		_data53_ = g_slice_new0 (Block53Data);
		_data53_->_ref_count_ = 1;
		_data53_->_data52_ = block52_data_ref (_data52_);
		_tmp5_ = dc_contact_get_address (contact);
		_tmp6_ = _tmp5_;
		_tmp7_ = g_strdup (_tmp6_);
		_data53_->addr = _tmp7_;
		_tmp8_ = dc_chat_info_dialog_flat_icon_button (self, "edit-copy-symbolic", "Copy email address", FALSE);
		copy_btn = _tmp8_;
		_tmp9_ = copy_btn;
		g_signal_connect_data (_tmp9_, "clicked", (GCallback) ____lambda260__gtk_button_clicked, block53_data_ref (_data53_), (GClosureNotify) block53_data_unref, 0);
		_tmp10_ = _data52_->row;
		_tmp11_ = copy_btn;
		adw_action_row_add_suffix (_tmp10_, (GtkWidget*) _tmp11_);
		_g_object_unref0 (copy_btn);
		block53_data_unref (_data53_);
		_data53_ = NULL;
	}
	if (self->priv->is_group) {
		gint _tmp13_;
		gint _tmp14_;
		_tmp13_ = dc_contact_get_id (contact);
		_tmp14_ = _tmp13_;
		_tmp12_ = _tmp14_ != 1;
	} else {
		_tmp12_ = FALSE;
	}
	if (_tmp12_) {
		Block54Data* _data54_;
		gint _tmp15_;
		gint _tmp16_;
		GtkButton* remove_btn = NULL;
		GtkButton* _tmp17_;
		GtkButton* _tmp18_;
		AdwActionRow* _tmp19_;
		GtkButton* _tmp20_;
		_data54_ = g_slice_new0 (Block54Data);
		_data54_->_ref_count_ = 1;
		_data54_->_data52_ = block52_data_ref (_data52_);
		_tmp15_ = dc_contact_get_id (contact);
		_tmp16_ = _tmp15_;
		_data54_->cid = _tmp16_;
		_tmp17_ = dc_chat_info_dialog_flat_icon_button (self, "user-trash-symbolic", "Remove from group", TRUE);
		remove_btn = _tmp17_;
		_tmp18_ = remove_btn;
		g_signal_connect_data (_tmp18_, "clicked", (GCallback) ____lambda261__gtk_button_clicked, block54_data_ref (_data54_), (GClosureNotify) block54_data_unref, 0);
		_tmp19_ = _data52_->row;
		_tmp20_ = remove_btn;
		adw_action_row_add_suffix (_tmp19_, (GtkWidget*) _tmp20_);
		_g_object_unref0 (remove_btn);
		block54_data_unref (_data54_);
		_data54_ = NULL;
	}
	_tmp21_ = _data52_->row;
	_tmp22_ = _g_object_ref0 (_tmp21_);
	result = _tmp22_;
	block52_data_unref (_data52_);
	_data52_ = NULL;
	return result;
}

static Block55Data*
block55_data_ref (Block55Data* _data55_)
{
	g_atomic_int_inc (&_data55_->_ref_count_);
	return _data55_;
}

static void
block55_data_unref (void * _userdata_)
{
	Block55Data* _data55_;
	_data55_ = (Block55Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data55_->_ref_count_)) {
		DcChatInfoDialog* self;
		self = _data55_->self;
		_g_object_unref0 (_data55_->row);
		_g_object_unref0 (_data55_->contact);
		_g_object_unref0 (self);
		g_slice_free (Block55Data, _data55_);
	}
}

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

static void
___lambda282__adw_action_row_activated (AdwActionRow* _sender,
                                        gpointer self)
{
	__lambda282_ (self);
}

static AdwActionRow*
dc_chat_info_dialog_build_contact_block_row (DcChatInfoDialog* self,
                                             DcContact* contact)
{
	Block55Data* _data55_;
	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);
	_data55_ = g_slice_new0 (Block55Data);
	_data55_->_ref_count_ = 1;
	_data55_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (contact);
	_g_object_unref0 (_data55_->contact);
	_data55_->contact = _tmp0_;
	_tmp1_ = (AdwActionRow*) adw_action_row_new ();
	g_object_ref_sink (_tmp1_);
	_data55_->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 (_data55_->row, (GtkWidget*) _tmp3_);
	_g_object_unref0 (_tmp3_);
	gtk_list_box_row_set_activatable ((GtkListBoxRow*) _data55_->row, TRUE);
	dc_chat_info_dialog_update_contact_block_row (self, _data55_->row, _data55_->contact);
	g_signal_connect_data (_data55_->row, "activated", (GCallback) ___lambda282__adw_action_row_activated, block55_data_ref (_data55_), (GClosureNotify) block55_data_unref, 0);
	_tmp4_ = _g_object_ref0 (_data55_->row);
	result = _tmp4_;
	block55_data_unref (_data55_);
	_data55_ = 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 Block56Data*
block56_data_ref (Block56Data* _data56_)
{
	g_atomic_int_inc (&_data56_->_ref_count_);
	return _data56_;
}

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

static void
__lambda258_ (Block56Data* _data56_)
{
	DcChatInfoDialog* self;
	self = _data56_->self;
	g_signal_emit_by_name (_data56_->dialog, "response", "save");
}

static void
___lambda258__gtk_entry_activate (GtkEntry* _sender,
                                  gpointer self)
{
	__lambda258_ (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
__lambda259_ (Block56Data* _data56_,
              const gchar* resp)
{
	DcChatInfoDialog* self;
	self = _data56_->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*) _data56_->entry);
		_tmp1_ = _tmp0_;
		_tmp2_ = string_strip (_tmp1_);
		_tmp3_ = _tmp2_;
		dc_chat_info_dialog_save_contact_name (self, _data56_->contact_id, _tmp3_, _data56_->name_lbl, NULL, NULL);
		_g_free0 (_tmp3_);
	}
}

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

static void
dc_chat_info_dialog_show_edit_contact_name_dialog (DcChatInfoDialog* self,
                                                   gint contact_id,
                                                   GtkLabel* name_lbl)
{
	Block56Data* _data56_;
	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);
	_data56_ = g_slice_new0 (Block56Data);
	_data56_->_ref_count_ = 1;
	_data56_->self = g_object_ref (self);
	_data56_->contact_id = contact_id;
	_tmp0_ = _g_object_ref0 (name_lbl);
	_g_object_unref0 (_data56_->name_lbl);
	_data56_->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_);
	_data56_->dialog = _tmp1_;
	_tmp2_ = (GtkEntry*) gtk_entry_new ();
	g_object_ref_sink (_tmp2_);
	_data56_->entry = _tmp2_;
	_tmp3_ = gtk_label_get_label (_data56_->name_lbl);
	_tmp4_ = _tmp3_;
	gtk_editable_set_text ((GtkEditable*) _data56_->entry, _tmp4_);
	gtk_entry_set_placeholder_text (_data56_->entry, "Contact name");
	gtk_entry_set_activates_default (_data56_->entry, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) _data56_->entry, TRUE);
	adw_alert_dialog_set_extra_child (_data56_->dialog, (GtkWidget*) _data56_->entry);
	adw_alert_dialog_add_response (_data56_->dialog, "cancel", "Cancel");
	adw_alert_dialog_add_response (_data56_->dialog, "save", "Save");
	adw_alert_dialog_set_response_appearance (_data56_->dialog, "save", ADW_RESPONSE_SUGGESTED);
	adw_alert_dialog_set_default_response (_data56_->dialog, "save");
	adw_alert_dialog_set_close_response (_data56_->dialog, "cancel");
	g_signal_connect_data (_data56_->entry, "activate", (GCallback) ___lambda258__gtk_entry_activate, block56_data_ref (_data56_), (GClosureNotify) block56_data_unref, 0);
	g_signal_connect_data (_data56_->dialog, "response", (GCallback) ___lambda259__adw_alert_dialog_response, block56_data_ref (_data56_), (GClosureNotify) block56_data_unref, 0);
	adw_dialog_present ((AdwDialog*) _data56_->dialog, (GtkWidget*) self);
	gtk_widget_grab_focus ((GtkWidget*) _data56_->entry);
	block56_data_unref (_data56_);
	_data56_ = 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 Block57Data*
block57_data_ref (Block57Data* _data57_)
{
	g_atomic_int_inc (&_data57_->_ref_count_);
	return _data57_;
}

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

static void
__lambda263_ (Block57Data* _data57_)
{
	DcChatInfoDialog* self;
	self = _data57_->self;
	g_signal_emit_by_name (_data57_->dialog, "response", "save");
}

static void
___lambda263__gtk_entry_activate (GtkEntry* _sender,
                                  gpointer self)
{
	__lambda263_ (self);
}

static void
__lambda264_ (Block57Data* _data57_,
              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 = _data57_->self;
	g_return_if_fail (resp != NULL);
	if (g_strcmp0 (resp, "save") != 0) {
		return;
	}
	_tmp0_ = gtk_editable_get_text ((GtkEditable*) _data57_->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_, _data57_->name_lbl, NULL, NULL);
	}
	_g_free0 (new_name);
}

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

static void
dc_chat_info_dialog_show_edit_group_name_dialog (DcChatInfoDialog* self,
                                                 GtkLabel* name_lbl)
{
	Block57Data* _data57_;
	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);
	_data57_ = g_slice_new0 (Block57Data);
	_data57_->_ref_count_ = 1;
	_data57_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (name_lbl);
	_g_object_unref0 (_data57_->name_lbl);
	_data57_->name_lbl = _tmp0_;
	_tmp1_ = (AdwAlertDialog*) adw_alert_dialog_new ("Edit Group Name", NULL);
	g_object_ref_sink (_tmp1_);
	_data57_->dialog = _tmp1_;
	_tmp2_ = (GtkEntry*) gtk_entry_new ();
	g_object_ref_sink (_tmp2_);
	_data57_->entry = _tmp2_;
	_tmp3_ = gtk_label_get_label (_data57_->name_lbl);
	_tmp4_ = _tmp3_;
	gtk_editable_set_text ((GtkEditable*) _data57_->entry, _tmp4_);
	gtk_entry_set_placeholder_text (_data57_->entry, "Group name");
	gtk_entry_set_activates_default (_data57_->entry, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) _data57_->entry, TRUE);
	adw_alert_dialog_set_extra_child (_data57_->dialog, (GtkWidget*) _data57_->entry);
	adw_alert_dialog_add_response (_data57_->dialog, "cancel", "Cancel");
	adw_alert_dialog_add_response (_data57_->dialog, "save", "Save");
	adw_alert_dialog_set_response_appearance (_data57_->dialog, "save", ADW_RESPONSE_SUGGESTED);
	adw_alert_dialog_set_default_response (_data57_->dialog, "save");
	adw_alert_dialog_set_close_response (_data57_->dialog, "cancel");
	g_signal_connect_data (_data57_->entry, "activate", (GCallback) ___lambda263__gtk_entry_activate, block57_data_ref (_data57_), (GClosureNotify) block57_data_unref, 0);
	g_signal_connect_data (_data57_->dialog, "response", (GCallback) ___lambda264__adw_alert_dialog_response, block57_data_ref (_data57_), (GClosureNotify) block57_data_unref, 0);
	adw_dialog_present ((AdwDialog*) _data57_->dialog, (GtkWidget*) self);
	gtk_widget_grab_focus ((GtkWidget*) _data57_->entry);
	block57_data_unref (_data57_);
	_data57_ = 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
__lambda270_ (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
___lambda270__dc_contact_picker_dialog_contact_picked (DcContactPickerDialog* _sender,
                                                       gint contact_id,
                                                       const gchar* email,
                                                       gpointer self)
{
	__lambda270_ ((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) ___lambda270__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 void
dc_chat_info_dialog_confirm_block_contact_data_free (gpointer _data)
{
	DcChatInfoDialogConfirmBlockContactData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->contact);
	_g_object_unref0 (_data_->row);
	_g_object_unref0 (_data_->self);
	g_slice_free (DcChatInfoDialogConfirmBlockContactData, _data_);
}

static void
dc_chat_info_dialog_confirm_block_contact (DcChatInfoDialog* self,
                                           DcContact* contact,
                                           AdwActionRow* row,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_)
{
	DcChatInfoDialogConfirmBlockContactData* _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 (DcChatInfoDialogConfirmBlockContactData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, dc_chat_info_dialog_confirm_block_contact_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_;
	dc_chat_info_dialog_confirm_block_contact_co (_data_);
}

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

static void
dc_chat_info_dialog_confirm_block_contact_ready (GObject* source_object,
                                                 GAsyncResult* _res_,
                                                 gpointer _user_data_)
{
	DcChatInfoDialogConfirmBlockContactData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	dc_chat_info_dialog_confirm_block_contact_co (_data_);
}

static gboolean
dc_chat_info_dialog_confirm_block_contact_co (DcChatInfoDialogConfirmBlockContactData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = dc_chat_info_dialog_contact_label (_data_->contact);
	_data_->label = _data_->_tmp0_;
	_data_->_tmp1_ = _data_->label;
	_data_->_tmp2_ = g_strdup_printf ("Block \"%s\"? You will no longer receive messages from this contact.", _data_->_tmp1_);
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->_state_ = 1;
	dc_confirm_action ((GtkWidget*) _data_->self, "Block Contact", _data_->_tmp3_, "block", "Block", dc_chat_info_dialog_confirm_block_contact_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp4_ = dc_confirm_action_finish (_data_->_res_);
	_g_free0 (_data_->_tmp3_);
	if (_data_->_tmp4_) {
		dc_chat_info_dialog_set_contact_blocked (_data_->self, _data_->contact, _data_->row, TRUE, NULL, NULL);
	}
	_g_free0 (_data_->label);
	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_contact_blocked_data_free (gpointer _data)
{
	DcChatInfoDialogSetContactBlockedData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->contact);
	_g_object_unref0 (_data_->row);
	_g_object_unref0 (_data_->self);
	g_slice_free (DcChatInfoDialogSetContactBlockedData, _data_);
}

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

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

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

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

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

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

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

static void
dc_chat_info_dialog_confirm_clear_history_ready (GObject* source_object,
                                                 GAsyncResult* _res_,
                                                 gpointer _user_data_)
{
	DcChatInfoDialogConfirmClearHistoryData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	dc_chat_info_dialog_confirm_clear_history_co (_data_);
}

static gboolean
dc_chat_info_dialog_confirm_clear_history_co (DcChatInfoDialogConfirmClearHistoryData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	if (_data_->for_all) {
		_data_->_tmp0_ = "Clear Sent Messages for Everyone";
	} else {
		_data_->_tmp0_ = "Clear Chat";
	}
	_data_->_tmp1_ = g_strdup (_data_->_tmp0_);
	_data_->title = _data_->_tmp1_;
	if (_data_->for_all) {
		_data_->_tmp2_ = "Delete messages you sent for all participants? Messages from other peo" \
"ple can only be cleared from your device.";
	} else {
		_data_->_tmp2_ = "Remove all messages from this device? The chat will stay in your conve" \
"rsation list.";
	}
	_data_->_tmp3_ = g_strdup (_data_->_tmp2_);
	_data_->body = _data_->_tmp3_;
	if (_data_->for_all) {
		_data_->_tmp4_ = "Clear Sent Messages";
	} else {
		_data_->_tmp4_ = "Clear Chat";
	}
	_data_->_tmp5_ = g_strdup (_data_->_tmp4_);
	_data_->action_label = _data_->_tmp5_;
	_data_->_tmp6_ = _data_->title;
	_data_->_tmp7_ = _data_->body;
	_data_->_tmp8_ = _data_->action_label;
	_data_->_state_ = 1;
	dc_confirm_action ((GtkWidget*) _data_->self, _data_->_tmp6_, _data_->_tmp7_, "clear", _data_->_tmp8_, dc_chat_info_dialog_confirm_clear_history_ready, _data_);
	return FALSE;
	_state_1:
	if (dc_confirm_action_finish (_data_->_res_)) {
		dc_chat_info_dialog_do_clear_history (_data_->self, _data_->for_all, NULL, NULL);
	}
	_g_free0 (_data_->action_label);
	_g_free0 (_data_->body);
	_g_free0 (_data_->title);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

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

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

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

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

static gboolean
dc_chat_info_dialog_do_clear_history_co (DcChatInfoDialogDoClearHistoryData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		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
dc_chat_info_dialog_show_duplicate_group_dialog_data_free (gpointer _data)
{
	DcChatInfoDialogShowDuplicateGroupDialogData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (DcChatInfoDialogShowDuplicateGroupDialogData, _data_);
}

static void
dc_chat_info_dialog_show_duplicate_group_dialog (DcChatInfoDialog* self,
                                                 GAsyncReadyCallback _callback_,
                                                 gpointer _user_data_)
{
	DcChatInfoDialogShowDuplicateGroupDialogData* _data_;
	DcChatInfoDialog* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (DcChatInfoDialogShowDuplicateGroupDialogData);
	_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_show_duplicate_group_dialog_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	dc_chat_info_dialog_show_duplicate_group_dialog_co (_data_);
}

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

static void
dc_chat_info_dialog_show_duplicate_group_dialog_ready (GObject* source_object,
                                                       GAsyncResult* _res_,
                                                       gpointer _user_data_)
{
	DcChatInfoDialogShowDuplicateGroupDialogData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	dc_chat_info_dialog_show_duplicate_group_dialog_co (_data_);
}

static gboolean
string_contains (const gchar* self,
                 const gchar* needle)
{
	gchar* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (needle != NULL, FALSE);
	_tmp0_ = strstr ((gchar*) self, (gchar*) needle);
	result = _tmp0_ != NULL;
	return result;
}

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

static void
__lambda277_ (DcChatInfoDialog* self,
              gint new_chat_id)
{
	dc_chat_info_dialog_on_duplicate_created (self, new_chat_id, NULL, NULL);
}

static void
___lambda277__dc_new_group_dialog_group_created (DcNewGroupDialog* _sender,
                                                 gint chat_id,
                                                 gpointer self)
{
	__lambda277_ ((DcChatInfoDialog*) self, chat_id);
}

static gboolean
dc_chat_info_dialog_show_duplicate_group_dialog_co (DcChatInfoDialogShowDuplicateGroupDialogData* _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_ = g_new0 (gchar*, 0 + 1);
	_data_->addresses = _data_->_tmp0_;
	_data_->addresses_length1 = 0;
	_data_->_addresses_size_ = _data_->addresses_length1;
	{
		_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_ = 1;
		dc_rpc_client_get_full_chat_by_id_for (_data_->_tmp1_, _data_->_tmp4_, _data_->self->priv->chat_id, dc_chat_info_dialog_show_duplicate_group_dialog_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp5_ = dc_rpc_client_get_full_chat_by_id_for_finish (_data_->_tmp1_, _data_->_res_, &_data_->_inner_error0_);
		_data_->chat = _data_->_tmp5_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp7_ = _data_->chat;
		if (_data_->_tmp7_ != NULL) {
			_data_->_tmp8_ = _data_->chat;
			_data_->_tmp6_ = json_object_has_member (_data_->_tmp8_, "contactIds");
		} else {
			_data_->_tmp6_ = FALSE;
		}
		if (_data_->_tmp6_) {
			_data_->_tmp9_ = _data_->chat;
			_data_->_tmp10_ = json_object_get_array_member (_data_->_tmp9_, "contactIds");
			_data_->_tmp11_ = _json_array_ref0 (_data_->_tmp10_);
			_data_->ids = _data_->_tmp11_;
			{
				_data_->i = (guint) 0;
				{
					_data_->_tmp12_ = TRUE;
					while (TRUE) {
						if (!_data_->_tmp12_) {
							_data_->_tmp13_ = _data_->i;
							_data_->i = _data_->_tmp13_ + 1;
						}
						_data_->_tmp12_ = FALSE;
						_data_->_tmp14_ = _data_->ids;
						if (!(_data_->i < json_array_get_length (_data_->_tmp14_))) {
							break;
						}
						_data_->_tmp15_ = _data_->ids;
						_data_->cid = (gint) json_array_get_int_element (_data_->_tmp15_, _data_->i);
						if (_data_->cid <= 1) {
							continue;
						}
						_data_->_tmp16_ = _data_->self->priv->rpc;
						_data_->_tmp17_ = _data_->self->priv->rpc;
						_data_->_tmp18_ = dc_rpc_client_get_account_id (_data_->_tmp17_);
						_data_->_tmp19_ = _data_->_tmp18_;
						_data_->_state_ = 2;
						dc_rpc_client_get_contact_for (_data_->_tmp16_, _data_->_tmp19_, _data_->cid, dc_chat_info_dialog_show_duplicate_group_dialog_ready, _data_);
						return FALSE;
						_state_2:
						_data_->_tmp20_ = dc_rpc_client_get_contact_for_finish (_data_->_tmp16_, _data_->_res_, &_data_->_inner_error0_);
						_data_->contact_obj = _data_->_tmp20_;
						if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
							_json_array_unref0 (_data_->ids);
							_json_object_unref0 (_data_->chat);
							goto __catch0_g_error;
						}
						_data_->_tmp22_ = _data_->contact_obj;
						if (_data_->_tmp22_ != NULL) {
							_data_->_tmp23_ = _data_->contact_obj;
							_data_->_tmp24_ = dc_rpc_parsers_parse_contact (_data_->cid, _data_->_tmp23_);
							_g_object_unref0 (_data_->_tmp21_);
							_data_->_tmp21_ = _data_->_tmp24_;
						} else {
							_g_object_unref0 (_data_->_tmp21_);
							_data_->_tmp21_ = NULL;
						}
						_data_->_tmp25_ = _data_->_tmp21_;
						_data_->_tmp21_ = NULL;
						_data_->contact = _data_->_tmp25_;
						_data_->_tmp27_ = _data_->contact;
						if (_data_->_tmp27_ != NULL) {
							_data_->_tmp28_ = _data_->contact;
							_data_->_tmp29_ = dc_contact_get_address (_data_->_tmp28_);
							_data_->_tmp30_ = _data_->_tmp29_;
							_data_->_tmp26_ = string_contains (_data_->_tmp30_, "@");
						} else {
							_data_->_tmp26_ = FALSE;
						}
						if (_data_->_tmp26_) {
							_data_->_tmp31_ = _data_->contact;
							_data_->_tmp32_ = dc_contact_get_address (_data_->_tmp31_);
							_data_->_tmp33_ = _data_->_tmp32_;
							_data_->_tmp34_ = g_strdup (_data_->_tmp33_);
							_vala_array_add41 (&_data_->addresses, &_data_->addresses_length1, &_data_->_addresses_size_, _data_->_tmp34_);
						}
						_g_object_unref0 (_data_->contact);
						_g_object_unref0 (_data_->_tmp21_);
						_json_object_unref0 (_data_->contact_obj);
					}
				}
			}
			_json_array_unref0 (_data_->ids);
		}
		_json_object_unref0 (_data_->chat);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp35_ = _data_->e;
		_data_->_tmp36_ = _data_->_tmp35_->message;
		dc_show_error ((GtkWidget*) _data_->self, _data_->_tmp36_);
		_g_error_free0 (_data_->e);
		_data_->addresses = (_vala_array_free (_data_->addresses, _data_->addresses_length1, (GDestroyNotify) g_free), 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;
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_data_->addresses = (_vala_array_free (_data_->addresses, _data_->addresses_length1, (GDestroyNotify) g_free), 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;
	}
	_data_->_tmp37_ = _data_->self->priv->rpc;
	_data_->_tmp38_ = dc_new_group_dialog_new (_data_->_tmp37_, _data_->self->priv->is_channel);
	g_object_ref_sink (_data_->_tmp38_);
	_data_->dialog = _data_->_tmp38_;
	_data_->_tmp39_ = _data_->addresses;
	_data_->_tmp39__length1 = _data_->addresses_length1;
	{
		_data_->address_collection_length1 = 0;
		_data_->_address_collection_size_ = 0;
		_data_->address_collection = _data_->_tmp39_;
		_data_->address_collection_length1 = _data_->_tmp39__length1;
		for (_data_->address_it = 0; _data_->address_it < _data_->address_collection_length1; _data_->address_it = _data_->address_it + 1) {
			_data_->_tmp40_ = g_strdup (_data_->address_collection[_data_->address_it]);
			_data_->address = _data_->_tmp40_;
			{
				_data_->_tmp41_ = _data_->dialog;
				_data_->_tmp42_ = _data_->address;
				dc_new_group_dialog_add_member_email (_data_->_tmp41_, _data_->_tmp42_);
				_g_free0 (_data_->address);
			}
		}
	}
	_data_->_tmp43_ = _data_->dialog;
	g_signal_connect_object (_data_->_tmp43_, "group-created", (GCallback) ___lambda277__dc_new_group_dialog_group_created, _data_->self, 0);
	_data_->_tmp44_ = _data_->dialog;
	adw_dialog_present ((AdwDialog*) _data_->_tmp44_, (GtkWidget*) _data_->self);
	_g_object_unref0 (_data_->dialog);
	_data_->addresses = (_vala_array_free (_data_->addresses, _data_->addresses_length1, (GDestroyNotify) g_free), NULL);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

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

static void
dc_chat_info_dialog_on_duplicate_created (DcChatInfoDialog* self,
                                          gint new_chat_id,
                                          GAsyncReadyCallback _callback_,
                                          gpointer _user_data_)
{
	DcChatInfoDialogOnDuplicateCreatedData* _data_;
	DcChatInfoDialog* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (DcChatInfoDialogOnDuplicateCreatedData);
	_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_on_duplicate_created_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->new_chat_id = new_chat_id;
	dc_chat_info_dialog_on_duplicate_created_co (_data_);
}

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

static void
dc_chat_info_dialog_on_duplicate_created_ready (GObject* source_object,
                                                GAsyncResult* _res_,
                                                gpointer _user_data_)
{
	DcChatInfoDialogOnDuplicateCreatedData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	dc_chat_info_dialog_on_duplicate_created_co (_data_);
}

static gboolean
dc_chat_info_dialog_on_duplicate_created_co (DcChatInfoDialogOnDuplicateCreatedData* _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->app_window;
	_data_->_state_ = 1;
	dc_window_load_chats (_data_->_tmp0_, dc_chat_info_dialog_on_duplicate_created_ready, _data_);
	return FALSE;
	_state_1:
	dc_window_load_chats_finish (_data_->_tmp0_, _data_->_res_);
	_data_->_tmp1_ = _data_->self->priv->app_window;
	dc_window_select_chat_by_id (_data_->_tmp1_, _data_->new_chat_id);
	if (_data_->self->priv->is_channel) {
		_data_->_tmp2_ = "Channel created";
	} else {
		_data_->_tmp2_ = "Group created";
	}
	_data_->_tmp3_ = _data_->self->priv->app_window;
	dc_window_show_toast (_data_->_tmp3_, _data_->_tmp2_);
	adw_dialog_close ((AdwDialog*) _data_->self);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

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

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

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

static void
dc_chat_info_dialog_confirm_leave_group_ready (GObject* source_object,
                                               GAsyncResult* _res_,
                                               gpointer _user_data_)
{
	DcChatInfoDialogConfirmLeaveGroupData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	dc_chat_info_dialog_confirm_leave_group_co (_data_);
}

static gboolean
dc_chat_info_dialog_confirm_leave_group_co (DcChatInfoDialogConfirmLeaveGroupData* _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->chat_name;
	_data_->_tmp1_ = g_strdup_printf ("Leave \"%s\"? You will stop receiving messages and the chat will be re" \
"moved from your list.", _data_->_tmp0_);
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_state_ = 1;
	dc_confirm_action ((GtkWidget*) _data_->self, "Leave Group", _data_->_tmp2_, "leave", "Leave", dc_chat_info_dialog_confirm_leave_group_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp3_ = dc_confirm_action_finish (_data_->_res_);
	_g_free0 (_data_->_tmp2_);
	if (_data_->_tmp3_) {
		dc_chat_info_dialog_do_leave_group (_data_->self, NULL, NULL);
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
dc_chat_info_dialog_do_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;
		case 2:
		goto _state_2;
		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;
		}
		_data_->_tmp1_ = _data_->self->priv->rpc;
		_data_->_state_ = 2;
		dc_rpc_client_delete_chat (_data_->_tmp1_, _data_->self->priv->chat_id, dc_chat_info_dialog_do_leave_group_ready, _data_);
		return FALSE;
		_state_2:
		dc_rpc_client_delete_chat_finish (_data_->_tmp1_, _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_->_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_confirm_disband_group_data_free (gpointer _data)
{
	DcChatInfoDialogConfirmDisbandGroupData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (DcChatInfoDialogConfirmDisbandGroupData, _data_);
}

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

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

static void
dc_chat_info_dialog_confirm_disband_group_ready (GObject* source_object,
                                                 GAsyncResult* _res_,
                                                 gpointer _user_data_)
{
	DcChatInfoDialogConfirmDisbandGroupData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	dc_chat_info_dialog_confirm_disband_group_co (_data_);
}

static gboolean
dc_chat_info_dialog_confirm_disband_group_co (DcChatInfoDialogConfirmDisbandGroupData* _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->chat_name;
	_data_->_tmp1_ = g_strdup_printf ("Remove all members from \"%s\" and delete your sent messages for every" \
"one? Other messages will only be removed locally.", _data_->_tmp0_);
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_state_ = 1;
	dc_confirm_action ((GtkWidget*) _data_->self, "Disband Group", _data_->_tmp2_, "disband", "Disband", dc_chat_info_dialog_confirm_disband_group_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp3_ = dc_confirm_action_finish (_data_->_res_);
	_g_free0 (_data_->_tmp2_);
	if (_data_->_tmp3_) {
		dc_chat_info_dialog_do_disband_group (_data_->self, NULL, NULL);
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
dc_chat_info_dialog_do_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
dc_chat_info_dialog_confirm_delete_chat_data_free (gpointer _data)
{
	DcChatInfoDialogConfirmDeleteChatData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (DcChatInfoDialogConfirmDeleteChatData, _data_);
}

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

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

static void
dc_chat_info_dialog_confirm_delete_chat_ready (GObject* source_object,
                                               GAsyncResult* _res_,
                                               gpointer _user_data_)
{
	DcChatInfoDialogConfirmDeleteChatData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	dc_chat_info_dialog_confirm_delete_chat_co (_data_);
}

static gboolean
dc_chat_info_dialog_confirm_delete_chat_co (DcChatInfoDialogConfirmDeleteChatData* _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->chat_name;
	_data_->_tmp1_ = g_strdup_printf ("Remove \"%s\" from your chat list? You may still receive messages if y" \
"ou are a member.", _data_->_tmp0_);
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_state_ = 1;
	dc_confirm_action ((GtkWidget*) _data_->self, "Delete for Me", _data_->_tmp2_, "delete", "Delete", dc_chat_info_dialog_confirm_delete_chat_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp3_ = dc_confirm_action_finish (_data_->_res_);
	_g_free0 (_data_->_tmp2_);
	if (_data_->_tmp3_) {
		dc_chat_info_dialog_do_delete_chat_from_dialog (_data_->self, NULL, NULL);
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
dc_chat_info_dialog_do_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_;
	self->priv->is_channel = FALSE;
	_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);
}

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

