Skip to content

Commit

Permalink
Merge pull request #115 from sunfkny/fix-user-profile
Browse files Browse the repository at this point in the history
参照版面和帖子,优化用户信息链接数组的初始化方式
  • Loading branch information
Justwen authored Oct 15, 2022
2 parents 1dff2c6 + 90aff36 commit ee8d282
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ public class WebViewClientEx extends WebViewClient {

private List<String> mImgUrlList;

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

private static final String NGA_USER_PROFILE_END = "&";

Expand All @@ -43,17 +38,23 @@ public class WebViewClientEx extends WebViewClient {

private static final String NGA_THREAD = "/thread.php?";

private static final String NGA_USER_PROFILE = "/nuke.php?func=ucp&username=";

private static String[] sReadPrefix;

private static String[] sThreadPrefix;

private static String[] NGA_USER_PROFILE_START;

static {
String[] domains = ContextUtils.getContext().getResources().getStringArray(R.array.nga_domain_no_http);
sThreadPrefix = new String[domains.length];
sReadPrefix = new String[domains.length];
NGA_USER_PROFILE_START = new String[domains.length];
for (int i = 0; i < domains.length; i++) {
sThreadPrefix[i] = domains[i] + NGA_THREAD;
sReadPrefix[i] = domains[i] + NGA_READ;
NGA_USER_PROFILE_START[i] = domains[i] + NGA_USER_PROFILE;
}
}

Expand Down

0 comments on commit ee8d282

Please sign in to comment.