mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-22 13:05:31 +03:00
Make conversation settings visible
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
parent
287ba3bbc9
commit
080937305a
3 changed files with 33 additions and 39 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -233,34 +233,41 @@
|
|||
android:textSize="@dimen/headline_text_size"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/conversation_info_chat_settings_input_layout"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||
<LinearLayout
|
||||
android:id="@+id/message_expiration_settings"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/standard_margin"
|
||||
android:layout_marginTop="@dimen/standard_half_margin"
|
||||
android:hint="@string/nc_expire_messages">
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.textfield.MaterialAutoCompleteTextView
|
||||
android:id="@+id/conversation_settings_dropdown"
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/conversation_info_chat_settings_input_layout"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="none"
|
||||
android:lines="1"
|
||||
android:popupTheme="@style/ThemeOverlay.AppTheme.PopupMenu"
|
||||
android:text="" />
|
||||
android:layout_marginHorizontal="@dimen/standard_margin"
|
||||
android:layout_marginTop="@dimen/standard_half_margin"
|
||||
android:hint="@string/nc_expire_messages">
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
<com.google.android.material.textfield.MaterialAutoCompleteTextView
|
||||
android:id="@+id/conversation_settings_dropdown"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="none"
|
||||
android:lines="1"
|
||||
android:popupTheme="@style/ThemeOverlay.AppTheme.PopupMenu"
|
||||
android:text="" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/conversation_info_expire_messages_explanation"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/standard_margin"
|
||||
android:text="@string/nc_expire_messages_explanation"
|
||||
android:textColor="@color/disabled_text"
|
||||
android:textSize="@dimen/supporting_text_text_size" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/conversation_info_expire_messages_explanation"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/standard_margin"
|
||||
android:text="@string/nc_expire_messages_explanation"
|
||||
android:textColor="@color/disabled_text"
|
||||
android:textSize="@dimen/supporting_text_text_size" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/share_conversation_button"
|
||||
|
@ -271,7 +278,6 @@
|
|||
android:paddingEnd="@dimen/standard_margin"
|
||||
android:paddingBottom="@dimen/standard_half_margin"
|
||||
android:orientation="horizontal"
|
||||
android:visibility = "gone"
|
||||
android:background="?android:attr/selectableItemBackground">
|
||||
|
||||
|
||||
|
|
|
@ -329,8 +329,7 @@ How to translate with transifex:
|
|||
<string name="nc_call_name">Conversation name</string>
|
||||
<string name="create_conversation">Create conversation</string>
|
||||
<string name="nc_add_emojis">Add emojis</string>
|
||||
<string name="nc_share_subject">%1$s invitation</string>
|
||||
<string name="nc_share_text_pass">\nPassword: %1$s</string>
|
||||
|
||||
|
||||
|
||||
<string name="nc_push_to_talk">Push-to-talk</string>
|
||||
|
@ -713,7 +712,6 @@ How to translate with transifex:
|
|||
<string name="nc_conversation_description">Conversation description</string>
|
||||
|
||||
<!-- Expiring messages -->
|
||||
<string name="message_expiration_title">Message expiration</string>
|
||||
<string name="nc_expire_messages">Expire chat messages</string>
|
||||
<string name="nc_expire_message_off">Off</string>
|
||||
<string name="nc_expire_message_four_weeks">4 weeks</string>
|
||||
|
|
Loading…
Reference in a new issue