Skip to content
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

[PBE-5678] Expose some components needed to build custom MessagesScreen #5370

Merged
merged 2 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@
### ⬆️ Improved

### ✅ Added
- Add `PollDialogs` component used to show poll dialogs. [#5370](https://github.com/GetStream/stream-chat-android/pull/5370)
- Add `MessageDialogs` component used to prompt the user with message flagging and deletion actions. [#5370](https://github.com/GetStream/stream-chat-android/pull/5370)
- Add `MessageModerationDialog` component used for message that needs to be moderated. [#5370](https://github.com/GetStream/stream-chat-android/pull/5370)
- Add `AttachmentsPickerMenu` component used to show the attachment picker menu. [#5370](https://github.com/GetStream/stream-chat-android/pull/5370)
- Add `MessageMenus` component used to prompt the user with message actions. [#5370](https://github.com/GetStream/stream-chat-android/pull/5370)

### ⚠️ Changed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1436,7 +1436,12 @@ public final class io/getstream/chat/android/compose/ui/composables/AudioWaveSee
}

public final class io/getstream/chat/android/compose/ui/messages/MessagesScreenKt {
public static final fun AttachmentsPickerMenu (Landroidx/compose/foundation/layout/BoxScope;Lio/getstream/chat/android/compose/viewmodel/messages/MessageListViewModel;Lio/getstream/chat/android/compose/viewmodel/messages/AttachmentsPickerViewModel;Lio/getstream/chat/android/compose/viewmodel/messages/MessageComposerViewModel;Landroidx/compose/runtime/Composer;I)V
public static final fun MessageDialogs (Lio/getstream/chat/android/compose/viewmodel/messages/MessageListViewModel;Landroidx/compose/runtime/Composer;I)V
public static final fun MessageMenus (Landroidx/compose/foundation/layout/BoxScope;Lio/getstream/chat/android/compose/viewmodel/messages/MessageListViewModel;Lio/getstream/chat/android/compose/viewmodel/messages/MessageComposerViewModel;ZZLandroidx/compose/runtime/Composer;I)V
public static final fun MessageModerationDialog (Lio/getstream/chat/android/compose/viewmodel/messages/MessageListViewModel;Lio/getstream/chat/android/compose/viewmodel/messages/MessageComposerViewModel;ZZLandroidx/compose/runtime/Composer;I)V
public static final fun MessagesScreen (Lio/getstream/chat/android/compose/viewmodel/messages/MessagesViewModelFactory;ZLio/getstream/chat/android/models/ReactionSorting;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;ZZLio/getstream/chat/android/compose/ui/messages/list/ThreadMessagesStart;Lio/getstream/chat/android/compose/state/messages/attachments/StatefulStreamMediaRecorder;Landroidx/compose/runtime/Composer;III)V
public static final fun PollDialogs (Lio/getstream/chat/android/compose/viewmodel/messages/MessageListViewModel;Landroidx/compose/runtime/Composer;I)V
}

public final class io/getstream/chat/android/compose/ui/messages/attachments/AttachmentsPickerKt {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ public fun MessagesScreen(
* displayed as a link attachment. False by default.
*/
@Composable
private fun BoxScope.MessageMenus(
public fun BoxScope.MessageMenus(
listViewModel: MessageListViewModel,
composerViewModel: MessageComposerViewModel,
skipPushNotification: Boolean,
Expand Down Expand Up @@ -570,9 +570,10 @@ private fun BoxScope.MessagesScreenReactionsPicker(
* @param composerViewModel The [MessageComposerViewModel] used to read state and
* perform actions.
*/
@Suppress("LongMethod")
@OptIn(ExperimentalAnimationApi::class)
@Composable
private fun BoxScope.AttachmentsPickerMenu(
public fun BoxScope.AttachmentsPickerMenu(
listViewModel: MessageListViewModel,
attachmentsPickerViewModel: AttachmentsPickerViewModel,
composerViewModel: MessageComposerViewModel,
Expand Down Expand Up @@ -660,7 +661,7 @@ private fun BoxScope.AttachmentsPickerMenu(
* perform actions.
*/
@Composable
private fun MessageModerationDialog(
public fun MessageModerationDialog(
listViewModel: MessageListViewModel,
composerViewModel: MessageComposerViewModel,
skipPushNotification: Boolean,
Expand Down Expand Up @@ -711,7 +712,7 @@ private fun MessageModerationDialog(
* perform actions.
*/
@Composable
private fun MessageDialogs(listViewModel: MessageListViewModel) {
public fun MessageDialogs(listViewModel: MessageListViewModel) {
val messageActions = listViewModel.messageActions

val deleteAction = messageActions.firstOrNull { it is Delete }
Expand Down Expand Up @@ -748,7 +749,7 @@ private fun MessageDialogs(listViewModel: MessageListViewModel) {
}

@Composable
private fun PollDialogs(listViewModel: MessageListViewModel) {
public fun PollDialogs(listViewModel: MessageListViewModel) {
val dismiss = { listViewModel.displayPollMoreOptions(null) }
val selectedPoll = listViewModel.pollState.selectedPoll

Expand Down
Loading