File tree Expand file tree Collapse file tree
demo-app/src/main/kotlin/io/getstream/video/android Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -283,17 +283,17 @@ class CallActivity : ComposeStreamCallActivity() {
283283 }
284284
285285 private fun StreamCallActivity.goBackToMainScreen () {
286- if (! isFinishing) {
287- val intent = Intent (this , MainActivity ::class .java).apply {
288- flags = Intent .FLAG_ACTIVITY_NEW_TASK or Intent .FLAG_ACTIVITY_CLEAR_TASK
289- }
290- startActivity(intent)
291- safeFinish()
292- }
286+ safeFinish()
293287 }
294288 }
295289
296290 override fun finish () {
291+ if (isTaskRoot && ! isFinishing) {
292+ val intent = Intent (this , MainActivity ::class .java).apply {
293+ flags = Intent .FLAG_ACTIVITY_NEW_TASK or Intent .FLAG_ACTIVITY_CLEAR_TASK
294+ }
295+ startActivity(intent)
296+ }
297297 super .finish()
298298 observeCallReadyToJoinJob?.cancel()
299299 observeRingingJob?.cancel()
You can’t perform that action at this time.
0 commit comments