mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-19 10:45:13 +01:00
Fix position and icon of the PopupMenu
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
7bbe954d47
commit
a44e714f13
@ -1562,7 +1562,7 @@ class ChatController(args: Bundle) :
|
|||||||
PopupMenu(
|
PopupMenu(
|
||||||
ContextThemeWrapper(view?.context, R.style.appActionBarPopupMenu),
|
ContextThemeWrapper(view?.context, R.style.appActionBarPopupMenu),
|
||||||
view,
|
view,
|
||||||
if (message?.user?.id == conversationUser?.userId) Gravity.END else Gravity.START
|
if (message?.user?.id == currentConversation?.actorType + "/" + currentConversation?.actorId) Gravity.END else Gravity.START
|
||||||
).apply {
|
).apply {
|
||||||
setOnMenuItemClickListener { item ->
|
setOnMenuItemClickListener { item ->
|
||||||
when (item?.itemId) {
|
when (item?.itemId) {
|
||||||
@ -1739,6 +1739,9 @@ class ChatController(args: Bundle) :
|
|||||||
currentConversation?.type != Conversation.ConversationType.ROOM_TYPE_ONE_TO_ONE_CALL
|
currentConversation?.type != Conversation.ConversationType.ROOM_TYPE_ONE_TO_ONE_CALL
|
||||||
menu.findItem(R.id.action_delete_message).isVisible = isShowMessageDeletionButton(message)
|
menu.findItem(R.id.action_delete_message).isVisible = isShowMessageDeletionButton(message)
|
||||||
if (menu.hasVisibleItems()) {
|
if (menu.hasVisibleItems()) {
|
||||||
|
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.Q) {
|
||||||
|
setForceShowIcon(true)
|
||||||
|
}
|
||||||
show()
|
show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
5
app/src/main/res/drawable/ic_content_copy.xml
Normal file
5
app/src/main/res/drawable/ic_content_copy.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<vector android:autoMirrored="true" android:height="24dp"
|
||||||
|
android:tint="@color/medium_emphasis_text" android:viewportHeight="24.0"
|
||||||
|
android:viewportWidth="24.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="#FF000000" android:pathData="M16,1L4,1c-1.1,0 -2,0.9 -2,2v14h2L4,3h12L16,1zM19,5L8,5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h11c1.1,0 2,-0.9 2,-2L21,7c0,-1.1 -0.9,-2 -2,-2zM19,21L8,21L8,7h11v14z"/>
|
||||||
|
</vector>
|
25
app/src/main/res/drawable/ic_delete.xml
Normal file
25
app/src/main/res/drawable/ic_delete.xml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<!--
|
||||||
|
~ Nextcloud Talk application
|
||||||
|
~
|
||||||
|
~ @author Mario Danic
|
||||||
|
~ Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
|
||||||
|
~
|
||||||
|
~ This program is free software: you can redistribute it and/or modify
|
||||||
|
~ it under the terms of the GNU General Public License as published by
|
||||||
|
~ the Free Software Foundation, either version 3 of the License, or
|
||||||
|
~ at your option) any later version.
|
||||||
|
~
|
||||||
|
~ This program is distributed in the hope that it will be useful,
|
||||||
|
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
~ GNU General Public License for more details.
|
||||||
|
~
|
||||||
|
~ You should have received a copy of the GNU General Public License
|
||||||
|
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<vector android:autoMirrored="true" android:height="24dp"
|
||||||
|
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="@color/medium_emphasis_text" android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7H6v12zM19,4h-3.5l-1,-1h-5l-1,1H5v2h14V4z"/>
|
||||||
|
</vector>
|
5
app/src/main/res/drawable/ic_reply.xml
Normal file
5
app/src/main/res/drawable/ic_reply.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<vector android:autoMirrored="true" android:height="24dp"
|
||||||
|
android:tint="@color/medium_emphasis_text" android:viewportHeight="24.0"
|
||||||
|
android:viewportWidth="24.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="#FF000000" android:pathData="M10,9V5l-7,7 7,7v-4.1c5,0 8.5,1.6 11,5.1 -1,-5 -4,-10 -11,-11z"/>
|
||||||
|
</vector>
|
@ -4,25 +4,25 @@
|
|||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_copy_message"
|
android:id="@+id/action_copy_message"
|
||||||
android:icon="@drawable/ic_content_copy_white_24dp"
|
android:icon="@drawable/ic_content_copy"
|
||||||
android:title="@string/nc_copy_message"
|
android:title="@string/nc_copy_message"
|
||||||
app:showAsAction="always" />
|
app:showAsAction="always" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_reply_to_message"
|
android:id="@+id/action_reply_to_message"
|
||||||
android:icon="@drawable/ic_reply_white_24dp"
|
android:icon="@drawable/ic_reply"
|
||||||
android:title="@string/nc_reply"
|
android:title="@string/nc_reply"
|
||||||
app:showAsAction="always" />
|
app:showAsAction="always" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_reply_privately"
|
android:id="@+id/action_reply_privately"
|
||||||
android:icon="@drawable/ic_reply_white_24dp"
|
android:icon="@drawable/ic_reply"
|
||||||
android:title="@string/nc_reply_privately"
|
android:title="@string/nc_reply_privately"
|
||||||
app:showAsAction="always" />
|
app:showAsAction="always" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_delete_message"
|
android:id="@+id/action_delete_message"
|
||||||
android:icon="@drawable/ic_delete_white_24dp"
|
android:icon="@drawable/ic_delete"
|
||||||
android:title="@string/nc_delete_message"
|
android:title="@string/nc_delete_message"
|
||||||
app:showAsAction="always" />
|
app:showAsAction="always" />
|
||||||
</menu>
|
</menu>
|
Loading…
Reference in New Issue
Block a user