Skip to content

Conversation

@shahzadansari
Copy link
Contributor

🎯 Goal

Fix "MessageTopBar Preview is broken" issue #192

🛠 Implementation details

@Composable WhatsAppMessageTopBar takes WhatsAppMessagesViewModel as a parameter and since we cannot instantiate ViewModel in Previews, it doesn't render the Preview.

Before

Screenshot 2024-03-17 at 4 15 03 PM

After

Screenshot 2024-03-17 at 4 14 04 PM

✍️ Explain examples

Setup a callback to trigger a function in ViewModel instead (takes videoCall flag as a param to be passed onto VM).

@Composable
fun WhatsAppMessageTopBar(
  .
  navigateToVideoCall: (Boolean) -> Unit,
  .
)

@shahzadansari shahzadansari requested a review from skydoves as a code owner March 17, 2024 11:25
Copy link
Contributor

@skydoves skydoves left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@skydoves skydoves enabled auto-merge March 18, 2024 01:22
@skydoves skydoves merged commit b1cff4d into GetStream:main Mar 18, 2024
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.

2 participants