mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-19 10:45:13 +01:00
parent
fdbe2ff3aa
commit
0614ba8178
@ -442,6 +442,18 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|||||||
messageInputView.getButton().setContentDescription(getResources()
|
messageInputView.getButton().setContentDescription(getResources()
|
||||||
.getString(R.string.nc_description_send_message_button));
|
.getString(R.string.nc_description_send_message_button));
|
||||||
|
|
||||||
|
if (conversationUser.hasSpreedCapabilityWithName("mention-flag") && getActivity() != null) {
|
||||||
|
getActivity().findViewById(R.id.toolbar).setOnClickListener(v -> {
|
||||||
|
Bundle bundle = new Bundle();
|
||||||
|
bundle.putParcelable(BundleKeys.KEY_USER_ENTITY, Parcels.wrap(conversationUser));
|
||||||
|
bundle.putString(BundleKeys.KEY_BASE_URL, baseUrl);
|
||||||
|
bundle.putString(BundleKeys.KEY_ROOM_TOKEN, roomToken);
|
||||||
|
getRouter().pushController((RouterTransaction.with(new ConversationInfoController(bundle))
|
||||||
|
.pushChangeHandler(new VerticalChangeHandler())
|
||||||
|
.popChangeHandler(new VerticalChangeHandler())));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (adapterWasNull) {
|
if (adapterWasNull) {
|
||||||
// we're starting
|
// we're starting
|
||||||
if (TextUtils.isEmpty(roomToken)) {
|
if (TextUtils.isEmpty(roomToken)) {
|
||||||
@ -516,6 +528,11 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
|
|
||||||
|
if (getActivity() != null) {
|
||||||
|
getActivity().findViewById(R.id.toolbar).setOnClickListener(null);
|
||||||
|
}
|
||||||
|
|
||||||
adapter = null;
|
adapter = null;
|
||||||
inChat = false;
|
inChat = false;
|
||||||
ApplicationWideCurrentRoomHolder.getInstance().clear();
|
ApplicationWideCurrentRoomHolder.getInstance().clear();
|
||||||
@ -974,12 +991,6 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|||||||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||||
super.onCreateOptionsMenu(menu, inflater);
|
super.onCreateOptionsMenu(menu, inflater);
|
||||||
inflater.inflate(R.menu.menu_conversation, menu);
|
inflater.inflate(R.menu.menu_conversation, menu);
|
||||||
|
|
||||||
if (conversationUser.hasSpreedCapabilityWithName("mention-flag")) {
|
|
||||||
menu.findItem(R.id.nc_conversation_info).setVisible(true);
|
|
||||||
} else {
|
|
||||||
menu.findItem(R.id.nc_conversation_info).setVisible(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -995,15 +1006,6 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|||||||
case R.id.conversation_voice_call:
|
case R.id.conversation_voice_call:
|
||||||
startACall(true);
|
startACall(true);
|
||||||
return true;
|
return true;
|
||||||
case R.id.nc_conversation_info:
|
|
||||||
Bundle bundle = new Bundle();
|
|
||||||
bundle.putParcelable(BundleKeys.KEY_USER_ENTITY, Parcels.wrap(conversationUser));
|
|
||||||
bundle.putString(BundleKeys.KEY_BASE_URL, baseUrl);
|
|
||||||
bundle.putString(BundleKeys.KEY_ROOM_TOKEN, roomToken);
|
|
||||||
getRouter().pushController((RouterTransaction.with(new ConversationInfoController(bundle))
|
|
||||||
.pushChangeHandler(new VerticalChangeHandler())
|
|
||||||
.popChangeHandler(new VerticalChangeHandler())));
|
|
||||||
return true;
|
|
||||||
default:
|
default:
|
||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
}
|
}
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
<!--
|
|
||||||
~ 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:tint="#FFFFFF" 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="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,17h-2v-6h2v6zM13,9h-2L11,7h2v2z"/>
|
|
||||||
</vector>
|
|
@ -34,12 +34,4 @@
|
|||||||
android:orderInCategory="1"
|
android:orderInCategory="1"
|
||||||
android:title="@string/nc_conversation_menu_video_call"
|
android:title="@string/nc_conversation_menu_video_call"
|
||||||
app:showAsAction="ifRoom|withText" />
|
app:showAsAction="ifRoom|withText" />
|
||||||
|
|
||||||
<item
|
|
||||||
android:id="@+id/nc_conversation_info"
|
|
||||||
android:icon="@drawable/ic_info_black_24dp"
|
|
||||||
android:orderInCategory="2"
|
|
||||||
android:title="@string/nc_conversation_menu_conversation_info"
|
|
||||||
android:visible="false"
|
|
||||||
app:showAsAction="ifRoom|withText" />
|
|
||||||
</menu>
|
</menu>
|
||||||
|
@ -215,7 +215,6 @@ Find Nextcloud on https://nextcloud.com</string>
|
|||||||
<string name="nc_date_header_today">Today</string>
|
<string name="nc_date_header_today">Today</string>
|
||||||
<string name="nc_conversation_menu_voice_call">Voice call</string>
|
<string name="nc_conversation_menu_voice_call">Voice call</string>
|
||||||
<string name="nc_conversation_menu_video_call">Video call</string>
|
<string name="nc_conversation_menu_video_call">Video call</string>
|
||||||
<string name="nc_conversation_menu_conversation_info">Conversation info</string>
|
|
||||||
<string name="nc_new_messages">New messages</string>
|
<string name="nc_new_messages">New messages</string>
|
||||||
<string name="nc_no_messages_yet">No messages yet</string>
|
<string name="nc_no_messages_yet">No messages yet</string>
|
||||||
<string name="nc_chat_you">You</string>
|
<string name="nc_chat_you">You</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user