Skip to content

Commit 1127fa7

Browse files
committed
remove (hopefully unused) code regarding GUEST and USER_FOLLOWING_LINK
I can't reproduce or think of scenarios when this code was used. because bottom dialog is replaced it wouldn't work anymore anyway. If there appear scenarios when the code would have executed, it should be fixed similar like ConversationsListBottomDialog was implemented. Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
1 parent 6a3050f commit 1127fa7

1 file changed

Lines changed: 3 additions & 47 deletions

File tree

app/src/main/java/com/nextcloud/talk/controllers/ConversationsListController.java

Lines changed: 3 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -803,26 +803,6 @@ public boolean onQueryTextSubmit(String query) {
803803
return onQueryTextChange(query);
804804
}
805805

806-
// TODO check when this is executed and if handling is correct
807-
private void prepareAndShowBottomSheetWithBundle(Bundle bundle) {
808-
if (view == null) {
809-
view = getActivity().getLayoutInflater().inflate(R.layout.bottom_sheet, null, false);
810-
}
811-
812-
// if (shouldShowCallMenuController) {
813-
// getChildRouter((ViewGroup) view).setRoot(
814-
// RouterTransaction.with(new CallMenuController(bundle, this))
815-
// .popChangeHandler(new VerticalChangeHandler())
816-
// .pushChangeHandler(new VerticalChangeHandler()));
817-
// } else {
818-
getChildRouter((ViewGroup) view).setRoot(
819-
RouterTransaction.with(new EntryMenuController(bundle))
820-
.popChangeHandler(new VerticalChangeHandler())
821-
.pushChangeHandler(new VerticalChangeHandler()));
822-
823-
// }
824-
}
825-
826806
@Override
827807
protected String getTitle() {
828808
return getResources().getString(R.string.nc_app_product_name);
@@ -1017,37 +997,13 @@ private void openConversation() {
1017997
private void openConversation(String textToPaste) {
1018998
Bundle bundle = new Bundle();
1019999
bundle.putParcelable(BundleKeys.INSTANCE.getKEY_USER_ENTITY(), currentUser);
1000+
bundle.putParcelable(BundleKeys.INSTANCE.getKEY_ACTIVE_CONVERSATION(), Parcels.wrap(selectedConversation));
10201001
bundle.putString(BundleKeys.INSTANCE.getKEY_ROOM_TOKEN(), selectedConversation.getToken());
10211002
bundle.putString(BundleKeys.INSTANCE.getKEY_ROOM_ID(), selectedConversation.getRoomId());
10221003
bundle.putString(BundleKeys.INSTANCE.getKEY_SHARED_TEXT(), textToPaste);
10231004

1024-
// TODO check when this is executed and if handling is correct
1025-
// when is hasPassword && ParticipantType.GUEST true? currently the app can't be used as guest?!
1026-
// when is USER_FOLLOWING_LINK true? --> from contactsController via enter link?
1027-
if ((selectedConversation.hasPassword
1028-
&& selectedConversation.participantType == Participant.ParticipantType.GUEST)
1029-
|| selectedConversation.participantType == Participant.ParticipantType.USER_FOLLOWING_LINK) {
1030-
bundle.putSerializable(BundleKeys.INSTANCE.getKEY_OPERATION_CODE(), ConversationOperationEnum.JOIN_ROOM);
1031-
prepareAndShowBottomSheetWithBundle(bundle);
1032-
1033-
1034-
// instead to use prepareAnd...
1035-
// use something like
1036-
//
1037-
// conversationOperationDialog = new ConversationOperationDialog(
1038-
// getActivity(),
1039-
// this,
1040-
// userUtils.getCurrentUser(),
1041-
// conversation);
1042-
// conversationOperationDialog.show();
1043-
1044-
} else {
1045-
currentUser = userUtils.getCurrentUser();
1046-
1047-
bundle.putParcelable(BundleKeys.INSTANCE.getKEY_ACTIVE_CONVERSATION(), Parcels.wrap(selectedConversation));
1048-
ConductorRemapping.INSTANCE.remapChatController(getRouter(), currentUser.getId(),
1049-
selectedConversation.getToken(), bundle, false);
1050-
}
1005+
ConductorRemapping.INSTANCE.remapChatController(getRouter(), currentUser.getId(),
1006+
selectedConversation.getToken(), bundle, false);
10511007
}
10521008

10531009
@Subscribe(sticky = true, threadMode = ThreadMode.BACKGROUND)

0 commit comments

Comments
 (0)