mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-26 06:05:42 +01:00
Fixed bugs in code
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
88298026aa
commit
92cb537d2f
@ -795,6 +795,10 @@ public class ContactsController extends BaseController implements SearchView.OnQ
|
|||||||
view = getActivity().getLayoutInflater().inflate(R.layout.bottom_sheet, null, false);
|
view = getActivity().getLayoutInflater().inflate(R.layout.bottom_sheet, null, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (bottomSheet == null) {
|
||||||
|
bottomSheet = new BottomSheet.Builder(getActivity()).setView(view).create();
|
||||||
|
}
|
||||||
|
|
||||||
if (showEntrySheet) {
|
if (showEntrySheet) {
|
||||||
getChildRouter((ViewGroup) view).setRoot(
|
getChildRouter((ViewGroup) view).setRoot(
|
||||||
RouterTransaction.with(new EntryMenuController(bundle))
|
RouterTransaction.with(new EntryMenuController(bundle))
|
||||||
@ -805,13 +809,6 @@ public class ContactsController extends BaseController implements SearchView.OnQ
|
|||||||
RouterTransaction.with(new OperationsMenuController(bundle))
|
RouterTransaction.with(new OperationsMenuController(bundle))
|
||||||
.popChangeHandler(new VerticalChangeHandler())
|
.popChangeHandler(new VerticalChangeHandler())
|
||||||
.pushChangeHandler(new VerticalChangeHandler()));
|
.pushChangeHandler(new VerticalChangeHandler()));
|
||||||
|
|
||||||
bottomSheet.setOnShowListener(dialog -> eventBus.post(new BottomSheetLockEvent(false, 0,
|
|
||||||
false, false)));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bottomSheet == null) {
|
|
||||||
bottomSheet = new BottomSheet.Builder(getActivity()).setView(view).create();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bottomSheet.setOnShowListener(dialog -> {
|
bottomSheet.setOnShowListener(dialog -> {
|
||||||
@ -822,6 +819,7 @@ public class ContactsController extends BaseController implements SearchView.OnQ
|
|||||||
false, false));
|
false, false));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
bottomSheet.setOnDismissListener(dialog -> getActionBar().setDisplayHomeAsUpEnabled(getRouter().getBackstackSize() > 1));
|
bottomSheet.setOnDismissListener(dialog -> getActionBar().setDisplayHomeAsUpEnabled(getRouter().getBackstackSize() > 1));
|
||||||
|
|
||||||
bottomSheet.show();
|
bottomSheet.show();
|
||||||
@ -970,6 +968,7 @@ public class ContactsController extends BaseController implements SearchView.OnQ
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
adapter.notifyDataSetChanged();
|
||||||
checkAndHandleDoneMenuItem();
|
checkAndHandleDoneMenuItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -517,6 +517,7 @@ public class OperationsMenuController extends BaseController {
|
|||||||
if (localInvitedGroups.size() > 0) {
|
if (localInvitedGroups.size() > 0) {
|
||||||
localInvitedGroups.remove(0);
|
localInvitedGroups.remove(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (localInvitedUsers.size() > 0 || (localInvitedGroups.size() > 0 && currentUser.hasSpreedCapabilityWithName("invite-groups-and-mails"))) {
|
if (localInvitedUsers.size() > 0 || (localInvitedGroups.size() > 0 && currentUser.hasSpreedCapabilityWithName("invite-groups-and-mails"))) {
|
||||||
if ((localInvitedGroups.size() > 0 && currentUser.hasSpreedCapabilityWithName("invite-groups-and-mails"))) {
|
if ((localInvitedGroups.size() > 0 && currentUser.hasSpreedCapabilityWithName("invite-groups-and-mails"))) {
|
||||||
for (int i = 0; i < localInvitedGroups.size(); i++) {
|
for (int i = 0; i < localInvitedGroups.size(); i++) {
|
||||||
@ -557,8 +558,9 @@ public class OperationsMenuController extends BaseController {
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < localInvitedGroups.size(); i++) {
|
for (int i = 0; i < localInvitedUsers.size(); i++) {
|
||||||
final String userId = invitedUsers.get(i);
|
final String userId = invitedUsers.get(i);
|
||||||
retrofitBucket = ApiUtils.getRetrofitBucketForAddParticipant(currentUser.getBaseUrl(), conversation.getToken(),
|
retrofitBucket = ApiUtils.getRetrofitBucketForAddParticipant(currentUser.getBaseUrl(), conversation.getToken(),
|
||||||
userId);
|
userId);
|
||||||
@ -588,14 +590,13 @@ public class OperationsMenuController extends BaseController {
|
|||||||
localInvitedUsers.remove(userId);
|
localInvitedUsers.remove(userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (localInvitedUsers.size() == 0) {
|
if (localInvitedGroups.size() == 0 && localInvitedUsers.size() == 0) {
|
||||||
initiateConversation(true, null);
|
initiateConversation(true, null);
|
||||||
}
|
}
|
||||||
dispose();
|
dispose();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if (!currentUser.hasSpreedCapabilityWithName("chat-v2")) {
|
if (!currentUser.hasSpreedCapabilityWithName("chat-v2")) {
|
||||||
showResultImage(true, false);
|
showResultImage(true, false);
|
||||||
|
Loading…
Reference in New Issue
Block a user