Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Commit

Permalink
Fix casting error, bump version 1.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
kmod-midori committed Feb 3, 2017
1 parent 49b3a3f commit 7268ad6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
9 changes: 5 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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"
}

Expand Down
11 changes: 3 additions & 8 deletions app/src/main/kotlin/moe/reimu/weiboxposed/Module.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 7268ad6

Please sign in to comment.