Simplify code
This commit is contained in:
parent
722438ba41
commit
09d5db287d
1 changed files with 3 additions and 2 deletions
|
@ -2988,10 +2988,11 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
LbryUri uri = LbryUri.parse(url);
|
LbryUri uri = LbryUri.parse(url);
|
||||||
|
String checkedURL = url.startsWith(LbryUri.PROTO_DEFAULT) ? url : uri.toString();
|
||||||
if (uri.isChannel()) {
|
if (uri.isChannel()) {
|
||||||
openChannelUrl(url.startsWith(LbryUri.PROTO_DEFAULT) ? url : uri.toString());
|
openChannelUrl(checkedURL);
|
||||||
} else {
|
} else {
|
||||||
openFileUrl(url.startsWith(LbryUri.PROTO_DEFAULT) ? url : uri.toString());
|
openFileUrl(checkedURL);
|
||||||
}
|
}
|
||||||
} catch (LbryUriException ex) {
|
} catch (LbryUriException ex) {
|
||||||
// pass
|
// pass
|
||||||
|
|
Loading…
Reference in a new issue