Few UI fixes especially backgrounding the app (#39)

Ensures playback (both theme song & video) is stopped when the app is
backgrounded, like hitting the home button.

Fixes a UI glitch when marking a series as played.
This commit is contained in:
damontecres 2025-10-19 17:24:08 -04:00 committed by GitHub
parent 63baf7f904
commit c3cc284238
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 143 additions and 52 deletions

View file

@ -37,7 +37,6 @@ import com.github.damontecres.wholphin.ui.nav.NavigationManager
import com.github.damontecres.wholphin.ui.theme.WholphinTheme
import com.github.damontecres.wholphin.util.AppUpgradeHandler
import com.github.damontecres.wholphin.util.ExceptionHandler
import com.github.damontecres.wholphin.util.ThemeSongPlayer
import com.github.damontecres.wholphin.util.UpdateChecker
import com.github.damontecres.wholphin.util.profile.createDeviceProfile
import dagger.hilt.android.AndroidEntryPoint
@ -69,9 +68,6 @@ class MainActivity : AppCompatActivity() {
@Inject
lateinit var appUpgradeHandler: AppUpgradeHandler
@Inject
lateinit var themeSongPlayer: ThemeSongPlayer
@OptIn(ExperimentalTvMaterial3Api::class)
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
@ -168,9 +164,4 @@ class MainActivity : AppCompatActivity() {
}
}
}
override fun onStop() {
super.onStop()
themeSongPlayer.stop()
}
}