From 09d5db287d63c4dfb28eb03cc6d0182458f0a929 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patric=20Karlstr=C3=B6m?= Date: Wed, 13 Jan 2021 16:26:43 +0100 Subject: [PATCH] Simplify code --- app/src/main/java/io/lbry/browser/MainActivity.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/lbry/browser/MainActivity.java b/app/src/main/java/io/lbry/browser/MainActivity.java index 4947efc5..4eb4ae20 100644 --- a/app/src/main/java/io/lbry/browser/MainActivity.java +++ b/app/src/main/java/io/lbry/browser/MainActivity.java @@ -2988,10 +2988,11 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener } else { try { LbryUri uri = LbryUri.parse(url); + String checkedURL = url.startsWith(LbryUri.PROTO_DEFAULT) ? url : uri.toString(); if (uri.isChannel()) { - openChannelUrl(url.startsWith(LbryUri.PROTO_DEFAULT) ? url : uri.toString()); + openChannelUrl(checkedURL); } else { - openFileUrl(url.startsWith(LbryUri.PROTO_DEFAULT) ? url : uri.toString()); + openFileUrl(checkedURL); } } catch (LbryUriException ex) { // pass