fix: find resource by correct name

This commit is contained in:
oSumAtrIX 2023-07-10 20:31:36 +02:00
parent 3d8856b29a
commit 7e562f3fb3
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -11,7 +11,7 @@ import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
@DependsOn([ResourceMappingPatch::class]) @DependsOn([ResourceMappingPatch::class])
class BottomSheetHookResourcePatch : ResourcePatch { class BottomSheetHookResourcePatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult { override fun execute(context: ResourceContext): PatchResult {
bottomSheetMargins = ResourceMappingPatch.resourceMappings.find { it.name == "bottomSheetMargins" }?.id bottomSheetMargins = ResourceMappingPatch.resourceMappings.find { it.name == "bottom_sheet_margins" }?.id
?: return PatchResultError("Could not find resource") ?: return PatchResultError("Could not find resource")
return PatchResultSuccess() return PatchResultSuccess()