Skip to content

Commit

Permalink
解决点击部分https链接直接跳转浏览器的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Justwen committed May 16, 2022
1 parent f6da3bd commit 6c531bb
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public class WebViewClientEx extends WebViewClient {
private List<String> mImgUrlList;

private static final String[] NGA_USER_PROFILE_START = {
"http://bbs.ngacn.cc/nuke.php?func=ucp&username=",
"http://bbs.nga.cn/nuke.php?func=ucp&username=",
"bbs.ngacn.cc/nuke.php?func=ucp&username=",
"bbs.nga.cn/nuke.php?func=ucp&username=",
};

private static final String NGA_USER_PROFILE_END = "&";
Expand Down Expand Up @@ -70,7 +70,7 @@ public void setImgUrls(List<String> list) {

private boolean overrideProfileUrlLoading(Context context, String url) {
for (String profileStart : NGA_USER_PROFILE_START)
if (url.startsWith(profileStart)) {
if (url.contains(profileStart)) {
String data = StringUtils.getStringBetween(url, 0,
profileStart, NGA_USER_PROFILE_END).result;
try {
Expand Down

0 comments on commit 6c531bb

Please sign in to comment.