https://kotlinlang.org logo
#orbit-mvi
Title
# orbit-mvi
r

Rak

12/01/2021, 9:41 AM
Hi, if you have a button that triggers a navigation event, is it worth passing through the VM?
m

Mikolaj Leszczynski

12/01/2021, 9:45 AM
yes if you want to unit test it
a

appmattus

12/01/2021, 11:34 AM
Also can be a good place for later adding analytics
☝️ 2
b

Benoît

12/02/2021, 11:06 AM
I sometimes do and sometimes don't depending on the importance of the click. But haven't been able to settle on a hard rule for this. Do you guys enforce it in your team?
m

Mikolaj Leszczynski

12/02/2021, 11:06 AM
My current team doesn’t use orbit for technical reasons. Epic sad face.
b

Benoît

12/02/2021, 11:09 AM
Even without using Orbit, you must be using a ViewModel or a presenter? I guess the question is, for simple navigation events triggered by user interaction, do you go through the presentation layer?
But yeah epic sad face 😂
m

Mikolaj Leszczynski

12/02/2021, 11:10 AM
Yeah we use presenters and I would go through the presenter always - to be consistent in testing the outcomes
👍 1
10 Views