Fix getRedditUriByPath in LinkResolverActivity.

This commit is contained in:
Docile-Alligator 2022-03-25 16:48:35 +08:00
parent c87b724a24
commit 8ac8ea3d8b

View File

@ -60,8 +60,12 @@ public class LinkResolverActivity extends AppCompatActivity {
CustomThemeWrapper mCustomThemeWrapper; CustomThemeWrapper mCustomThemeWrapper;
private Uri getRedditUriByPath(String path) { private Uri getRedditUriByPath(String path) {
if (path.charAt(0) != '/') {
return Uri.parse("https://www.reddit.com/" + path);
} else {
return Uri.parse("https://www.reddit.com" + path); return Uri.parse("https://www.reddit.com" + path);
} }
}
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {