File tree Expand file tree Collapse file tree
app/src/main/java/me/iacn/biliroaming Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -242,6 +242,22 @@ class JsonHook(classLoader: ClassLoader) : BaseHook(classLoader) {
242242 }
243243 title in hides
244244 }
245+
246+ // liveTip
247+ // 就是通常在 我的 -> 创做中心 下 但不属于创作中心的提示
248+ result.getObjectFieldOrNull(" liveTip" )?.let { liveTip ->
249+ val text = liveTip.getObjectFieldAs<String >(" text" )
250+ val id = liveTip.getObjectField(" id" ).toString()
251+ val url = liveTip.getObjectFieldAs<String >(" url" )
252+ val showing = id !in hides
253+ drawerItems.add(BottomItem (
254+ name = text, id = id, uri = url, showing = showing
255+ ))
256+ if (! showing) {
257+ result.setObjectField(" liveTip" , null )
258+ }
259+ }
260+
245261 }
246262 accountMineClass.findFieldOrNull(" vipSectionRight" )?.set(result, null )
247263 if (sPrefs.getBoolean(" custom_theme" , false )) {
Original file line number Diff line number Diff line change @@ -438,3 +438,23 @@ fun Context.inflateLayout(
438438fun Context.addModuleAssets () {
439439 resources.assets.callMethod(" addAssetPath" , XposedInit .modulePath)
440440}
441+
442+ @OptIn(ExperimentalStdlibApi ::class )
443+ fun Any.dumpToString (): String {
444+ val sb = StringBuilder ()
445+ sb.append(" ---- ${this .javaClass.name} @${this .hashCode().toHexString()} dump begin ----\n " )
446+ fun dumpClassFields (clazz : Class <* >) {
447+ clazz.fields.forEach { field ->
448+ if (field.isStatic) return @forEach
449+ field.isAccessible = true
450+ val v = field.get(this )
451+ sb.append(" ${field.name} : $v \n " )
452+ }
453+ clazz.superclass?.let {
454+ dumpClassFields(it)
455+ }
456+ }
457+ dumpClassFields(this .javaClass)
458+ sb.append(" ---- ${this .javaClass.name} @${this .hashCode().toHexString()} dump end ----" )
459+ return sb.toString()
460+ }
You can’t perform that action at this time.
0 commit comments