email_attach_panel_mode_type_e mode);
/**
+ * @brief Close launched attach panel if any
+ *
+ * @param[in] module pointer to the module
+ * @param[in] notify_close true - notify listener on close, false - otherwise
+ *
+ * @note This method does not destroy attach panel. It only close it
+ *
+ */
+EMAIL_API void email_module_close_attach_panel(email_module_t *module, bool notify_close);
+
+/**
* @brief Registers the attach panel listener
*
* @param[in] module pointer to the module
return 0;
}
+void email_module_close_attach_panel(email_module_t *module, bool notify_close)
+{
+ debug_enter();
+
+ _email_module_close_attach_panel(module, notify_close);
+
+ debug_leave();
+}
+
int email_module_set_attach_panel_listener(email_module_t *module,
email_attach_panel_listener_t *listener)
{
void composer_recipient_update_from_detail(EmailComposerView *view);
/**
+ * @brief Get from hoversel expanded state
+ *
+ * @param[in] view User data (Email composer data)
+ *
+ * @return EINA_TRUE if from hoversel exist and is expanded, otherwise EINA_FALSE
+ *
+ */
+Eina_Bool composer_recipient_is_from_hoversel_expanded(EmailComposerView *view);
+
+/**
* @brief Set cc field visible/hide
*
* @param[in] view Email composer data
{
debug_enter();
- if (elm_hoversel_expanded_get(view->recp_from_hoversel)) {
+ if (composer_recipient_is_from_hoversel_expanded(view)) {
elm_hoversel_hover_end(view->recp_from_hoversel);
}
retm_if(!data, "Invalid parameter: data is NULL!");
EmailComposerView *view = (EmailComposerView *)data;
+
eext_object_event_callback_add(view->recp_from_hoversel, EEXT_CALLBACK_BACK, _recipient_from_hoversel_back_cb, view);
+ if (view->base.module->is_attach_panel_launched) {
+ email_module_close_attach_panel(view->base.module, true);
+ }
+
debug_leave();
}
retm_if(!data, "Invalid parameter: data is NULL!");
EmailComposerView *view = (EmailComposerView *)data;
+
eext_object_event_callback_del(view->recp_from_hoversel, EEXT_CALLBACK_BACK, _recipient_from_hoversel_back_cb);
composer_util_focus_set_focus_with_idler(view, view->selected_widget);
email_profiling_end(composer_recipient_update_from_detail);
}
+Eina_Bool composer_recipient_is_from_hoversel_expanded(EmailComposerView *view)
+{
+ debug_enter();
+ if (!view->recp_from_hoversel) {
+ return EINA_FALSE;
+ }
+
+ debug_leave();
+ return elm_hoversel_expanded_get(view->recp_from_hoversel);
+}
+
void composer_recipient_show_hide_cc_field(EmailComposerView *view, Eina_Bool to_be_showed)
{
debug_enter();
{
debug_enter();
- if (view->recp_from_hoversel && elm_hoversel_expanded_get(view->recp_from_hoversel)) {
+ if (composer_recipient_is_from_hoversel_expanded(view)) {
debug_log("selected_layout = from layout");
return 0;
}
elm_object_disabled_set(view->attachment_btn, EINA_FALSE);
- if (!view->composer_popup) {
+ if (!composer_recipient_is_from_hoversel_expanded(view)) {
composer_util_focus_set_focus_with_idler(view, view->selected_widget);
}
composer_webkit_update_orientation(view);
- if (view->recp_from_hoversel && elm_hoversel_expanded_get(view->recp_from_hoversel)) {
+ if (composer_recipient_is_from_hoversel_expanded(view)) {
elm_hoversel_hover_end(view->recp_from_hoversel);
}