diff --git a/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt b/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt index dc80c46e4..5eee74f0c 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt +++ b/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt @@ -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()) diff --git a/app/src/main/java/com/nextcloud/talk/controllers/ConversationsListController.java b/app/src/main/java/com/nextcloud/talk/controllers/ConversationsListController.java index fd24e0c49..62eb5611d 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/ConversationsListController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/ConversationsListController.java @@ -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 diff --git a/app/src/main/java/com/nextcloud/talk/utils/bundle/BundleKeys.kt b/app/src/main/java/com/nextcloud/talk/utils/bundle/BundleKeys.kt index 30518a126..ff862156b 100644 --- a/app/src/main/java/com/nextcloud/talk/utils/bundle/BundleKeys.kt +++ b/app/src/main/java/com/nextcloud/talk/utils/bundle/BundleKeys.kt @@ -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" }