mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-22 21:15:30 +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.clearConversationHistory.setOnClickListener { showClearHistoryDialog() }
|
||||||
binding.addParticipantsAction.setOnClickListener { addParticipants() }
|
binding.addParticipantsAction.setOnClickListener { addParticipants() }
|
||||||
|
|
||||||
binding.shareConversationButton.setOnClickListener {
|
|
||||||
ShareUtils.shareConversationLink(
|
|
||||||
this,
|
|
||||||
conversationUser.baseUrl,
|
|
||||||
conversation?.token,
|
|
||||||
conversation?.name
|
|
||||||
)
|
|
||||||
}
|
|
||||||
viewModel.getRoom(conversationUser, conversationToken)
|
viewModel.getRoom(conversationUser, conversationToken)
|
||||||
|
|
||||||
themeTextViews()
|
themeTextViews()
|
||||||
|
@ -211,8 +203,8 @@ class ConversationInfoActivity :
|
||||||
is ConversationInfoViewModel.GetRoomSuccessState -> {
|
is ConversationInfoViewModel.GetRoomSuccessState -> {
|
||||||
conversation = state.conversationModel
|
conversation = state.conversationModel
|
||||||
viewModel.getCapabilities(conversationUser, conversationToken, conversation!!)
|
viewModel.getCapabilities(conversationUser, conversationToken, conversation!!)
|
||||||
if (conversation?.name != context.getString(R.string.note_to_self)) {
|
if (conversation?.name == context.getString(R.string.note_to_self)) {
|
||||||
binding.shareConversationButton.visibility = VISIBLE
|
binding.shareConversationButton.visibility = GONE
|
||||||
}
|
}
|
||||||
binding.shareConversationButton.setOnClickListener {
|
binding.shareConversationButton.setOnClickListener {
|
||||||
ShareUtils.shareConversationLink(
|
ShareUtils.shareConversationLink(
|
||||||
|
@ -881,11 +873,9 @@ class ConversationInfoActivity :
|
||||||
val v: String = resources.getStringArray(R.array.message_expiring_values)[position]
|
val v: String = resources.getStringArray(R.array.message_expiring_values)[position]
|
||||||
databaseStorageModule!!.saveString("conversation_settings_dropdown", v)
|
databaseStorageModule!!.saveString("conversation_settings_dropdown", v)
|
||||||
}
|
}
|
||||||
|
binding.messageExpirationSettings.visibility = VISIBLE
|
||||||
binding.conversationSettingsDropdown.visibility = VISIBLE
|
|
||||||
binding.conversationInfoExpireMessagesExplanation.visibility = VISIBLE
|
|
||||||
} else {
|
} else {
|
||||||
binding.conversationSettings.visibility = GONE
|
binding.messageExpirationSettings.visibility = GONE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -233,34 +233,41 @@
|
||||||
android:textSize="@dimen/headline_text_size"
|
android:textSize="@dimen/headline_text_size"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<LinearLayout
|
||||||
android:id="@+id/conversation_info_chat_settings_input_layout"
|
android:id="@+id/message_expiration_settings"
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="@dimen/standard_margin"
|
android:orientation="vertical">
|
||||||
android:layout_marginTop="@dimen/standard_half_margin"
|
|
||||||
android:hint="@string/nc_expire_messages">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.MaterialAutoCompleteTextView
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/conversation_settings_dropdown"
|
android:id="@+id/conversation_info_chat_settings_input_layout"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:inputType="none"
|
android:layout_marginHorizontal="@dimen/standard_margin"
|
||||||
android:lines="1"
|
android:layout_marginTop="@dimen/standard_half_margin"
|
||||||
android:popupTheme="@style/ThemeOverlay.AppTheme.PopupMenu"
|
android:hint="@string/nc_expire_messages">
|
||||||
android:text="" />
|
|
||||||
|
|
||||||
</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
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
android:id="@+id/conversation_info_expire_messages_explanation"
|
|
||||||
android:layout_width="match_parent"
|
<com.google.android.material.textview.MaterialTextView
|
||||||
android:layout_height="wrap_content"
|
android:id="@+id/conversation_info_expire_messages_explanation"
|
||||||
android:layout_margin="@dimen/standard_margin"
|
android:layout_width="match_parent"
|
||||||
android:text="@string/nc_expire_messages_explanation"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="@color/disabled_text"
|
android:layout_margin="@dimen/standard_margin"
|
||||||
android:textSize="@dimen/supporting_text_text_size" />
|
android:text="@string/nc_expire_messages_explanation"
|
||||||
|
android:textColor="@color/disabled_text"
|
||||||
|
android:textSize="@dimen/supporting_text_text_size" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/share_conversation_button"
|
android:id="@+id/share_conversation_button"
|
||||||
|
@ -271,7 +278,6 @@
|
||||||
android:paddingEnd="@dimen/standard_margin"
|
android:paddingEnd="@dimen/standard_margin"
|
||||||
android:paddingBottom="@dimen/standard_half_margin"
|
android:paddingBottom="@dimen/standard_half_margin"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:visibility = "gone"
|
|
||||||
android:background="?android:attr/selectableItemBackground">
|
android:background="?android:attr/selectableItemBackground">
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -329,8 +329,7 @@ How to translate with transifex:
|
||||||
<string name="nc_call_name">Conversation name</string>
|
<string name="nc_call_name">Conversation name</string>
|
||||||
<string name="create_conversation">Create conversation</string>
|
<string name="create_conversation">Create conversation</string>
|
||||||
<string name="nc_add_emojis">Add emojis</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>
|
<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>
|
<string name="nc_conversation_description">Conversation description</string>
|
||||||
|
|
||||||
<!-- Expiring messages -->
|
<!-- Expiring messages -->
|
||||||
<string name="message_expiration_title">Message expiration</string>
|
|
||||||
<string name="nc_expire_messages">Expire chat messages</string>
|
<string name="nc_expire_messages">Expire chat messages</string>
|
||||||
<string name="nc_expire_message_off">Off</string>
|
<string name="nc_expire_message_off">Off</string>
|
||||||
<string name="nc_expire_message_four_weeks">4 weeks</string>
|
<string name="nc_expire_message_four_weeks">4 weeks</string>
|
||||||
|
|
Loading…
Reference in a new issue