FirebaseExtended / make-it-so-android

Apache License 2.0
214 stars 58 forks source link

Refactor view models to use Kotlin Flows. #13

Closed vkryachko closed 1 year ago

marinacoelho commented 1 year ago

Thank you so much @vkryachko for these changes! The services and the view models look great! I checked out the branch and tested all the features, and apart from the two comments I added above, everything is working flawlessly.

A couple of things to keep in mind before merging it:

vkryachko commented 1 year ago

I think I've addressed everything, ptal.

As fore tracing I ended up creating a trace() function which I find similar to @AddTrace() in terms of ergonomics, i.e. one can do something like

suspend fun foo() = trace("hello") {
  // do suspend stuff
}

fun bar() = trace("hello") {
  // do stuff
}

wdyt?

thatfiredev commented 1 year ago

@vkryachko you just reminded me that I have a feature request sitting for almost 2 years: https://github.com/firebase/firebase-android-sdk/issues/2029

vkryachko commented 1 year ago

@thatfiredev haha, nice! It never occurred to me to have a standalone function until I tried to use Trace.create("").trace{ } in an app and it felt a bit too verbose :)