Skip to content

Commit ba0fbbd

Browse files
committed
Fix early initialization of the presenter
1 parent 66b3173 commit ba0fbbd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mvp-processor/src/main/java/com/omegar/mvp_processor/MvpProcessor.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ class MvpProcessor(
144144
.addOriginatingKSFile(classDeclaration.containingFile!!)
145145
.superclass(MVP_PRESENTER_FACTORY.parameterizedBy(presenterClassName))
146146
.addSuperclassConstructorParameter("%T.$presenterType, %T::class", PRESENTER_TYPE, presenterClassName)
147+
.addInitializerBlock(CodeBlock.of( "$viewStateName.Companion"))
147148
.also { builder ->
148149
val pairParams: List<Pair<String, KSValueParameter>> =
149150
classDeclaration.primaryConstructor!!.parameters.map { parameter ->

0 commit comments

Comments
 (0)