Long text detail view now respects text size preference.

Fixes #8747
This commit is contained in:
Greyson Parrelli 2019-04-09 09:40:32 -04:00
parent bceb9b4972
commit 38bcc6c293

View File

@ -12,6 +12,7 @@ import android.text.SpannableString;
import android.text.method.LinkMovementMethod; import android.text.method.LinkMovementMethod;
import android.text.style.URLSpan; import android.text.style.URLSpan;
import android.text.util.Linkify; import android.text.util.Linkify;
import android.util.TypedValue;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
@ -30,6 +31,7 @@ import org.thoughtcrime.securesms.recipients.Recipient;
import org.thoughtcrime.securesms.recipients.RecipientModifiedListener; import org.thoughtcrime.securesms.recipients.RecipientModifiedListener;
import org.thoughtcrime.securesms.util.DynamicLanguage; import org.thoughtcrime.securesms.util.DynamicLanguage;
import org.thoughtcrime.securesms.util.DynamicTheme; import org.thoughtcrime.securesms.util.DynamicTheme;
import org.thoughtcrime.securesms.util.TextSecurePreferences;
import org.thoughtcrime.securesms.util.ThemeUtil; import org.thoughtcrime.securesms.util.ThemeUtil;
import org.thoughtcrime.securesms.util.Util; import org.thoughtcrime.securesms.util.Util;
import org.thoughtcrime.securesms.util.views.Stub; import org.thoughtcrime.securesms.util.views.Stub;
@ -151,6 +153,7 @@ public class LongMessageActivity extends PassphraseRequiredActionBarActivity imp
bubble.setVisibility(View.VISIBLE); bubble.setVisibility(View.VISIBLE);
text.setText(linkifyMessageBody(new SpannableString(message.get().getFullBody()))); text.setText(linkifyMessageBody(new SpannableString(message.get().getFullBody())));
text.setMovementMethod(LinkMovementMethod.getInstance()); text.setMovementMethod(LinkMovementMethod.getInstance());
text.setTextSize(TypedValue.COMPLEX_UNIT_SP, TextSecurePreferences.getMessageBodyTextSize(this));
footer.setMessageRecord(message.get().getMessageRecord(), dynamicLanguage.getCurrentLocale()); footer.setMessageRecord(message.get().getMessageRecord(), dynamicLanguage.getCurrentLocale());
}); });
} }