Skip to content

fix: Snackbar message in profile #1993

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 3 commits into from
Jun 24, 2019
Merged

Conversation

liveHarshit
Copy link
Member

Fixes #1979

@auto-label auto-label bot added the fix label Jun 22, 2019
@liveHarshit
Copy link
Member Author

This is a workaround.
In view model -

private val mutableMessage = SingleLiveEvent<String>()
val message: LiveData<String> = mutableMessage

In fragment's on create view -

profileViewModel.message
            .nonNull()
            .observe(viewLifecycleOwner, Observer {
                rootView.snackbar(it)
                profileViewModel.mutableMessage.postValue(null)
            })

Any better solution?

@liveHarshit liveHarshit requested a review from anhanh11001 June 22, 2019 04:18
@nikit19 nikit19 merged commit 0b48185 into fossasia:development Jun 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Snackbar message is displaying incorrectly in profile
3 participants