fix:(youtube/return-youtube-dislike): always modify span content of the like button (#1448)

This commit is contained in:
LisoUseInAIKyrios 2023-01-08 11:14:40 +04:00 committed by GitHub
parent 66cf6e9b45
commit 6abb732be4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,7 +59,9 @@ class ReturnYouTubeDislikePatch : BytecodePatch(
val conversionContextParam = 5
val textRefParam = createComponentMethod.parameters.size - 2
val insertIndex = scanResult.stringsScanResult!!.matches.first().index - 2
// insert index must be 0, otherwise UI does not updated correctly in some situations
// such as switching from full screen or when using previous/next overlay buttons.
val insertIndex = 0
createComponentMethod.addInstructions(
insertIndex,