Fix a bug with unpacking&packing user

Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2019-02-15 13:07:39 +01:00
parent b1356ff0d1
commit 5498ad6990
6 changed files with 8 additions and 9 deletions

View file

@ -153,7 +153,7 @@ public class CallNotificationController extends BaseController {
this.roomId = args.getString(BundleKeys.KEY_ROOM_ID, "");
this.currentConversation = Parcels.unwrap(args.getParcelable(BundleKeys.KEY_ROOM));
this.userBeingCalled = Parcels.unwrap(args.getParcelable(BundleKeys.KEY_USER_ENTITY));
this.userBeingCalled = args.getParcelable(BundleKeys.KEY_USER_ENTITY);
this.originalBundle = args;

View file

@ -407,7 +407,7 @@ public class ChatController extends BaseController implements MessagesListAdapte
private void showConversationInfoScreen() {
Bundle bundle = new Bundle();
bundle.putParcelable(BundleKeys.KEY_USER_ENTITY, Parcels.wrap(conversationUser));
bundle.putParcelable(BundleKeys.KEY_USER_ENTITY, conversationUser);
bundle.putString(BundleKeys.KEY_BASE_URL, conversationUser.getBaseUrl());
bundle.putString(BundleKeys.KEY_ROOM_TOKEN, roomToken);
getRouter().pushController((RouterTransaction.with(new ConversationInfoController(bundle))
@ -1012,7 +1012,7 @@ public class ChatController extends BaseController implements MessagesListAdapte
Bundle bundle = new Bundle();
bundle.putString(BundleKeys.KEY_ROOM_TOKEN, roomToken);
bundle.putString(BundleKeys.KEY_ROOM_ID, roomId);
bundle.putParcelable(BundleKeys.KEY_USER_ENTITY, Parcels.wrap(conversationUser));
bundle.putParcelable(BundleKeys.KEY_USER_ENTITY, conversationUser);
bundle.putString(BundleKeys.KEY_CONVERSATION_PASSWORD, roomPassword);
bundle.putString(BundleKeys.KEY_MODIFIED_BASE_URL, conversationUser.getBaseUrl());

View file

@ -281,7 +281,7 @@ public class ContactsController extends BaseController implements SearchView.OnQ
public void onNext(RoomOverall roomOverall) {
Intent conversationIntent = new Intent(getActivity(), MagicCallActivity.class);
Bundle bundle = new Bundle();
bundle.putParcelable(BundleKeys.KEY_USER_ENTITY, Parcels.wrap(currentUser));
bundle.putParcelable(BundleKeys.KEY_USER_ENTITY, currentUser);
bundle.putString(BundleKeys.KEY_ROOM_TOKEN, roomOverall.getOcs().getData().getToken());
bundle.putString(BundleKeys.KEY_ROOM_ID, roomOverall.getOcs().getData().getRoomId());
@ -889,7 +889,7 @@ public class ContactsController extends BaseController implements SearchView.OnQ
if (getActivity() != null) {
Intent conversationIntent = new Intent(getActivity(), MagicCallActivity.class);
Bundle bundle = new Bundle();
bundle.putParcelable(BundleKeys.KEY_USER_ENTITY, Parcels.wrap(currentUser));
bundle.putParcelable(BundleKeys.KEY_USER_ENTITY, currentUser);
bundle.putString(BundleKeys.KEY_ROOM_TOKEN, roomOverall.getOcs().getData().getToken());
bundle.putString(BundleKeys.KEY_ROOM_ID, roomOverall.getOcs().getData().getRoomId());
conversationIntent.putExtras(bundle);

View file

@ -119,7 +119,7 @@ public class ConversationInfoController extends BaseController {
super(args);
setHasOptionsMenu(true);
NextcloudTalkApplication.getSharedApplication().getComponentApplication().inject(this);
conversationUser = Parcels.unwrap(args.getParcelable(BundleKeys.KEY_USER_ENTITY));
conversationUser = args.getParcelable(BundleKeys.KEY_USER_ENTITY);
conversationToken = args.getString(BundleKeys.KEY_ROOM_TOKEN);
baseUrl = args.getString(BundleKeys.KEY_BASE_URL);
credentials = ApiUtils.getCredentials(conversationUser.getUsername(), conversationUser.getToken());

View file

@ -663,7 +663,7 @@ public class OperationsMenuController extends BaseController {
eventBus.post(new BottomSheetLockEvent(true, 0, true, true));
Bundle bundle = new Bundle();
bundle.putString(BundleKeys.KEY_ROOM_TOKEN, conversation.getToken());
bundle.putParcelable(BundleKeys.KEY_USER_ENTITY, Parcels.wrap(currentUser));
bundle.putParcelable(BundleKeys.KEY_USER_ENTITY, currentUser);
if (baseUrl != null && !baseUrl.equals(currentUser.getBaseUrl())) {
bundle.putString(BundleKeys.KEY_MODIFIED_BASE_URL, baseUrl);
}

View file

@ -467,8 +467,7 @@ public class NotificationWorker extends Worker {
bundle.putString(BundleKeys.KEY_ROOM_TOKEN, decryptedPushMessage.getId());
}
bundle.putParcelable(BundleKeys.KEY_USER_ENTITY, Parcels.wrap(signatureVerification
.getUserEntity()));
bundle.putParcelable(BundleKeys.KEY_USER_ENTITY, signatureVerification.getUserEntity());
bundle.putBoolean(BundleKeys.KEY_FROM_NOTIFICATION_START_CALL,
startACall);