|
@@ -507,6 +507,7 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|
NotificationUtils.cancelExistingNotifications(getApplicationContext(), conversationUser);
|
|
NotificationUtils.cancelExistingNotifications(getApplicationContext(), conversationUser);
|
|
|
|
|
|
if (wasDetached & conversationUser.hasSpreedCapabilityWithName("no-ping")) {
|
|
if (wasDetached & conversationUser.hasSpreedCapabilityWithName("no-ping")) {
|
|
|
|
+ wasDetached = false;
|
|
joinRoomWithPassword();
|
|
joinRoomWithPassword();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -517,6 +518,7 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|
super.onDetach(view);
|
|
super.onDetach(view);
|
|
if (conversationUser.hasSpreedCapabilityWithName("no-ping")) {
|
|
if (conversationUser.hasSpreedCapabilityWithName("no-ping")) {
|
|
wasDetached = true;
|
|
wasDetached = true;
|
|
|
|
+ leaveRoom();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -588,8 +590,6 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|
|
|
|
|
private void joinRoomWithPassword() {
|
|
private void joinRoomWithPassword() {
|
|
|
|
|
|
- wasDetached = false;
|
|
|
|
-
|
|
|
|
if (currentCall == null) {
|
|
if (currentCall == null) {
|
|
ncApi.joinRoom(credentials, ApiUtils.getUrlForSettingMyselfAsActiveParticipant(baseUrl, roomToken), roomPassword)
|
|
ncApi.joinRoom(credentials, ApiUtils.getUrlForSettingMyselfAsActiveParticipant(baseUrl, roomToken), roomPassword)
|
|
.subscribeOn(Schedulers.newThread())
|
|
.subscribeOn(Schedulers.newThread())
|
|
@@ -653,7 +653,7 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|
@Override
|
|
@Override
|
|
public void onNext(GenericOverall genericOverall) {
|
|
public void onNext(GenericOverall genericOverall) {
|
|
dispose();
|
|
dispose();
|
|
- if (!isDestroyed() && !isBeingDestroyed()) {
|
|
|
|
|
|
+ if (!isDestroyed() && !isBeingDestroyed() && !wasDetached) {
|
|
getRouter().popCurrentController();
|
|
getRouter().popCurrentController();
|
|
}
|
|
}
|
|
}
|
|
}
|