Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
Signed-off-by: rapterjet2004 <[email protected]>
  • Loading branch information
rapterjet2004 committed Sep 28, 2023
1 parent 59ee526 commit 8cb6807
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2230,7 +2230,7 @@ class ChatActivity :
}

private fun checkShowCallButtons() {
if (isReadOnlyConversation() || shouldShowLobby()) {
if (isReadOnlyConversation() || shouldShowLobby() || isNoteToSelfConversation()) {
disableCallButtons()
} else {
enableCallButtons()
Expand Down Expand Up @@ -2258,6 +2258,10 @@ class ChatActivity :
return false
}

private fun isNoteToSelfConversation() : Boolean {
return currentConversation != null && currentConversation!!.type == ConversationType.NOTE_TO_SELF
}

private fun disableCallButtons() {
if (CapabilitiesUtilNew.isAbleToCall(conversationUser)) {
if (conversationVoiceCallMenuItem != null && conversationVideoMenuItem != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ enum class ConversationType {
ROOM_GROUP_CALL,
ROOM_PUBLIC_CALL,
ROOM_SYSTEM,
FORMER_ONE_TO_ONE
FORMER_ONE_TO_ONE,
NOTE_TO_SELF
}

enum class ParticipantType {
Expand Down

0 comments on commit 8cb6807

Please sign in to comment.