diff --git a/app/build.gradle b/app/build.gradle index 077e902..d92363e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,8 +9,8 @@ android { applicationId "moe.reimu.weiboxposed" minSdkVersion 17 targetSdkVersion 25 - versionCode 9 - versionName "1.5.1" + versionCode 10 + versionName "1.5.2" } buildTypes { release { @@ -27,8 +27,9 @@ android { dependencies { provided 'de.robv.android.xposed:api:82' - compile 'com.android.support:appcompat-v7:25.1.0' - compile 'com.android.support:preference-v7:25.1.0' + provided 'de.robv.android.xposed:api:82:sources' + compile 'com.android.support:appcompat-v7:25.1.1' + compile 'com.android.support:preference-v7:25.1.1' compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" } diff --git a/app/src/main/kotlin/moe/reimu/weiboxposed/Module.kt b/app/src/main/kotlin/moe/reimu/weiboxposed/Module.kt index fe12faf..6aead5f 100644 --- a/app/src/main/kotlin/moe/reimu/weiboxposed/Module.kt +++ b/app/src/main/kotlin/moe/reimu/weiboxposed/Module.kt @@ -82,24 +82,19 @@ class Module : IXposedHookInitPackageResources, IXposedHookLoadPackage, IXposedH val promotion = getObjectField(mblog, "promotion") val title = getObjectField(mblog, "title") - var is_friend_hot = false if (promotion != null) { - val ad_type = getObjectField(promotion, "adtype") as String + val ad_type = getObjectField(promotion, "adtype") as String? logd("detected promotion: adtype") if (remove_hot) { return true } else { // Check for Hot - if ("8" != ad_type) { - return true - } else { - is_friend_hot = true - } + return "8" != ad_type } } - if (title != null && !is_friend_hot) { + if (title != null) { val text = getObjectField(title, "text") as String if ("" != text) { logd("detected promotion: non-empty title")