From 7e2644f16b799cc2e5e9e4b10b38fe6a8a953406 Mon Sep 17 00:00:00 2001 From: Denis Dolzhenko Date: Fri, 2 Sep 2016 11:08:30 +0300 Subject: [PATCH] TizenRefApp-7054 Text character counter has view "0/0" Change-Id: I9fb492b1ba75a26dd0f6e9c1b655da9b1be77277 Signed-off-by: Denis Dolzhenko --- src/Conversation/Body/Controller/inc/Body.h | 2 +- src/Conversation/Body/Controller/src/Body.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Conversation/Body/Controller/inc/Body.h b/src/Conversation/Body/Controller/inc/Body.h index 4ab041f..2ea4fa4 100644 --- a/src/Conversation/Body/Controller/inc/Body.h +++ b/src/Conversation/Body/Controller/inc/Body.h @@ -123,7 +123,7 @@ namespace Msg ConvList &m_ConvList; std::string m_MmsTextFilePath; MsgTextMetric m_TextMetric; - bool m_TextMetricUpdated; + bool m_TextMetricNeedUpdate; int m_Utf8TextSize; }; diff --git a/src/Conversation/Body/Controller/src/Body.cpp b/src/Conversation/Body/Controller/src/Body.cpp index cfe4670..01f8ebf 100644 --- a/src/Conversation/Body/Controller/src/Body.cpp +++ b/src/Conversation/Body/Controller/src/Body.cpp @@ -52,7 +52,7 @@ Body::Body(Evas_Object *parent, App &app, WorkingDirRef workingDir, ConvList &co , m_AutoFocusForAttachments(true) , m_ConvList(convList) , m_TextMetric() - , m_TextMetricUpdated(false) + , m_TextMetricNeedUpdate(true) , m_Utf8TextSize(0) { m_AttachmentHandler.setListener(this); @@ -153,12 +153,12 @@ void Body::setMmsRecipFlag(bool value) void Body::updateTextMetricIfNeeded() { - if(m_TextMetricUpdated) + if(m_TextMetricNeedUpdate) { std::string text = getPlainUtf8Text(); m_Utf8TextSize = text.length(); MsgEngine::calculateTextMetric(text, m_TextMetric); - m_TextMetricUpdated = false; + m_TextMetricNeedUpdate = false; } } @@ -505,7 +505,7 @@ void Body::notifyContentChanged() void Body::onContentChanged() { - m_TextMetricUpdated = true; + m_TextMetricNeedUpdate = true; notifyContentChanged(); } -- 2.7.4