mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-26 23:25:20 +03:00
Fix push
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
ccb6c6efa1
commit
88298026aa
1 changed files with 3 additions and 3 deletions
|
@ -507,6 +507,7 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|||
NotificationUtils.cancelExistingNotifications(getApplicationContext(), conversationUser);
|
||||
|
||||
if (wasDetached & conversationUser.hasSpreedCapabilityWithName("no-ping")) {
|
||||
wasDetached = false;
|
||||
joinRoomWithPassword();
|
||||
}
|
||||
}
|
||||
|
@ -517,6 +518,7 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|||
super.onDetach(view);
|
||||
if (conversationUser.hasSpreedCapabilityWithName("no-ping")) {
|
||||
wasDetached = true;
|
||||
leaveRoom();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -588,8 +590,6 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|||
|
||||
private void joinRoomWithPassword() {
|
||||
|
||||
wasDetached = false;
|
||||
|
||||
if (currentCall == null) {
|
||||
ncApi.joinRoom(credentials, ApiUtils.getUrlForSettingMyselfAsActiveParticipant(baseUrl, roomToken), roomPassword)
|
||||
.subscribeOn(Schedulers.newThread())
|
||||
|
@ -653,7 +653,7 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|||
@Override
|
||||
public void onNext(GenericOverall genericOverall) {
|
||||
dispose();
|
||||
if (!isDestroyed() && !isBeingDestroyed()) {
|
||||
if (!isDestroyed() && !isBeingDestroyed() && !wasDetached) {
|
||||
getRouter().popCurrentController();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue