Simplify code

This commit is contained in:
Patric Karlström 2021-01-13 16:26:43 +01:00
parent 722438ba41
commit 09d5db287d

View file

@ -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