mirror of
https://github.com/nextcloud/talk-android
synced 2025-08-06 03:25:07 +01:00
parent
464a697082
commit
5b93317440
@ -53,7 +53,6 @@ import org.greenrobot.eventbus.ThreadMode;
|
|||||||
import java.security.cert.CertificateParsingException;
|
import java.security.cert.CertificateParsingException;
|
||||||
import java.security.cert.X509Certificate;
|
import java.security.cert.X509Certificate;
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
@ -109,6 +108,11 @@ public final class MainActivity extends AppCompatActivity implements ActionBarPr
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (getIntent().hasExtra(BundleKeys.KEY_FROM_NOTIFICATION_START_CALL)) {
|
if (getIntent().hasExtra(BundleKeys.KEY_FROM_NOTIFICATION_START_CALL)) {
|
||||||
|
if (!router.hasRootController()) {
|
||||||
|
router.setRoot(RouterTransaction.with(new MagicBottomNavigationController())
|
||||||
|
.pushChangeHandler(new HorizontalChangeHandler())
|
||||||
|
.popChangeHandler(new HorizontalChangeHandler()));
|
||||||
|
}
|
||||||
onNewIntent(getIntent());
|
onNewIntent(getIntent());
|
||||||
} else if (!router.hasRootController()) {
|
} else if (!router.hasRootController()) {
|
||||||
if (hasDb) {
|
if (hasDb) {
|
||||||
@ -136,14 +140,6 @@ public final class MainActivity extends AppCompatActivity implements ActionBarPr
|
|||||||
super.onNewIntent(intent);
|
super.onNewIntent(intent);
|
||||||
|
|
||||||
if (intent.hasExtra(BundleKeys.KEY_FROM_NOTIFICATION_START_CALL)) {
|
if (intent.hasExtra(BundleKeys.KEY_FROM_NOTIFICATION_START_CALL)) {
|
||||||
List<RouterTransaction> newBackstack = new ArrayList<>();
|
|
||||||
|
|
||||||
newBackstack.add(RouterTransaction.with(new MagicBottomNavigationController())
|
|
||||||
.pushChangeHandler(new HorizontalChangeHandler())
|
|
||||||
.popChangeHandler(new HorizontalChangeHandler()));
|
|
||||||
|
|
||||||
router.setBackstack(newBackstack, new HorizontalChangeHandler());
|
|
||||||
|
|
||||||
router.pushController(RouterTransaction.with(new ChatController(intent.getExtras()))
|
router.pushController(RouterTransaction.with(new ChatController(intent.getExtras()))
|
||||||
.pushChangeHandler(new HorizontalChangeHandler())
|
.pushChangeHandler(new HorizontalChangeHandler())
|
||||||
.popChangeHandler(new HorizontalChangeHandler()));
|
.popChangeHandler(new HorizontalChangeHandler()));
|
||||||
|
@ -48,9 +48,6 @@ import android.widget.AbsListView;
|
|||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
|
||||||
import com.amulyakhare.textdrawable.TextDrawable;
|
import com.amulyakhare.textdrawable.TextDrawable;
|
||||||
import com.bluelinelabs.conductor.RouterTransaction;
|
|
||||||
import com.bluelinelabs.conductor.changehandler.HorizontalChangeHandler;
|
|
||||||
import com.bluelinelabs.conductor.changehandler.VerticalChangeHandler;
|
|
||||||
import com.bumptech.glide.load.DataSource;
|
import com.bumptech.glide.load.DataSource;
|
||||||
import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
||||||
import com.bumptech.glide.load.engine.GlideException;
|
import com.bumptech.glide.load.engine.GlideException;
|
||||||
@ -494,13 +491,7 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(GenericOverall genericOverall) {
|
public void onNext(GenericOverall genericOverall) {
|
||||||
if (getRouter().hasRootController()) {
|
getRouter().popToRoot();
|
||||||
getRouter().popToRoot(new VerticalChangeHandler());
|
|
||||||
} else {
|
|
||||||
getRouter().setRoot(RouterTransaction.with(new MagicBottomNavigationController())
|
|
||||||
.pushChangeHandler(new HorizontalChangeHandler())
|
|
||||||
.popChangeHandler(new HorizontalChangeHandler()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -125,10 +125,8 @@ public class NotificationJob extends Job {
|
|||||||
|
|
||||||
if (hasChatSupport) {
|
if (hasChatSupport) {
|
||||||
intent = new Intent(context, MainActivity.class);
|
intent = new Intent(context, MainActivity.class);
|
||||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
||||||
} else {
|
} else {
|
||||||
intent = new Intent(context, CallActivity.class);
|
intent = new Intent(context, CallActivity.class);
|
||||||
bundle.putBoolean(BundleKeys.KEY_FROM_NOTIFICATION_START_CALL, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bundle.putString(BundleKeys.KEY_ROOM_ID, decryptedPushMessage.getId());
|
bundle.putString(BundleKeys.KEY_ROOM_ID, decryptedPushMessage.getId());
|
||||||
|
Loading…
Reference in New Issue
Block a user