mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-12 10:32:36 +00:00
use conversationType to check if share button should be shown for conversation
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
080937305a
commit
f628d357ea
@ -203,7 +203,7 @@ class ConversationInfoActivity :
|
||||
is ConversationInfoViewModel.GetRoomSuccessState -> {
|
||||
conversation = state.conversationModel
|
||||
viewModel.getCapabilities(conversationUser, conversationToken, conversation!!)
|
||||
if (conversation?.name == context.getString(R.string.note_to_self)) {
|
||||
if (ConversationUtils.isNoteToSelfConversation(conversation)) {
|
||||
binding.shareConversationButton.visibility = GONE
|
||||
}
|
||||
binding.shareConversationButton.setOnClickListener {
|
||||
|
@ -214,6 +214,11 @@ data class Conversation(
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated("Use ConversationUtil")
|
||||
fun isNoteToSelfConversation(): Boolean {
|
||||
return type == ConversationType.NOTE_TO_SELF
|
||||
}
|
||||
|
||||
enum class NotificationLevel {
|
||||
DEFAULT,
|
||||
ALWAYS,
|
||||
|
@ -125,7 +125,7 @@ class ConversationsListBottomDialog(
|
||||
conversation.isNameEditable(currentUser)
|
||||
)
|
||||
binding.conversationLinkShare.visibility = setVisibleIf(
|
||||
conversation.name != context.getString(R.string.note_to_self)
|
||||
!conversation.isNoteToSelfConversation()
|
||||
)
|
||||
|
||||
binding.conversationOperationDelete.visibility = setVisibleIf(
|
||||
|
@ -785,6 +785,5 @@ How to translate with transifex:
|
||||
<string name="get_invitations_error">Failed to fetch pending invitations</string>
|
||||
<string name="message_last_edited_by">Edited by %1$s</string>
|
||||
<string name="share_link_to_conversation">Join conversation %1$s at %2$s</string>
|
||||
<string name="note_to_self">Note to self</string>
|
||||
<string name="nc_conversation_settings">Conversation settings</string>
|
||||
</resources>
|
||||
|
Loading…
Reference in New Issue
Block a user