From 080937305a2538643ab0b342a3580907a3098812 Mon Sep 17 00:00:00 2001 From: sowjanyakch Date: Mon, 15 Apr 2024 16:50:27 +0200 Subject: [PATCH] Make conversation settings visible Signed-off-by: sowjanyakch --- .../ConversationInfoActivity.kt | 18 ++----- .../res/layout/activity_conversation_info.xml | 50 +++++++++++-------- app/src/main/res/values/strings.xml | 4 +- 3 files changed, 33 insertions(+), 39 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/conversationinfo/ConversationInfoActivity.kt b/app/src/main/java/com/nextcloud/talk/conversationinfo/ConversationInfoActivity.kt index 64771b088..0c9a0dd14 100644 --- a/app/src/main/java/com/nextcloud/talk/conversationinfo/ConversationInfoActivity.kt +++ b/app/src/main/java/com/nextcloud/talk/conversationinfo/ConversationInfoActivity.kt @@ -187,14 +187,6 @@ class ConversationInfoActivity : binding.clearConversationHistory.setOnClickListener { showClearHistoryDialog() } binding.addParticipantsAction.setOnClickListener { addParticipants() } - binding.shareConversationButton.setOnClickListener { - ShareUtils.shareConversationLink( - this, - conversationUser.baseUrl, - conversation?.token, - conversation?.name - ) - } viewModel.getRoom(conversationUser, conversationToken) themeTextViews() @@ -211,8 +203,8 @@ class ConversationInfoActivity : is ConversationInfoViewModel.GetRoomSuccessState -> { conversation = state.conversationModel viewModel.getCapabilities(conversationUser, conversationToken, conversation!!) - if (conversation?.name != context.getString(R.string.note_to_self)) { - binding.shareConversationButton.visibility = VISIBLE + if (conversation?.name == context.getString(R.string.note_to_self)) { + binding.shareConversationButton.visibility = GONE } binding.shareConversationButton.setOnClickListener { ShareUtils.shareConversationLink( @@ -881,11 +873,9 @@ class ConversationInfoActivity : val v: String = resources.getStringArray(R.array.message_expiring_values)[position] databaseStorageModule!!.saveString("conversation_settings_dropdown", v) } - - binding.conversationSettingsDropdown.visibility = VISIBLE - binding.conversationInfoExpireMessagesExplanation.visibility = VISIBLE + binding.messageExpirationSettings.visibility = VISIBLE } else { - binding.conversationSettings.visibility = GONE + binding.messageExpirationSettings.visibility = GONE } } diff --git a/app/src/main/res/layout/activity_conversation_info.xml b/app/src/main/res/layout/activity_conversation_info.xml index 0d9fb8304..8efae01e0 100644 --- a/app/src/main/res/layout/activity_conversation_info.xml +++ b/app/src/main/res/layout/activity_conversation_info.xml @@ -233,34 +233,41 @@ android:textSize="@dimen/headline_text_size" android:textStyle="bold" /> - + android:orientation="vertical"> - + android:layout_marginHorizontal="@dimen/standard_margin" + android:layout_marginTop="@dimen/standard_half_margin" + android:hint="@string/nc_expire_messages"> - + - + + + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 8f94031c5..2b66ea95a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -329,8 +329,7 @@ How to translate with transifex: Conversation name Create conversation Add emojis - %1$s invitation - \nPassword: %1$s + Push-to-talk @@ -713,7 +712,6 @@ How to translate with transifex: Conversation description - Message expiration Expire chat messages Off 4 weeks