Aayush's pr stuffs
This commit is contained in:
parent
8c957007ab
commit
b6c79dae40
14 changed files with 65 additions and 60 deletions
|
@ -125,7 +125,7 @@ class OfflineMangaFragment : Fragment(), OfflineMangaSearchListener {
|
|||
Download.Type.NOVEL
|
||||
}
|
||||
// Alert dialog to confirm deletion
|
||||
val builder = androidx.appcompat.app.AlertDialog.Builder(requireContext(), R.style.DialogTheme)
|
||||
val builder = androidx.appcompat.app.AlertDialog.Builder(requireContext(), R.style.MyPopup)
|
||||
builder.setTitle("Delete ${item.title}?")
|
||||
builder.setMessage("Are you sure you want to delete ${item.title}?")
|
||||
builder.setPositiveButton("Yes") { _, _ ->
|
||||
|
|
|
@ -62,7 +62,6 @@ import ani.dantotsu.R
|
|||
import ani.dantotsu.connections.anilist.Anilist
|
||||
import ani.dantotsu.connections.discord.Discord
|
||||
import ani.dantotsu.connections.discord.DiscordService
|
||||
import ani.dantotsu.connections.discord.DiscordService.Companion.ACTION_STOP_SERVICE
|
||||
import ani.dantotsu.connections.discord.DiscordServiceRunningSingleton
|
||||
import ani.dantotsu.connections.discord.RPC
|
||||
import ani.dantotsu.connections.updateProgress
|
||||
|
@ -816,14 +815,14 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
fun fastForward() {
|
||||
isFastForwarding = true
|
||||
exoPlayer.setPlaybackSpeed(exoPlayer.playbackParameters.speed * 2)
|
||||
snackString("Playing at 2x speed")
|
||||
snackString("Playing at ${exoPlayer.playbackParameters.speed}x speed")
|
||||
}
|
||||
|
||||
fun stopFastForward() {
|
||||
if (isFastForwarding) {
|
||||
isFastForwarding = false
|
||||
exoPlayer.setPlaybackSpeed(exoPlayer.playbackParameters.speed / 2)
|
||||
snackString("Playing at normal speed")
|
||||
snackString("Playing at default speed: ${exoPlayer.playbackParameters.speed}x")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1427,11 +1426,9 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
exoPlayer.release()
|
||||
VideoCache.release()
|
||||
mediaSession?.release()
|
||||
val stopIntent = Intent(this, DiscordService::class.java).apply {
|
||||
putExtra(ACTION_STOP_SERVICE, true)
|
||||
}
|
||||
val stopIntent = Intent(this, DiscordService::class.java)
|
||||
DiscordServiceRunningSingleton.running = false
|
||||
startService(stopIntent)
|
||||
stopService(stopIntent)
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -57,10 +57,8 @@ class InstalledAnimeExtensionsFragment : Fragment(), SearchQueryHandler {
|
|||
var selectedIndex = 0
|
||||
AlertDialog.Builder(requireContext(), R.style.MyPopup)
|
||||
.setTitle("Select a Source")
|
||||
.setSingleChoiceItems(names, selectedIndex) { _, which ->
|
||||
.setSingleChoiceItems(names, selectedIndex) { dialog, which ->
|
||||
selectedIndex = which
|
||||
}
|
||||
.setPositiveButton("OK") { dialog, _ ->
|
||||
selectedSetting = allSettings[selectedIndex]
|
||||
dialog.dismiss()
|
||||
|
||||
|
@ -86,10 +84,6 @@ class InstalledAnimeExtensionsFragment : Fragment(), SearchQueryHandler {
|
|||
.commit()
|
||||
}
|
||||
}
|
||||
.setNegativeButton("Cancel") { dialog, _ ->
|
||||
dialog.cancel()
|
||||
return@setNegativeButton
|
||||
}
|
||||
.show()
|
||||
} else {
|
||||
// If there's only one setting, proceed with the fragment transaction
|
||||
|
|
|
@ -64,10 +64,8 @@ class InstalledMangaExtensionsFragment : Fragment(), SearchQueryHandler {
|
|||
var selectedIndex = 0
|
||||
AlertDialog.Builder(requireContext(), R.style.MyPopup)
|
||||
.setTitle("Select a Source")
|
||||
.setSingleChoiceItems(names, selectedIndex) { _, which ->
|
||||
.setSingleChoiceItems(names, selectedIndex) { dialog, which ->
|
||||
selectedIndex = which
|
||||
}
|
||||
.setPositiveButton("OK") { dialog, _ ->
|
||||
selectedSetting = allSettings[selectedIndex]
|
||||
dialog.dismiss()
|
||||
|
||||
|
@ -82,11 +80,6 @@ class InstalledMangaExtensionsFragment : Fragment(), SearchQueryHandler {
|
|||
.addToBackStack(null)
|
||||
.commit()
|
||||
}
|
||||
.setNegativeButton("Cancel") { dialog, _ ->
|
||||
dialog.cancel()
|
||||
changeUIVisibility(true)
|
||||
return@setNegativeButton
|
||||
}
|
||||
.show()
|
||||
} else {
|
||||
// If there's only one setting, proceed with the fragment transaction
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue