|
@@ -173,6 +173,7 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|
private static final byte CONTENT_TYPE_SYSTEM_MESSAGE = 1;
|
|
private static final byte CONTENT_TYPE_SYSTEM_MESSAGE = 1;
|
|
|
|
|
|
private boolean wasDetached;
|
|
private boolean wasDetached;
|
|
|
|
+ private boolean isStartingACall;
|
|
|
|
|
|
public ChatController(Bundle args) {
|
|
public ChatController(Bundle args) {
|
|
super(args);
|
|
super(args);
|
|
@@ -511,6 +512,8 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|
joinRoomWithPassword();
|
|
joinRoomWithPassword();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ isStartingACall = false;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -519,7 +522,9 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|
if (conversationUser.hasSpreedCapabilityWithName("no-ping")
|
|
if (conversationUser.hasSpreedCapabilityWithName("no-ping")
|
|
&& getActivity() != null && !getActivity().isChangingConfigurations()) {
|
|
&& getActivity() != null && !getActivity().isChangingConfigurations()) {
|
|
wasDetached = true;
|
|
wasDetached = true;
|
|
- leaveRoom();
|
|
|
|
|
|
+ if (!isStartingACall) {
|
|
|
|
+ leaveRoom();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1015,11 +1020,13 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|
if (!isVoiceOnlyCall) {
|
|
if (!isVoiceOnlyCall) {
|
|
Intent videoCallIntent = getIntentForCall(false);
|
|
Intent videoCallIntent = getIntentForCall(false);
|
|
if (videoCallIntent != null) {
|
|
if (videoCallIntent != null) {
|
|
|
|
+ isStartingACall = true;
|
|
startActivity(videoCallIntent);
|
|
startActivity(videoCallIntent);
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
Intent voiceCallIntent = getIntentForCall(true);
|
|
Intent voiceCallIntent = getIntentForCall(true);
|
|
if (voiceCallIntent != null) {
|
|
if (voiceCallIntent != null) {
|
|
|
|
+ isStartingACall = true;
|
|
startActivity(voiceCallIntent);
|
|
startActivity(voiceCallIntent);
|
|
}
|
|
}
|
|
}
|
|
}
|