Skip to content

Commit

Permalink
Support Zhihu 7.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
shatyuka committed Mar 25, 2021
1 parent 9557d24 commit 9f2ab4b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions app/src/main/java/com/shatyuka/zhiliao/Helper.java
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,14 @@ static boolean init(ClassLoader classLoader) {
try {
ContentMixAdapter = classLoader.loadClass("com.zhihu.android.mix.a.a");
getItemCount = ContentMixAdapter.getMethod("getItemCount");
} catch (NoSuchMethodException e) {
ContentMixAdapter = classLoader.loadClass("com.zhihu.android.mix.b.a");
getItemCount = ContentMixAdapter.getMethod("getItemCount");
} catch (Throwable e) {
try {
ContentMixAdapter = classLoader.loadClass("com.zhihu.android.mix.b.a");
getItemCount = ContentMixAdapter.getMethod("getItemCount");
} catch (Throwable e2) {
ContentMixAdapter = classLoader.loadClass("com.zhihu.android.mix.adapter.a");
getItemCount = ContentMixAdapter.getMethod("getItemCount");
}
}
ContentMixPagerFragment = classLoader.loadClass("com.zhihu.android.mix.fragment.ContentMixPagerFragment");
ContentMixAdapter_fragment = ContentMixAdapter.getDeclaredField("f");
Expand Down

0 comments on commit 9f2ab4b

Please sign in to comment.