} else {
styledTextHistory.append(msg);
}
String text = styledTextHistory.getText();
text = text.substring(msgStart,text.length());
if (emoticons != null) {
for (IconDef def : emoticons.getIcons()) {
for (String iconstr : def.text) {
int index = text.indexOf(iconstr);