Skip to content

Commit 7d9ba97

Browse files
committed
fix: better readable function name + syntax error
Signed-off-by: Florian Ludwig <[email protected]>
1 parent 18629f7 commit 7d9ba97

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

app/src/main/java/com/nextcloud/talk/ui/dialog/MessageActionsDialog.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,8 @@ class MessageActionsDialog(
267267

268268
private fun initEmojiBar(hasReactPermission: Boolean) {
269269
if (hasSpreedFeatureCapability(spreedCapabilities, SpreedFeatures.REACTIONS) &&
270-
isPermitted(hasReactPermission) &&
270+
hasReactPermission &&
271+
isConversationWritable() &&
271272
isReactableMessageType(message)
272273
) {
273274
val recentEmojiManager = RecentEmojiManager(context, MAX_RECENTS)
@@ -354,9 +355,8 @@ class MessageActionsDialog(
354355
}
355356
}
356357

357-
private fun isPermitted(hasPermission: Boolean): Boolean =
358-
hasPermission &&
359-
ConversationEnums.ConversationReadOnlyState.CONVERSATION_READ_ONLY !=
358+
private fun isConversationWritable(): Boolean =
359+
ConversationEnums.ConversationReadOnlyState.CONVERSATION_READ_ONLY !=
360360
currentConversation?.conversationReadOnlyState
361361

362362
private fun isReactableMessageType(message: ChatMessage): Boolean =

app/src/main/java/com/nextcloud/talk/utils/CapabilitiesUtil.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ enum class SpreedFeatures(val value: String) {
6363
IMPORTANT_CONVERSATIONS("important-conversations"),
6464
THREADS("threads"),
6565
PINNED_MESSAGES("pinned-messages"),
66-
SCHEDULED_MESSAGES("scheduled-messages")
66+
SCHEDULED_MESSAGES("scheduled-messages"),
6767
REACT_PERMISSION("react-permission")
6868
}
6969

0 commit comments

Comments
 (0)