mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-19 03:29:28 +01:00
Merge pull request #5028 from nextcloud/ui_enhancements
UI improvements to automatic conversation deletion information for event, sip and instant meetings conversation
This commit is contained in:
commit
4efba2b953
@ -276,6 +276,8 @@ class ChatActivity :
|
||||
lateinit var conversationInfoViewModel: ConversationInfoViewModel
|
||||
lateinit var messageInputViewModel: MessageInputViewModel
|
||||
|
||||
private var chatMenu: Menu? = null
|
||||
|
||||
private val startSelectContactForResult = registerForActivityResult(
|
||||
ActivityResultContracts
|
||||
.StartActivityForResult()
|
||||
@ -1097,6 +1099,8 @@ class ChatActivity :
|
||||
context.getString(R.string.nc_room_retention),
|
||||
Snackbar.LENGTH_LONG
|
||||
).show()
|
||||
|
||||
chatMenu?.removeItem(R.id.conversation_event)
|
||||
}
|
||||
is ChatViewModel.UnbindRoomUiState.Error -> {
|
||||
Snackbar.make(
|
||||
@ -1232,11 +1236,16 @@ class ChatActivity :
|
||||
bringToFront()
|
||||
}
|
||||
val deleteNoticeText = binding.conversationDeleteNotice.findViewById<TextView>(R.id.deletion_message)
|
||||
viewThemeUtils.material.themeCardView(binding.conversationDeleteNotice)
|
||||
|
||||
deleteNoticeText.text = String.format(
|
||||
resources.getString(R.string.nc_conversation_auto_delete_notice),
|
||||
retentionPeriod
|
||||
)
|
||||
viewThemeUtils.material.colorMaterialButtonPrimaryTonal(
|
||||
binding.conversationDeleteNotice
|
||||
.findViewById<MaterialButton>(R.id.keep_button)
|
||||
)
|
||||
|
||||
if (ConversationUtils.isParticipantOwnerOrModerator(currentConversation!!)) {
|
||||
binding.conversationDeleteNotice.findViewById<MaterialButton>(R.id.delete_now_button).visibility =
|
||||
@ -3034,6 +3043,7 @@ class ChatActivity :
|
||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||
super.onCreateOptionsMenu(menu)
|
||||
menuInflater.inflate(R.menu.menu_conversation, menu)
|
||||
chatMenu = menu
|
||||
|
||||
if (currentConversation?.objectType == ConversationEnums.ObjectType.EVENT) {
|
||||
eventConversationMenuItem = menu.findItem(R.id.conversation_event)
|
||||
@ -3047,7 +3057,6 @@ class ChatActivity :
|
||||
loadAvatarForStatusBar()
|
||||
setActionBarTitle()
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
@ -3138,7 +3147,6 @@ class ChatActivity :
|
||||
private fun showPopupWindow(anchorView: View) {
|
||||
val popupView = layoutInflater.inflate(R.layout.item_event_schedule, null)
|
||||
|
||||
val titleTextView = popupView.findViewById<TextView>(R.id.event_scheduled)
|
||||
val subtitleTextView = popupView.findViewById<TextView>(R.id.meetingTime)
|
||||
|
||||
val popupWindow = PopupWindow(
|
||||
|
@ -12,13 +12,12 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp"
|
||||
android:background="@color/grey_600">
|
||||
android:background="@color/bg_bottom_sheet">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/event_scheduled"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/black"
|
||||
android:text="@string/nc_event_schedule"
|
||||
android:textStyle="bold"
|
||||
android:textSize="18sp" />
|
||||
@ -27,7 +26,6 @@
|
||||
android:id="@+id/meetingTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp"
|
||||
tools:text="Meeting at 8:00 pm"/>
|
||||
|
||||
@ -46,7 +44,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/archive_conversation"
|
||||
android:textColor="@color/black"
|
||||
android:visibility = "gone"
|
||||
|
||||
android:textSize="18sp"
|
||||
@ -57,7 +54,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/unarchive_conversation"
|
||||
android:textColor="@color/black"
|
||||
android:visibility = "gone"
|
||||
android:textSize="18sp"
|
||||
android:paddingTop="24dp"/>
|
||||
|
@ -39,6 +39,7 @@
|
||||
android:textColor="@color/white"
|
||||
app:icon="@drawable/ic_delete"
|
||||
app:iconPadding="8dp"
|
||||
app:iconTint="@color/white"
|
||||
app:iconGravity="textStart"
|
||||
android:backgroundTint="@color/nc_darkRed"
|
||||
android:layout_marginEnd="16dp" />
|
||||
|
Loading…
Reference in New Issue
Block a user