#include "App.h"
#include "AppControlUtils.h"
#include "ContactPicker.h"
+#include "ContactManager.h"
namespace Msg
{
class IConvRecipientsPanelListener;
class ConvRecipientsPanel
- : public ConvRecipientsPanelView,
- private IContactPickerListener,
- private IMbeRecipientsListener
+ : public ConvRecipientsPanelView
+ , private IContactPickerListener
+ , private IMbeRecipientsListener
+ , private IContactManagerListener
{
public:
ConvRecipientsPanel(Evas_Object *parent, App &app);
// IContactPickerListener
virtual void onContactsPicked(const std::list<int> &numberIdList);
+ // IContactManagerListener:
+ virtual void onContactChanged();
+
private:
App &m_App;
IConvRecipientsPanelListener *m_pListener;
m_pMbe->setListener(this);
m_pMbe->show();
setMbe(m_pMbe);
+ m_App.getContactManager().addListener(*this);
}
ConvRecipientsPanel::~ConvRecipientsPanel()
{
m_Picker.setListener(nullptr);
+ m_App.getContactManager().removeListener(*this);
}
void ConvRecipientsPanel::read(Message &msg)
if(m_pListener)
m_pListener->onItemClicked(*this, item);
}
+
+void ConvRecipientsPanel::onContactChanged()
+{
+ MSG_LOG("");
+ if(!getEntryFocus())
+ updateShortenedRecipients();
+}