mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 22:30:30 +05:30
Toast when no download source selected
This commit is contained in:
parent
3c3d313bec
commit
1700bbfe0d
@ -17,8 +17,8 @@ import com.github.libretube.databinding.AllCaughtUpRowBinding
|
||||
import com.github.libretube.databinding.TrendingRowBinding
|
||||
import com.github.libretube.databinding.VideoRowBinding
|
||||
import com.github.libretube.extensions.formatShort
|
||||
import com.github.libretube.extensions.toPixel
|
||||
import com.github.libretube.extensions.toID
|
||||
import com.github.libretube.extensions.toPixel
|
||||
import com.github.libretube.ui.base.BaseActivity
|
||||
import com.github.libretube.ui.extensions.setFormattedDuration
|
||||
import com.github.libretube.ui.extensions.setWatchProgressLength
|
||||
|
@ -132,7 +132,10 @@ class DownloadDialog(
|
||||
val vidUrl = videoUrl[binding.videoSpinner.selectedItemPosition]
|
||||
val audUrl = audioUrl[binding.audioSpinner.selectedItemPosition]
|
||||
|
||||
if (audUrl == "" && vidUrl == "") return@setOnClickListener
|
||||
if (audUrl == "" && vidUrl == "") {
|
||||
Toast.makeText(context, R.string.nothing_selected, Toast.LENGTH_SHORT).show()
|
||||
return@setOnClickListener
|
||||
}
|
||||
|
||||
val fileName = binding.fileName.text.toString().sanitize()
|
||||
|
||||
|
@ -23,8 +23,8 @@ import com.github.libretube.enums.PlaylistType
|
||||
import com.github.libretube.extensions.TAG
|
||||
import com.github.libretube.extensions.awaitQuery
|
||||
import com.github.libretube.extensions.query
|
||||
import com.github.libretube.extensions.toPixel
|
||||
import com.github.libretube.extensions.toID
|
||||
import com.github.libretube.extensions.toPixel
|
||||
import com.github.libretube.ui.adapters.PlaylistAdapter
|
||||
import com.github.libretube.ui.base.BaseFragment
|
||||
import com.github.libretube.ui.extensions.serializable
|
||||
|
@ -5,7 +5,6 @@ import android.os.Bundle
|
||||
import androidx.preference.ListPreference
|
||||
import androidx.preference.Preference
|
||||
import androidx.preference.SwitchPreferenceCompat
|
||||
import com.github.libretube.BuildConfig
|
||||
import com.github.libretube.R
|
||||
import com.github.libretube.constants.PreferenceKeys
|
||||
import com.github.libretube.ui.adapters.IconsSheetAdapter
|
||||
@ -14,7 +13,6 @@ import com.github.libretube.ui.dialogs.NavBarOptionsDialog
|
||||
import com.github.libretube.ui.dialogs.RequireRestartDialog
|
||||
import com.github.libretube.ui.sheets.IconsBottomSheet
|
||||
import com.github.libretube.util.PreferenceHelper
|
||||
import com.google.android.material.color.DynamicColors
|
||||
|
||||
class AppearanceSettings : BasePreferenceFragment() {
|
||||
override val titleResourceId: Int = R.string.appearance
|
||||
|
@ -415,6 +415,7 @@
|
||||
<string name="username_email">Proceed with an e-mail address that isn\'t recommended\?</string>
|
||||
<string name="proceed">Proceed</string>
|
||||
<string name="play_latest_videos">Play latest videos</string>
|
||||
<string name="nothing_selected">Nothing selected!</string>
|
||||
|
||||
<!-- Notification channel strings -->
|
||||
<string name="download_channel_name">Download Service</string>
|
||||
|
Loading…
Reference in New Issue
Block a user