mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-19 11:39:42 +01:00
Merge pull request #5029 from nextcloud/backport/5023/stable-21.1
[stable-21.1] Fix & rearrange options in conversation button menu
This commit is contained in:
commit
3b7bf2bbd4
@ -118,7 +118,6 @@ class ConversationsListBottomDialog(
|
|||||||
currentUser.capabilities?.spreedCapability!!,
|
currentUser.capabilities?.spreedCapability!!,
|
||||||
SpreedFeatures.FAVORITES
|
SpreedFeatures.FAVORITES
|
||||||
)
|
)
|
||||||
val canModerate = ConversationUtils.canModerate(conversation, currentUser.capabilities?.spreedCapability!!)
|
|
||||||
|
|
||||||
binding.conversationRemoveFromFavorites.visibility = setVisibleIf(
|
binding.conversationRemoveFromFavorites.visibility = setVisibleIf(
|
||||||
hasFavoritesCapability && conversation.favorite
|
hasFavoritesCapability && conversation.favorite
|
||||||
@ -149,14 +148,11 @@ class ConversationsListBottomDialog(
|
|||||||
)
|
)
|
||||||
|
|
||||||
binding.conversationOperationDelete.visibility = setVisibleIf(
|
binding.conversationOperationDelete.visibility = setVisibleIf(
|
||||||
canModerate
|
conversation.canDeleteConversation
|
||||||
)
|
)
|
||||||
|
|
||||||
binding.conversationOperationLeave.visibility = setVisibleIf(
|
binding.conversationOperationLeave.visibility = setVisibleIf(
|
||||||
conversation.canLeaveConversation &&
|
conversation.canLeaveConversation
|
||||||
// leaving is by api not possible for the last user with moderator permissions.
|
|
||||||
// for now, hide this option for all moderators.
|
|
||||||
!ConversationUtils.canModerate(conversation, currentUser.capabilities!!.spreedCapability!!)
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -195,37 +195,6 @@
|
|||||||
android:textSize="@dimen/bottom_sheet_text_size" />
|
android:textSize="@dimen/bottom_sheet_text_size" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/conversation_archive"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="@dimen/bottom_sheet_item_height"
|
|
||||||
android:background="?android:attr/selectableItemBackground"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingStart="@dimen/standard_padding"
|
|
||||||
android:paddingEnd="@dimen/standard_padding"
|
|
||||||
tools:ignore="UseCompoundDrawables">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:contentDescription="@null"
|
|
||||||
android:src="@drawable/outline_archive_24"
|
|
||||||
app:tint="@color/high_emphasis_menu_icon" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/conversation_archive_text"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="start|center_vertical"
|
|
||||||
android:paddingStart="40dp"
|
|
||||||
android:paddingEnd="@dimen/zero"
|
|
||||||
android:text="@string/archive_conversation"
|
|
||||||
android:textAlignment="viewStart"
|
|
||||||
android:textColor="@color/high_emphasis_text"
|
|
||||||
android:textSize="@dimen/bottom_sheet_text_size" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/conversation_operation_rename"
|
android:id="@+id/conversation_operation_rename"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -257,7 +226,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/conversation_operation_delete"
|
android:id="@+id/conversation_archive"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/bottom_sheet_item_height"
|
android:layout_height="@dimen/bottom_sheet_item_height"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
@ -271,16 +240,17 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:contentDescription="@null"
|
android:contentDescription="@null"
|
||||||
android:src="@drawable/ic_delete_grey600_24dp"
|
android:src="@drawable/outline_archive_24"
|
||||||
app:tint="@color/high_emphasis_menu_icon" />
|
app:tint="@color/high_emphasis_menu_icon" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/conversation_archive_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="start|center_vertical"
|
android:layout_gravity="start|center_vertical"
|
||||||
android:paddingStart="40dp"
|
android:paddingStart="40dp"
|
||||||
android:paddingEnd="@dimen/zero"
|
android:paddingEnd="@dimen/zero"
|
||||||
android:text="@string/nc_delete_call"
|
android:text="@string/archive_conversation"
|
||||||
android:textAlignment="viewStart"
|
android:textAlignment="viewStart"
|
||||||
android:textColor="@color/high_emphasis_text"
|
android:textColor="@color/high_emphasis_text"
|
||||||
android:textSize="@dimen/bottom_sheet_text_size" />
|
android:textSize="@dimen/bottom_sheet_text_size" />
|
||||||
@ -316,6 +286,36 @@
|
|||||||
android:textSize="@dimen/bottom_sheet_text_size" />
|
android:textSize="@dimen/bottom_sheet_text_size" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/conversation_operation_delete"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/bottom_sheet_item_height"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingStart="@dimen/standard_padding"
|
||||||
|
android:paddingEnd="@dimen/standard_padding"
|
||||||
|
tools:ignore="UseCompoundDrawables">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:contentDescription="@null"
|
||||||
|
android:src="@drawable/ic_delete_grey600_24dp"
|
||||||
|
app:tint="@color/high_emphasis_menu_icon" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="start|center_vertical"
|
||||||
|
android:paddingStart="40dp"
|
||||||
|
android:paddingEnd="@dimen/zero"
|
||||||
|
android:text="@string/nc_delete_call"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:textColor="@color/high_emphasis_text"
|
||||||
|
android:textSize="@dimen/bottom_sheet_text_size" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
Loading…
Reference in New Issue
Block a user