-
Notifications
You must be signed in to change notification settings - Fork 27
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
fix: bottom sheet state [WPB-9045] #3065
Conversation
Ups 🫰🟨This PR is too big. Please try to break it up into smaller PRs. |
Build 5119 failed. |
Build 5120 succeeded. The build produced the following APK's: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! Just little suggestions 😄
|
||
@Suppress("MagicNumber", "TooManyFunctions", "LongParameterList") | ||
@HiltViewModel | ||
class ConversationCallListViewModel @Inject constructor( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: maybe swap Call
and List
in the name? ConversationListCallViewModel
sounds better to me as it's used in "conversations list" composable and it's purpose is calls, currently it suggest that it's used in "conversation call list", so list of conversation calls? 😄 Also, state is named "ConversationListCallState" so it would match then 😉
) { | ||
var currentConversationItem by remember { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: maybe currentSheetConversationItem
to emphasise that this mutable state is used for the bottom sheet?
|
||
@OptIn(ExperimentalMaterial3Api::class) | ||
@Composable | ||
fun WireModalSheetLayout2( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: maybe mark previous one as deprecated so that it's clear that this one is favourable 😄
Build 5141 succeeded. The build produced the following APK's: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome 😎
Just a small thingy on top of @saleniuk's comments
!( | ||
conversationDetailsResult.conversationDetails is ConversationDetails.Group | ||
&& !(conversationDetailsResult.conversationDetails as ConversationDetails.Group).isSelfUserMember | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit hard to read.
Could you please extract to more readable vals before putting into the if?
Like
val isGroupConversation = ...
Quality Gate passedIssues Measures |
Build 5157 succeeded. The build produced the following APK's: |
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764
The PR Description
What's new in this PR?
SnackBarMessageHandler
to show snackbar messagesHomeSnackBarMessage
to extendSnackBarMessage
WireModalSheetLayout2
for easier state management