From: Denis Dolzhenko Date: Fri, 2 Sep 2016 08:08:30 +0000 (+0300) Subject: TizenRefApp-7054 Text character counter has view "0/0" X-Git-Tag: submit/tizen/20160906.075759^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7e2644f16b799cc2e5e9e4b10b38fe6a8a953406;p=profile%2Fmobile%2Fapps%2Fnative%2Fmessage.git TizenRefApp-7054 Text character counter has view "0/0" Change-Id: I9fb492b1ba75a26dd0f6e9c1b655da9b1be77277 Signed-off-by: Denis Dolzhenko --- 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(); }