mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-12 21:27:43 +02:00
fix(music/import-export-settings): integrated into settings
patch
This commit is contained in:
@ -1,34 +0,0 @@
|
||||
package app.revanced.patches.music.misc.importexport.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.intenthook.patch.IntentHookPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
|
||||
@Patch
|
||||
@Name("Import/Export settings")
|
||||
@Description("Import or export settings as text.")
|
||||
@DependsOn(
|
||||
[
|
||||
IntentHookPatch::class,
|
||||
SettingsPatch::class
|
||||
]
|
||||
)
|
||||
@MusicCompatibility
|
||||
class ImportExportPatch : BytecodePatch() {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
||||
SettingsPatch.addMusicPreferenceWithIntent(
|
||||
CategoryType.MISC,
|
||||
"revanced_extended_settings_import_export",
|
||||
""
|
||||
)
|
||||
|
||||
}
|
||||
}
|
@ -174,6 +174,12 @@ class SettingsPatch : AbstractSettingsResourcePatch(
|
||||
}
|
||||
|
||||
override fun close() {
|
||||
addMusicPreferenceWithIntent(
|
||||
CategoryType.MISC,
|
||||
"revanced_extended_settings_import_export",
|
||||
""
|
||||
)
|
||||
|
||||
CategoryType.entries.sorted().forEach {
|
||||
contexts.sortMusicPreferenceCategory(it.value)
|
||||
}
|
||||
|
Reference in New Issue
Block a user