diff --git a/src/org/thoughtcrime/securesms/LogViewFragment.java b/src/org/thoughtcrime/securesms/LogViewFragment.java index 6a7633819..7992948ee 100644 --- a/src/org/thoughtcrime/securesms/LogViewFragment.java +++ b/src/org/thoughtcrime/securesms/LogViewFragment.java @@ -98,9 +98,15 @@ public class LogViewFragment extends Fragment { logPreview.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize); } - public void scrollDownLog() { logPreview.setSelection(logPreview.getText().length()); } + public void scrollDownLog() { + logPreview.requestFocus(); + logPreview.setSelection(logPreview.getText().length()); + } - public void scrollUpLog() { logPreview.setSelection(0); } + public void scrollUpLog() { + logPreview.requestFocus(); + logPreview.setSelection(0); + } public boolean saveLogFile() { diff --git a/src/org/thoughtcrime/securesms/WebViewActivity.java b/src/org/thoughtcrime/securesms/WebViewActivity.java index 7057ab94e..193c10d95 100644 --- a/src/org/thoughtcrime/securesms/WebViewActivity.java +++ b/src/org/thoughtcrime/securesms/WebViewActivity.java @@ -53,10 +53,15 @@ public class WebViewActivity extends PassphraseRequiredActionBarActivity @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { if (url != null) { - if (url.startsWith("http://") || url.startsWith("https://") || url.startsWith("mailto:")) { - openOnlineUrl(url); - // URL opened externally, returning `true` causes the WebView to abort loading - return true; + String schema = url.split(":")[0].toLowerCase(); + switch (schema) { + case "http": + case "https": + case "mailto": + case "openpgp4fpr": + openOnlineUrl(url); + // URL opened externally, returning `true` causes the WebView to abort loading + return true; } } // by returning `true`, we also abort loading other URLs in our WebView;