mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -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() {
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user