Skip to content

Commit 4dddc2d

Browse files
committed
Add flag for controlling mute user action independently from mute channel
1 parent ded7183 commit 4dddc2d

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

stream-chat-android-compose/api/stream-chat-android-compose.api

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,22 +1200,24 @@ public final class io/getstream/chat/android/compose/ui/components/channels/Chan
12001200
public final class io/getstream/chat/android/compose/ui/components/channels/ChannelOptionItemVisibility {
12011201
public static final field $stable I
12021202
public fun <init> ()V
1203-
public fun <init> (ZZZZZZ)V
1204-
public synthetic fun <init> (ZZZZZZILkotlin/jvm/internal/DefaultConstructorMarker;)V
1203+
public fun <init> (ZZZZZZZ)V
1204+
public synthetic fun <init> (ZZZZZZZILkotlin/jvm/internal/DefaultConstructorMarker;)V
12051205
public final fun component1 ()Z
12061206
public final fun component2 ()Z
12071207
public final fun component3 ()Z
12081208
public final fun component4 ()Z
12091209
public final fun component5 ()Z
12101210
public final fun component6 ()Z
1211-
public final fun copy (ZZZZZZ)Lio/getstream/chat/android/compose/ui/components/channels/ChannelOptionItemVisibility;
1212-
public static synthetic fun copy$default (Lio/getstream/chat/android/compose/ui/components/channels/ChannelOptionItemVisibility;ZZZZZZILjava/lang/Object;)Lio/getstream/chat/android/compose/ui/components/channels/ChannelOptionItemVisibility;
1211+
public final fun component7 ()Z
1212+
public final fun copy (ZZZZZZZ)Lio/getstream/chat/android/compose/ui/components/channels/ChannelOptionItemVisibility;
1213+
public static synthetic fun copy$default (Lio/getstream/chat/android/compose/ui/components/channels/ChannelOptionItemVisibility;ZZZZZZZILjava/lang/Object;)Lio/getstream/chat/android/compose/ui/components/channels/ChannelOptionItemVisibility;
12131214
public fun equals (Ljava/lang/Object;)Z
12141215
public fun hashCode ()I
12151216
public final fun isArchiveChannelVisible ()Z
12161217
public final fun isDeleteChannelVisible ()Z
12171218
public final fun isLeaveChannelVisible ()Z
12181219
public final fun isMuteChannelVisible ()Z
1220+
public final fun isMuteUserVisible ()Z
12191221
public final fun isPinChannelVisible ()Z
12201222
public final fun isViewInfoVisible ()Z
12211223
public fun toString ()Ljava/lang/String;

stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/channels/ChannelOptionItemVisibility.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ package io.getstream.chat.android.compose.ui.components.channels
2222
* @param isViewInfoVisible Visibility of the view channel info option.
2323
* @param isLeaveChannelVisible Visibility of the leave channel option.
2424
* @param isMuteChannelVisible Visibility of the mute channel option.
25+
* @param isMuteUserVisible Visibility of the mute user option (DM channels only).
2526
* @param isArchiveChannelVisible Visibility of the archive channel option.
2627
* @param isPinChannelVisible Visibility of the pin channel option.
2728
* @param isDeleteChannelVisible Visibility of the delete channel option.
@@ -32,6 +33,7 @@ public data class ChannelOptionItemVisibility(
3233
val isViewInfoVisible: Boolean = true,
3334
val isLeaveChannelVisible: Boolean = true,
3435
val isMuteChannelVisible: Boolean = true,
36+
val isMuteUserVisible: Boolean = true,
3537
val isArchiveChannelVisible: Boolean = false,
3638
val isPinChannelVisible: Boolean = false,
3739
val isDeleteChannelVisible: Boolean = true,

stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/channels/ChannelOptions.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ private fun buildDmChannelActions(
169169
onViewInfoAction = onViewInfoAction,
170170
),
171171
buildDmMuteUserAction(
172-
isVisible = optionVisibility.isMuteChannelVisible,
172+
isVisible = optionVisibility.isMuteUserVisible,
173173
otherUserId = otherUserId,
174174
selectedChannel = selectedChannel,
175175
viewModel = viewModel,

0 commit comments

Comments
 (0)