TizenRefApp-6892 Conversation can not be scrolled down to see whole last bubble 23/83523/2
authorDenis Dolzhenko <d.dolzhenko@samsung.com>
Thu, 11 Aug 2016 10:42:57 +0000 (13:42 +0300)
committerDenis Dolzhenko <d.dolzhenko@samsung.com>
Thu, 11 Aug 2016 10:43:31 +0000 (13:43 +0300)
Change-Id: Ia8a80e32b3e8523b25c366a8b0710a43fd9fda10
Signed-off-by: Denis Dolzhenko <d.dolzhenko@samsung.com>
src/Conversation/ConvList/Controller/src/ConvListItem.cpp
src/Conversation/ConvList/View/inc/BubbleIconTextLayoutItem.h
src/Conversation/ConvList/View/inc/BubbleItemContainer.h
src/Conversation/ConvList/View/inc/BubbleViewItem.h
src/Conversation/ConvList/View/src/BubbleBgViewItem.cpp
src/Conversation/ConvList/View/src/BubbleIconTextLayoutItem.cpp
src/Conversation/ConvList/View/src/BubbleItemContainer.cpp
src/Conversation/ConvList/View/src/BubbleViewItem.cpp

index c877030fe6546da87945424ff67f8c409fe5af67..2cb0f6c4c0171184eb2cc1a36c42573f8fcaf53e 100644 (file)
@@ -258,8 +258,11 @@ Evas_Object *ConvListItem::getBubbleContent()
     for(BubbleEntity *entity : m_BubbleEntityList)
     {
         BubbleViewItem *item = entity->createView(*bubble);
-        bubble->append(*item, entity->getDirection());
-        item->setListener(this);
+        if(item)
+        {
+            bubble->append(*item, entity->getDirection());
+            item->setListener(this);
+        }
     }
     bubble->go();
     bubble->show();
index 25c89405df4e5e72fff6ce137f128b741707fa09..dfe410503d71445a2c0c95400d3f4107a2ecfb02 100644 (file)
@@ -41,6 +41,7 @@ namespace Msg
             void setIcon(Evas_Object *icon);
             void setMainText(const std::string &text);
             void setSubText(const std::string &text);
+            virtual void calculate();
 
             static Evas_Object *createIcon(Evas_Object *parent, const std::string &edjFileName, BgType bgType);
             Evas_Object *createIcon(const std::string &edjFileName) const;
index 112f9b1509e9a9caae878c344acaf2f4e5827b48..dcf73e81201d3414144a8a8433cb63410334a1f8 100644 (file)
@@ -18,7 +18,7 @@
 #ifndef BubbleItemContainer_h_
 #define BubbleItemContainer_h_
 
-#include "View.h"
+#include "BubbleViewItem.h"
 #include "Message.h"
 
 namespace Msg
@@ -30,7 +30,7 @@ namespace Msg
             BubbleItemContainer(Evas_Object *parent);
             virtual ~BubbleItemContainer();
 
-            void append(Evas_Object *item, Message::Direction direction);
+            void append(BubbleViewItem &item, Message::Direction direction);
             void go();
     };
 }
index 236b5c53a5a0d67aa41827edf6ab7cfa770d7a6f..8d55599593b0736664591093baf0e0577d41a35e 100644 (file)
@@ -35,6 +35,7 @@ namespace Msg
             BubbleViewItem(BubbleEntity &entity);
             virtual ~BubbleViewItem();
 
+            virtual void calculate();
             void setListener(IBubbleViewItemListener *l);
             BubbleEntity &getEntity();
 
index 33062c4bac5d2d84696394e018e49b3ccc451f2d..47c0fb16770ee5b41c45a1006dd13c0ed8717f75 100644 (file)
@@ -99,4 +99,3 @@ void BubbleBgViewItem::applyColor(Evas_Object *obj) const
 {
     applyColor(obj, m_BgType);
 }
-
index 0a45d963dd88e316ff9e926cae32f62ffd884387..851841047b2c478506230e412e75f417c9b0a192 100644 (file)
@@ -42,7 +42,6 @@ BubbleIconTextLayoutItem::BubbleIconTextLayoutItem(BubbleEntity &entity, Evas_Ob
     }
 
     m_pIconTextLayout = addLayout(getEo(), CONV_LIST_BUBBLE_EDJ_PATH, group);
-    evas_object_smart_calculate(m_pIconTextLayout);
     setContent(m_pIconTextLayout);
 }
 
@@ -84,3 +83,9 @@ BubbleIconTextLayoutItem::LayoutType BubbleIconTextLayoutItem::getLayoutType() c
 {
     return m_LayoutType;
 }
+
+void BubbleIconTextLayoutItem::calculate()
+{
+    evas_object_smart_calculate(m_pIconTextLayout);
+    BubbleBgViewItem::calculate();
+}
index ab7ce5fd8aa6915b9f371c5b655bc946017540a0..a2d00d133b3a821a9e5789dd0383d97acc525db6 100644 (file)
@@ -42,7 +42,7 @@ BubbleItemContainer::~BubbleItemContainer()
 {
 }
 
-void BubbleItemContainer::append(Evas_Object *item, Message::Direction direction)
+void BubbleItemContainer::append(BubbleViewItem &item, Message::Direction direction)
 {
     const char *itemType = evas_object_type_get(item);
     if(strcmp(itemType, "elm_button") == 0)
@@ -52,8 +52,8 @@ void BubbleItemContainer::append(Evas_Object *item, Message::Direction direction
     else
         evas_object_size_hint_align_set(item, 0.0, EVAS_HINT_FILL);
 
-    evas_object_smart_calculate(item);
-    evas_object_show(item);
+    item.calculate();
+    item.show();
     elm_box_pack_end(getEo(), item);
 }
 
index 48416d36c56b52bb1ffde0d2c2c020e66adb3637..3d170503a3333620770ebbf77a50fd9a18fe315b 100644 (file)
@@ -72,3 +72,8 @@ void BubbleViewItem::emitActionEvent()
     if(m_pListener)
         m_pListener->onAction(*this);
 }
+
+void BubbleViewItem::calculate()
+{
+    evas_object_smart_calculate(getEo());
+}