mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-02 18:09:54 +01:00
Improvements & bugfixes
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
08827ffadd
commit
7cdf323353
@ -50,7 +50,6 @@ import android.widget.LinearLayout;
|
||||
import com.bluelinelabs.conductor.RouterTransaction;
|
||||
import com.bluelinelabs.conductor.changehandler.HorizontalChangeHandler;
|
||||
import com.bluelinelabs.conductor.changehandler.VerticalChangeHandler;
|
||||
import com.bluelinelabs.conductor.internal.NoOpControllerChangeHandler;
|
||||
import com.kennyc.bottomsheet.BottomSheet;
|
||||
import com.nextcloud.talk.R;
|
||||
import com.nextcloud.talk.activities.CallActivity;
|
||||
@ -269,14 +268,13 @@ public class ContactsController extends BaseController implements SearchView.OnQ
|
||||
@Override
|
||||
public void onNext(RoomOverall roomOverall) {
|
||||
if (getActivity() != null) {
|
||||
overridePushHandler(new NoOpControllerChangeHandler());
|
||||
overridePopHandler(new NoOpControllerChangeHandler());
|
||||
Intent callIntent = new Intent(getActivity(), CallActivity.class);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(BundleKeys.KEY_ROOM_TOKEN, roomOverall.getOcs().getData().getToken());
|
||||
bundle.putParcelable(BundleKeys.KEY_USER_ENTITY, Parcels.wrap(userEntity));
|
||||
callIntent.putExtras(bundle);
|
||||
startActivity(callIntent);
|
||||
new Handler().postDelayed(() -> getRouter().popCurrentController(), 100);
|
||||
}
|
||||
}
|
||||
|
||||
@ -633,8 +631,6 @@ public class ContactsController extends BaseController implements SearchView.OnQ
|
||||
@Override
|
||||
public void onNext(RoomOverall roomOverall) {
|
||||
if (getActivity() != null) {
|
||||
overridePushHandler(new NoOpControllerChangeHandler());
|
||||
overridePopHandler(new NoOpControllerChangeHandler());
|
||||
Intent callIntent = new Intent(getActivity(), CallActivity.class);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(BundleKeys.KEY_ROOM_TOKEN, roomOverall.getOcs().getData().getToken());
|
||||
|
@ -23,6 +23,7 @@ package com.nextcloud.talk.controllers.bottomsheet;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
@ -35,7 +36,6 @@ import android.widget.TextView;
|
||||
|
||||
import com.bluelinelabs.conductor.RouterTransaction;
|
||||
import com.bluelinelabs.conductor.changehandler.HorizontalChangeHandler;
|
||||
import com.bluelinelabs.conductor.internal.NoOpControllerChangeHandler;
|
||||
import com.nextcloud.talk.R;
|
||||
import com.nextcloud.talk.activities.CallActivity;
|
||||
import com.nextcloud.talk.api.NcApi;
|
||||
@ -271,7 +271,7 @@ public class OperationsMenuController extends BaseController {
|
||||
.pushChangeHandler(new HorizontalChangeHandler())
|
||||
.popChangeHandler(new HorizontalChangeHandler()));
|
||||
} else {
|
||||
initiateCall();
|
||||
initiateCall(false);
|
||||
}
|
||||
} else {
|
||||
showResultImage(false, true);
|
||||
@ -487,7 +487,7 @@ public class OperationsMenuController extends BaseController {
|
||||
}
|
||||
|
||||
if (localInvitedUsers.size() == 0) {
|
||||
initiateCall();
|
||||
initiateCall(true);
|
||||
}
|
||||
dispose();
|
||||
}
|
||||
@ -498,7 +498,7 @@ public class OperationsMenuController extends BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
private void initiateCall() {
|
||||
private void initiateCall(boolean fromContactsView) {
|
||||
eventBus.post(new BottomSheetLockEvent(true, 0, true, true));
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(BundleKeys.KEY_ROOM_TOKEN, room.getToken());
|
||||
@ -508,11 +508,12 @@ public class OperationsMenuController extends BaseController {
|
||||
}
|
||||
bundle.putString(BundleKeys.KEY_CALL_SESSION, callSession);
|
||||
|
||||
overridePushHandler(new NoOpControllerChangeHandler());
|
||||
overridePopHandler(new NoOpControllerChangeHandler());
|
||||
Intent callIntent = new Intent(getActivity(), CallActivity.class);
|
||||
callIntent.putExtras(bundle);
|
||||
startActivity(callIntent);
|
||||
if (fromContactsView) {
|
||||
new Handler().postDelayed(() -> getParentController().getRouter().popCurrentController(), 100);
|
||||
}
|
||||
}
|
||||
|
||||
private class OperationsObserver implements Observer {
|
||||
@ -529,7 +530,7 @@ public class OperationsMenuController extends BaseController {
|
||||
} else {
|
||||
CallOverall callOverall = (CallOverall) o;
|
||||
callSession = callOverall.getOcs().getData().getSessionId();
|
||||
initiateCall();
|
||||
initiateCall(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user