Improved ConversationActivity (bug #32), but it's still not quite there.

GroupActivity needs to receive a similar treatment.
This commit is contained in:
akwizgran
2014-02-07 22:03:29 +00:00
parent 4154119ea5
commit 6a10688112
9 changed files with 130 additions and 65 deletions

View File

@@ -12,7 +12,6 @@ import static org.briarproject.android.util.CommonLayoutParams.MATCH_WRAP_1;
import static org.briarproject.android.util.CommonLayoutParams.WRAP_WRAP_1;
import static org.briarproject.api.Author.Status.VERIFIED;
import java.io.UnsupportedEncodingException;
import java.util.concurrent.Executor;
import java.util.logging.Logger;
@@ -32,6 +31,7 @@ import org.briarproject.api.db.NoSuchMessageException;
import org.briarproject.api.lifecycle.LifecycleManager;
import org.briarproject.api.messaging.GroupId;
import org.briarproject.api.messaging.MessageId;
import org.briarproject.util.StringUtils;
import android.content.Intent;
import android.content.res.Resources;
@@ -227,7 +227,7 @@ implements OnClickListener {
long duration = System.currentTimeMillis() - now;
if(LOG.isLoggable(INFO))
LOG.info("Loading message took " + duration + " ms");
final String text = new String(body, "UTF-8");
final String text = StringUtils.fromUtf8(body);
runOnUiThread(new Runnable() {
public void run() {
content.setText(text);
@@ -247,8 +247,6 @@ implements OnClickListener {
if(LOG.isLoggable(INFO))
LOG.info("Interrupted while waiting for database");
Thread.currentThread().interrupt();
} catch(UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
}
});