mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 03:59:35 +01:00
fix to enable pip for CallNotification Controller
methods to update UI are not yet implemented. maybe it's better to make two Activities: one for Call and one for CallNotification... Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
0d1e0af9d1
commit
03913b40a2
@ -76,6 +76,7 @@ class MagicCallActivity : BaseActivity() {
|
|||||||
RouterTransaction.with(CallNotificationController(intent.extras))
|
RouterTransaction.with(CallNotificationController(intent.extras))
|
||||||
.pushChangeHandler(HorizontalChangeHandler())
|
.pushChangeHandler(HorizontalChangeHandler())
|
||||||
.popChangeHandler(HorizontalChangeHandler())
|
.popChangeHandler(HorizontalChangeHandler())
|
||||||
|
.tag(CallNotificationController.TAG)
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
router!!.setRoot(
|
router!!.setRoot(
|
||||||
@ -153,11 +154,20 @@ class MagicCallActivity : BaseActivity() {
|
|||||||
super.onPictureInPictureModeChanged(isInPictureInPictureMode, newConfig)
|
super.onPictureInPictureModeChanged(isInPictureInPictureMode, newConfig)
|
||||||
isInPipMode = isInPictureInPictureMode
|
isInPipMode = isInPictureInPictureMode
|
||||||
|
|
||||||
val callController = router?.getControllerWithTag(CallController.TAG) as CallController
|
if (router?.getControllerWithTag(CallNotificationController.TAG) != null) {
|
||||||
if (isInPictureInPictureMode) {
|
val callNotificationController = router?.getControllerWithTag(CallNotificationController.TAG) as CallNotificationController
|
||||||
callController.updateUiForPipMode()
|
if (isInPictureInPictureMode) {
|
||||||
} else {
|
// callNotificationController.updateUiForPipMode()
|
||||||
callController.updateUiForNormalMode()
|
} else {
|
||||||
|
// callNotificationController.updateUiForNormalMode()
|
||||||
|
}
|
||||||
|
} else if (router?.getControllerWithTag(CallController.TAG) != null) {
|
||||||
|
val callController = router?.getControllerWithTag(CallController.TAG) as CallController
|
||||||
|
if (isInPictureInPictureMode) {
|
||||||
|
callController.updateUiForPipMode()
|
||||||
|
} else {
|
||||||
|
callController.updateUiForNormalMode()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ import okhttp3.Cache;
|
|||||||
@AutoInjector(NextcloudTalkApplication.class)
|
@AutoInjector(NextcloudTalkApplication.class)
|
||||||
public class CallNotificationController extends BaseController {
|
public class CallNotificationController extends BaseController {
|
||||||
|
|
||||||
private static final String TAG = "CallNotificationController";
|
public static final String TAG = "CallNotificationController";
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
NcApi ncApi;
|
NcApi ncApi;
|
||||||
|
Loading…
Reference in New Issue
Block a user