Skip to content

Adding LiveData and other useful extensions #101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 13, 2021
Merged

Conversation

IvanToplak
Copy link
Contributor

@IvanToplak IvanToplak commented Oct 12, 2021

One Line Summary

Adding LiveData and other useful extensions.
Attempt to resolve ambiguity with View visibility states (i.e. hide = gone), and fade in/out.

Issue(s) Addressed

Closes #100

Steps to Reproduce/Test

Checklist

  • Functionally tested
  • Unit tests created / updated
  • Backend dependencies deployed (if needed)

Copy link
Contributor

@brimanning brimanning left a comment

Choose a reason for hiding this comment

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

👍

import com.rocketinsights.android.viewmodels.event.Event
import com.rocketinsights.android.viewmodels.event.EventObserver

fun <T> MutableLiveData<Event<T>>.postEvent(event: T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice 💯

Copy link
Contributor

@julianfalcionelli julianfalcionelli left a comment

Choose a reason for hiding this comment

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

Great extensions, thanks Ivan 🥇

@IvanToplak IvanToplak merged commit 0bf69aa into master Oct 13, 2021
@IvanToplak IvanToplak deleted the itoplak/livedata-ext branch October 13, 2021 10:30
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.

LiveData and other useful extensions
3 participants