1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-30 08:11:17 +00:00

Dont hardcode web gui URL

This commit is contained in:
Felix Ableitner 2017-07-21 12:18:02 +09:00
parent a9b80fbdc4
commit 2f1d5f1ff2

View file

@ -94,7 +94,7 @@ public class WebGuiActivity extends SyncthingActivity
@Override @Override
public boolean shouldOverrideUrlLoading(WebView view, String url) { public boolean shouldOverrideUrlLoading(WebView view, String url) {
Uri uri = Uri.parse(url); Uri uri = Uri.parse(url);
if(uri.getHost().equals("127.0.0.1")) { if(uri.getHost().equals(getService().getWebGuiUrl().getHost())) {
return false; return false;
} else { } else {
startActivity(new Intent(Intent.ACTION_VIEW, uri)); startActivity(new Intent(Intent.ACTION_VIEW, uri));