fix: do show snackbar if duration is -1

This commit is contained in:
Max Jakobitsch 2025-05-15 23:17:15 +02:00
parent 38cdc35901
commit 1714657d44
3 changed files with 6 additions and 10 deletions

View file

@ -337,7 +337,7 @@ class DownloadAudioFragment(private var resultItem: ResultItem? = null, private
if(isUpdatingData){
val snack = Snackbar.make(view, context.getString(R.string.please_wait), Snackbar.LENGTH_SHORT)
snack.show()
}else if (downloadItem.duration=="0:00"){
}else if (downloadItem.duration == "0:00" || downloadItem.duration == "-1"){
val snack = Snackbar.make(view, context.getString(R.string.cut_unsupported), Snackbar.LENGTH_SHORT)
snack.show()
}else if (!nonSpecific){

View file

@ -367,7 +367,7 @@ class DownloadVideoFragment(private var resultItem: ResultItem? = null, private
if(isUpdatingData){
val snack = Snackbar.make(view, context.getString(R.string.please_wait), Snackbar.LENGTH_SHORT)
snack.show()
}else if (downloadItem.duration=="0:00"){
}else if (downloadItem.duration == "0:00" || downloadItem.duration == "-1"){
val snack = Snackbar.make(view, context.getString(R.string.cut_unsupported), Snackbar.LENGTH_SHORT)
snack.show()
}else if (!nonSpecific){

View file

@ -1560,10 +1560,8 @@ object UiUtil {
}
}else{
cut.alpha = 0.3f
if (duration != "-1") {
cut.setOnClickListener {
cutDisabledClicked()
}
cut.setOnClickListener {
cutDisabledClicked()
}
}
}
@ -1717,10 +1715,8 @@ object UiUtil {
}else{
cut.alpha = 0.3f
if (duration != "-1") {
cut.setOnClickListener {
cutDisabledClicked()
}
cut.setOnClickListener {
cutDisabledClicked()
}
}
}