Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2018-12-27 15:01:25 +01:00
parent 1c504bdfe6
commit e1cdea2584
4 changed files with 10 additions and 9 deletions

View File

@ -691,12 +691,8 @@ public class CallController extends BaseController {
}
@OnClick(R.id.callControlHangupView)
public void onHangupClick() {
if (inCall) {
hangup(false);
} else {
hangup(true);
}
void onHangupClick() {
hangup(false);
}
@OnClick(R.id.call_control_camera)

View File

@ -194,7 +194,7 @@ public class CallNotificationController extends BaseController {
private void proceedToCall() {
originalBundle.putString(BundleKeys.KEY_ROOM_TOKEN, currentConversation.getToken());
getRouter().setRoot(RouterTransaction.with(new CallController(originalBundle))
getRouter().replaceTopController(RouterTransaction.with(new CallController(originalBundle))
.popChangeHandler(new HorizontalChangeHandler())
.pushChangeHandler(new HorizontalChangeHandler()));
}

View File

@ -169,6 +169,7 @@ public class ChatController extends BaseController implements MessagesListAdapte
private boolean voiceOnly;
private boolean isFirstMessagesProcessing = true;
private boolean isHelloClicked;
private boolean isLeavingForConversation;
private static final byte CONTENT_TYPE_SYSTEM_MESSAGE = 1;
@ -489,6 +490,7 @@ public class ChatController extends BaseController implements MessagesListAdapte
protected void onAttach(@NonNull View view) {
super.onAttach(view);
isLeavingForConversation = false;
ApplicationWideCurrentRoomHolder.getInstance().setCurrentRoomId(roomId);
ApplicationWideCurrentRoomHolder.getInstance().setCurrentRoomToken(roomId);
ApplicationWideCurrentRoomHolder.getInstance().setInCall(false);
@ -517,7 +519,7 @@ public class ChatController extends BaseController implements MessagesListAdapte
protected void onDetach(@NonNull View view) {
super.onDetach(view);
if (conversationUser.hasSpreedCapabilityWithName("no-ping")
&& getActivity() != null && !getActivity().isChangingConfigurations()) {
&& getActivity() != null && !getActivity().isChangingConfigurations() && !isLeavingForConversation) {
wasDetached = true;
leaveRoom();
}
@ -1013,6 +1015,7 @@ public class ChatController extends BaseController implements MessagesListAdapte
}
private void startACall(boolean isVoiceOnlyCall) {
isLeavingForConversation = true;
if (!isVoiceOnlyCall) {
Intent videoCallIntent = getIntentForCall(false);
if (videoCallIntent != null) {

View File

@ -70,7 +70,9 @@
android:layout_height="match_parent"
android:animateLayoutChanges="true"
android:background="@color/grey950"
android:orientation="vertical"></LinearLayout>
android:orientation="vertical">
</LinearLayout>
<FrameLayout
android:layout_width="wrap_content"