mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
Revert dialog confirmation
This commit is contained in:
parent
7dfd726427
commit
8cbba8a146
2 changed files with 15 additions and 16 deletions
app/src/main
|
@ -14,7 +14,13 @@ import android.os.Bundle
|
|||
import android.provider.Settings
|
||||
import android.text.Editable
|
||||
import android.text.format.DateUtils
|
||||
import android.view.*
|
||||
import android.view.KeyEvent
|
||||
import android.view.LayoutInflater
|
||||
import android.view.MotionEvent
|
||||
import android.view.Surface
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.WindowManager
|
||||
import android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES
|
||||
import android.view.animation.AlphaAnimation
|
||||
import android.view.animation.Animation
|
||||
|
@ -46,7 +52,6 @@ import com.lagradost.cloudstream3.ui.settings.Globals.EMULATOR
|
|||
import com.lagradost.cloudstream3.ui.settings.Globals.TV
|
||||
import com.lagradost.cloudstream3.ui.settings.Globals.isLayout
|
||||
import com.lagradost.cloudstream3.utils.AppContextUtils.isUsingMobileData
|
||||
import com.lagradost.cloudstream3.utils.AppContextUtils.setDefaultFocus
|
||||
import com.lagradost.cloudstream3.utils.DataStoreHelper
|
||||
import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showDialog
|
||||
import com.lagradost.cloudstream3.utils.UIHelper.colorFromAttribute
|
||||
|
@ -59,8 +64,11 @@ import com.lagradost.cloudstream3.utils.UIHelper.showSystemUI
|
|||
import com.lagradost.cloudstream3.utils.UIHelper.toPx
|
||||
import com.lagradost.cloudstream3.utils.UserPreferenceDelegate
|
||||
import com.lagradost.cloudstream3.utils.Vector2
|
||||
import kotlin.math.*
|
||||
import kotlin.system.exitProcess
|
||||
import kotlin.math.abs
|
||||
import kotlin.math.ceil
|
||||
import kotlin.math.max
|
||||
import kotlin.math.min
|
||||
import kotlin.math.round
|
||||
|
||||
const val MINIMUM_SEEK_TIME = 7000L // when swipe seeking
|
||||
const val MINIMUM_VERTICAL_SWIPE = 2.0f // in percentage
|
||||
|
@ -494,17 +502,9 @@ open class FullScreenPlayer : AbstractPlayerFragment() {
|
|||
player.seekTime(1L)
|
||||
}
|
||||
resetBtt.setOnClickListener {
|
||||
val resetSubsBuilder: AlertDialog.Builder = AlertDialog.Builder(ctx)
|
||||
resetSubsBuilder.setTitle(R.string.confirm_reset_subs_dialog)
|
||||
resetSubsBuilder.apply {
|
||||
setNegativeButton(R.string.no) { _, _ -> }
|
||||
setPositiveButton(R.string.yes) { _, _ ->
|
||||
subtitleDelay = 0
|
||||
dialog.dismissSafe(activity)
|
||||
player.seekTime(1L)
|
||||
}
|
||||
}
|
||||
resetSubsBuilder.show().setDefaultFocus()
|
||||
subtitleDelay = 0
|
||||
dialog.dismissSafe(activity)
|
||||
player.seekTime(1L)
|
||||
}
|
||||
cancelBtt.setOnClickListener {
|
||||
subtitleDelay = beforeOffset
|
||||
|
|
|
@ -677,7 +677,6 @@
|
|||
<string name="action_mark_as_watched">Mark as watched</string>
|
||||
<string name="action_remove_from_watched">Remove from watched</string>
|
||||
<string name="confirm_exit_dialog">Are you sure you want to exit\?</string>
|
||||
<string name="confirm_reset_subs_dialog">Are you sure you want to reset subtitles delay\?</string>
|
||||
<string name="yes">Yes</string>
|
||||
<string name="no">No</string>
|
||||
<string name="ok">OK</string>
|
||||
|
|
Loading…
Reference in a new issue