fix(mapper): OperaPageViewControllerMapper

This commit is contained in:
rhunk 2023-10-27 15:16:16 +02:00 committed by GitHub
parent 420057a3bd
commit 759a61df46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,6 +26,7 @@ class OperaPageViewControllerMapper : AbstractClassMapper() {
val onDisplayStateChange = clazz.methods.first {
if (it.returnType != "V" || it.parameterTypes.size != 1) return@first false
val firstParameterType = context.getClass(it.parameterTypes[0]) ?: return@first false
if (firstParameterType.type == clazz.type || !firstParameterType.isAbstract()) return@first false
//check if the class contains a field with the enumViewStateClass type
firstParameterType.fields.any { field ->
field.type == viewStateField.type
@ -50,4 +51,4 @@ class OperaPageViewControllerMapper : AbstractClassMapper() {
return
}
}
}
}