Apply monospaced setting also to preview / webview

This commit is contained in:
M66B 2019-03-26 17:04:57 +00:00
parent f27ef3390e
commit 30fcceda91
1 changed files with 3 additions and 1 deletions

View File

@ -608,6 +608,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
bindFlagged(message);
// Message text preview
tvPreview.setTypeface(monospaced ? Typeface.MONOSPACE : Typeface.DEFAULT, Typeface.ITALIC);
tvPreview.setText(message.preview);
tvPreview.setVisibility(preview && !TextUtils.isEmpty(message.preview) ? View.VISIBLE : View.GONE);
@ -1446,6 +1447,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
TypedValue.COMPLEX_UNIT_PX, textSize,
context.getResources().getDisplayMetrics()));
settings.setDefaultFontSize(px);
if (monospaced)
settings.setStandardFontFamily("monospace");
webView.setWebViewClient(new WebViewClient() {