Skip to content

Use invoke operator to execute usecases - #4136

Closed
abelgardep wants to merge 1 commit into
owncloud:masterfrom
abelgardep:technical/usecase_invoke
Closed

abelgardep wants to merge 1 commit into
owncloud:masterfrom
abelgardep:technical/usecase_invoke

Conversation

@abelgardep

Copy link
Copy Markdown
Contributor

Minimal refactor. It removes all the execute verbosity for use cases.

Previous approach:
fun execute(params: Params): Type = run(params)

Operator approach:
operator fun invoke(params: Params): Type = run(params)

Instead of useCase.execute(useCaseParams), operator allows us to useCase(useCaseParams)

If you are OK with the current execute approach, just close the PR 👍


QA

@jesmrec

jesmrec commented Aug 21, 2023

Copy link
Copy Markdown
Member

Will review. Thanks a lot!!

@JuancaG05 JuancaG05 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 👍 Thanks a lot @abelgardep! I think this will be very handy and more understandable 😃

@JuancaG05

Copy link
Copy Markdown
Contributor

There are some conflicts after we merged other PR, could you solve them please? 🙏 @abelgardep

@abelgardep
abelgardep force-pushed the technical/usecase_invoke branch from 5599d07 to 499e367 Compare September 10, 2023 20:43
@abelgardep

Copy link
Copy Markdown
Contributor Author

Done @JuancaG05 🍻

@JuancaG05

Copy link
Copy Markdown
Contributor

I think there's something related with the library that is not correctly rebased @abelgardep, could you check please? You can see that builds are not correctly created in the latest BitRise triggers. Let's move this on as soon as it is correctly rebased 🚀

@abelgardep

Copy link
Copy Markdown
Contributor Author

Overseeded by #4179

PR updated and pushed within oC. It should be easier to fix any issue this way.

@JuancaG05

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants