Commit 5155be77 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Restart app when switching from TV to mobile UI

Fix #1335
parent 1f6ffd8f
Pipeline #17260 passed with stage
in 5 minutes and 47 seconds
...@@ -91,8 +91,7 @@ class MainTvActivity : BaseTvActivity() { ...@@ -91,8 +91,7 @@ class MainTvActivity : BaseTvActivity() {
when (resultCode) { when (resultCode) {
RESULT_RESCAN -> this.reloadLibrary() RESULT_RESCAN -> this.reloadLibrary()
RESULT_RESTART, RESULT_RESTART_APP -> { RESULT_RESTART, RESULT_RESTART_APP -> {
val intent = intent val intent = Intent(this, if (resultCode == RESULT_RESTART_APP) StartActivity::class.java else MainTvActivity::class.java)
intent.setClass(this, if (resultCode == RESULT_RESTART_APP) StartActivity::class.java else MainTvActivity::class.java)
finish() finish()
startActivity(intent) startActivity(intent)
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment