summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatertwitter.cpp
diff options
context:
space:
mode:
authorCho <cho@lindenlab.com>2013-11-13 21:38:19 +0000
committerCho <cho@lindenlab.com>2013-11-13 21:38:19 +0000
commit758f656100406015bc8b27284670088decbbfabb (patch)
tree711f4bc0df60d1aae61012b726d2bb122b0faa49 /indra/newview/llfloatertwitter.cpp
parentb267f6754efd2c77042fd4a3f6d2397eac461ce2 (diff)
made Twitter status text truncate and untruncate for ACME-1183
Diffstat (limited to 'indra/newview/llfloatertwitter.cpp')
-rw-r--r--indra/newview/llfloatertwitter.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/newview/llfloatertwitter.cpp b/indra/newview/llfloatertwitter.cpp
index 6f8ad109c6..06d0fb5542 100644
--- a/indra/newview/llfloatertwitter.cpp
+++ b/indra/newview/llfloatertwitter.cpp
@@ -119,9 +119,18 @@ void LLTwitterPhotoPanel::draw()
{
int max_status_length = add_photo ? 100 : 140;
status_text_box->setMaxTextLength(max_status_length);
+ if (!add_photo)
+ {
+ if (mOldStatusText.length() > status_text_box->getText().length() && status_text_box->getText() == mOldStatusText.substr(0, status_text_box->getText().length()))
+ {
+ status_text_box->setText(mOldStatusText);
+ }
+ mOldStatusText = "";
+ }
if (status_text_box->getText().length() > max_status_length)
{
- status_text_box->setText(status_text_box->getText().substr(0, max_status_length));
+ mOldStatusText = status_text_box->getText();
+ status_text_box->setText(mOldStatusText.substr(0, max_status_length));
}
}