Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Conversation

@WonderCsabo
Copy link
Member

#2048

This commit contains a bigger refactor as well: the previous
implementation contained HasLifecycleMethods interface, which was
implemented by most all the components, even if they do not have
the specific methods. This is now changed.

case OnAttachOnDetach:
registerBlock = holder.getOnAttachAfterSuperBlock();
unregisterBlock = holder.getOnDetachBeforeSuperBlock();

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is now rather ugly, but this is the price for removing the invalid abstraction HasLifecycleMethods. Do you have a better idea? @dodgex

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently i cant think of a better way to solve this. :/

@WonderCsabo WonderCsabo force-pushed the 2048_illegalStateExceptionReceiver branch from bc8aba4 to 86cc04f Compare October 31, 2017 19:21
dodgex
dodgex previously approved these changes Oct 31, 2017
Copy link
Member

@dodgex dodgex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beside the one unnecessary new line i think this is okay. If you do not want to update the pr for that space i'm okay with that. :D

return getInitBodyInjectionBlock();
}


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unnecessary newline? :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

case OnAttachOnDetach:
registerBlock = holder.getOnAttachAfterSuperBlock();
unregisterBlock = holder.getOnDetachBeforeSuperBlock();

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently i cant think of a better way to solve this. :/

androidannotations#2048

This commit contains a bigger refactor as well: the previous
implementation contained HasLifecycleMethods interface, which was
implemented by most all the components, even if they do not have
the specific methods. This is now changed.
@dodgex dodgex merged commit 19569cf into androidannotations:develop Nov 1, 2017
@dodgex
Copy link
Member

dodgex commented Nov 1, 2017

Thanks

@dodgex dodgex added this to the 4.4 milestone Nov 1, 2017
@WonderCsabo WonderCsabo deleted the 2048_illegalStateExceptionReceiver branch February 15, 2019 21:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants