summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergii Kyryliuk <s.kyryliuk@partner.samsung.com>2017-03-03 15:45:13 +0200
committerEugene Kurzberg <i.kurtsberg@samsung.com>2017-03-06 01:30:59 -0800
commit842360fb85dfc41641f11da721f39e8e3c3f6968 (patch)
tree38a5ac90506553feb4e5d301de4af3074adaa130
parentac9879955e2304e40a8affdfd2396f67225a9b9f (diff)
downloadalarm-842360fb85dfc41641f11da721f39e8e3c3f6968.tar.gz
alarm-842360fb85dfc41641f11da721f39e8e3c3f6968.tar.bz2
alarm-842360fb85dfc41641f11da721f39e8e3c3f6968.zip
TizenRefApp-8068 Widget screen is not updated after adding/removing alarm
Change-Id: I179c728951994d47e9397bedf7d7aa0089f71306 Signed-off-by: Sergii Kyryliuk <s.kyryliuk@partner.samsung.com>
-rw-r--r--alarm-app/src/List/AlarmsView.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/alarm-app/src/List/AlarmsView.cpp b/alarm-app/src/List/AlarmsView.cpp
index e7a041f..0840dfb 100644
--- a/alarm-app/src/List/AlarmsView.cpp
+++ b/alarm-app/src/List/AlarmsView.cpp
@@ -31,7 +31,6 @@
#include "Ui/Toast.h"
#include "Ui/Window.h"
#include "Utils/Callback.h"
-#include "Utils/Logger.h"
#include "Ux/MultiSelector.h"
#include "ListPath.h"
@@ -85,9 +84,6 @@ void AlarmsView::onCreated()
m_Provider.onUpdateFinished() += { std::bind(&AlarmsView::onUpdateFinished, this), this };
m_Provider.onInserted() += { std::bind(&AlarmsView::onAlarmInserted, this, _1), this };
m_Provider.initialize([this] {
- m_Genlist->insert(m_TitleItem = new TitleItem());
- m_Genlist->insert(m_AddAlarmItem = new AddAlarmItem());
- m_AddAlarmItem->setSelectCallback(std::bind(&AlarmsView::onAddPressed, this));
for (auto &&dataItem : m_Provider.getDataList()) {
insertItem(createItem(*dataItem));
@@ -108,6 +104,10 @@ void AlarmsView::onNavigation(bool isCurrent)
void AlarmsView::onSelectModeChanged(Ux::SelectMode selectMode)
{
+ if (!getEvasObject()) {
+ return;
+ }
+
if (selectMode != Ux::SelectMulti) {
elm_layout_signal_emit(m_ContentLayout, "select_mode,button,hide", "");
@@ -153,6 +153,10 @@ Evas_Object *AlarmsView::createContentLayout(Evas_Object *parent)
(Evas_Smart_Cb)makeCallback(&AlarmsView::onItemLongpressed), this);
elm_object_content_set(layout, m_Genlist->getEvasObject());
+ m_Genlist->insert(m_TitleItem = new TitleItem());
+ m_Genlist->insert(m_AddAlarmItem = new AddAlarmItem());
+ m_AddAlarmItem->setSelectCallback(std::bind(&AlarmsView::onAddPressed, this));
+
m_MultiSelector = new Ux::MultiSelector(this);
m_MultiSelector->create(layout);
m_MultiSelector->setStrings({ "WDS_MSG_OPT_SELECT_ALL_ABB", "WDS_MSG_OPT_DESELECT_ALL_ABB" });