feat(Settings): Toggleable RPC (#513)

This commit is contained in:
Sadwhy 2024-11-07 23:14:01 +06:00 committed by GitHub
parent 3071f88681
commit b703337a16
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 29 additions and 3 deletions

View file

@ -1309,7 +1309,8 @@ class ExoplayerView : AppCompatActivity(), Player.Listener, SessionAvailabilityL
val ep = episode
val offline: Boolean = PrefManager.getVal(PrefName.OfflineMode)
val incognito: Boolean = PrefManager.getVal(PrefName.Incognito)
if ((isOnline(context) && !offline) && Discord.token != null && !incognito) {
val rpcenabled: Boolean = PrefManager.getVal(PrefName.rpcEnabled)
if ((isOnline(context) && !offline) && Discord.token != null && !incognito && rpcenabled) {
lifecycleScope.launch {
val discordMode = PrefManager.getCustomVal("discord_mode", "dantotsu")
val buttons = when (discordMode) {