mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-23 13:35:33 +03:00
Hide own conversation in "forward to" selection screen
Resolves #1567 Signed-off-by: Tim Krüger <t@timkrueger.me>
This commit is contained in:
parent
f297705985
commit
730c85811e
3 changed files with 8 additions and 0 deletions
|
@ -2170,6 +2170,7 @@ class ChatController(args: Bundle) :
|
|||
val bundle = Bundle()
|
||||
bundle.putBoolean(BundleKeys.KEY_FORWARD_MSG_FLAG, true)
|
||||
bundle.putString(BundleKeys.KEY_FORWARD_MSG_TEXT, message?.text)
|
||||
bundle.putString(BundleKeys.KEY_FORWARD_HIDE_SOURCE_ROOM, roomId)
|
||||
getRouter().pushController(
|
||||
RouterTransaction.with(ConversationsListController(bundle))
|
||||
.pushChangeHandler(HorizontalChangeHandler())
|
||||
|
|
|
@ -488,6 +488,12 @@ public class ConversationsListController extends BaseController implements Searc
|
|||
Conversation conversation;
|
||||
for (int i = 0; i < roomsOverall.getOcs().getData().size(); i++) {
|
||||
conversation = roomsOverall.getOcs().getData().get(i);
|
||||
|
||||
if (bundle.containsKey(BundleKeys.INSTANCE.getKEY_FORWARD_HIDE_SOURCE_ROOM()) && conversation.roomId.equals(bundle.getString(
|
||||
BundleKeys.INSTANCE.getKEY_FORWARD_HIDE_SOURCE_ROOM()))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (shouldUseLastMessageLayout) {
|
||||
if (getActivity() != null) {
|
||||
ConversationItem conversationItem = new ConversationItem(conversation
|
||||
|
|
|
@ -70,4 +70,5 @@ object BundleKeys {
|
|||
val KEY_META_DATA = "KEY_META_DATA"
|
||||
val KEY_FORWARD_MSG_FLAG = "KEY_FORWARD_MSG_FLAG"
|
||||
val KEY_FORWARD_MSG_TEXT = "KEY_FORWARD_MSG_TEXT"
|
||||
val KEY_FORWARD_HIDE_SOURCE_ROOM = "KEY_FORWARD_HIDE_SOURCE_ROOM"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue