Skip to content

Commit 5d0e930

Browse files
committed
Fix YT Music ReVanced settings set to the wrong theme.
1 parent bd6236e commit 5d0e930

File tree

1 file changed

+2
-9
lines changed
  • app/src/main/java/io/github/chsbuffer/revancedxposed/music/misc/settings

1 file changed

+2
-9
lines changed

app/src/main/java/io/github/chsbuffer/revancedxposed/music/misc/settings/SettingsPatch.kt

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,12 @@ fun MusicHook.SettingsHook() {
6565

6666
::googleApiActivityFingerprint.hookMethod {
6767
before { param ->
68+
param.invokeOriginalMethod()
6869
val activity = param.thisObject as Activity
6970
val hook = GoogleApiActivityHook.createInstance()
70-
// must set theme before original set theme
71+
GoogleApiActivityHook.initialize(hook, activity)
7172
val musicTheme = Utils.getResourceIdentifier("@style/Theme.YouTubeMusic", "style")
7273
activity.setTheme(musicTheme)
73-
74-
try {
75-
param.invokeOriginalMethod()
76-
} catch (e: Throwable) {
77-
// ignored
78-
}
79-
80-
GoogleApiActivityHook.initialize(hook, activity)
8174
param.result = Unit
8275
}
8376
}

0 commit comments

Comments
 (0)