mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-09 23:53:04 +00:00
extract bundle keys
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
af31d8a703
commit
ed19792204
@ -2168,8 +2168,8 @@ class ChatController(args: Bundle) :
|
||||
}
|
||||
R.id.action_forward_message -> {
|
||||
val bundle = Bundle()
|
||||
bundle.putBoolean("forwardMessage", true)
|
||||
bundle.putString("forwardMessageText", message?.text)
|
||||
bundle.putBoolean(BundleKeys.KEY_FORWARD_MSG_FLAG, true)
|
||||
bundle.putString(BundleKeys.KEY_FORWARD_MSG_TEXT, message?.text)
|
||||
getRouter().pushController(
|
||||
RouterTransaction.with(ConversationsListController(bundle))
|
||||
.pushChangeHandler(HorizontalChangeHandler())
|
||||
|
@ -209,7 +209,7 @@ public class ConversationsListController extends BaseController implements Searc
|
||||
public ConversationsListController(Bundle bundle) {
|
||||
super();
|
||||
setHasOptionsMenu(true);
|
||||
forwardMessage = bundle.getBoolean("forwardMessage");
|
||||
forwardMessage = bundle.getBoolean(BundleKeys.INSTANCE.getKEY_FORWARD_MSG_FLAG());
|
||||
this.bundle = bundle;
|
||||
}
|
||||
|
||||
@ -761,8 +761,8 @@ public class ConversationsListController extends BaseController implements Searc
|
||||
if (showShareToScreen) {
|
||||
shareToScreenWasShown = true;
|
||||
handleSharedData();
|
||||
}else if (forwardMessage) {
|
||||
openConversation(bundle.getString("forwardMessageText"));
|
||||
} else if (forwardMessage) {
|
||||
openConversation(bundle.getString(BundleKeys.INSTANCE.getKEY_FORWARD_MSG_TEXT()));
|
||||
} else {
|
||||
openConversation();
|
||||
}
|
||||
|
@ -68,4 +68,6 @@ object BundleKeys {
|
||||
val KEY_SHARED_TEXT = "KEY_SHARED_TEXT"
|
||||
val KEY_GEOCODING_QUERY = "KEY_GEOCODING_QUERY"
|
||||
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"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user