diff options
author | Allan Wang <me@allanwang.ca> | 2020-02-29 23:34:58 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-29 23:34:58 -0800 |
commit | e732e30d97babca49ba5f7d97aea1620ba14024b (patch) | |
tree | 3101fb9e17eede3ffbf75e96358c6ac0a330aaf7 /app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt | |
parent | e893c5ab9a976031c15e792583b411f6c9a429e5 (diff) | |
parent | 551dbbcf1a56c33c378d6edfc3a3615311867001 (diff) | |
download | frost-e732e30d97babca49ba5f7d97aea1620ba14024b.tar.gz frost-e732e30d97babca49ba5f7d97aea1620ba14024b.tar.bz2 frost-e732e30d97babca49ba5f7d97aea1620ba14024b.zip |
Merge pull request #1657 from AllanWang/versions
Update versions
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt index 16df7f8e..ec822bfa 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt @@ -41,7 +41,7 @@ import com.devbrackets.android.exomedia.listener.VideoControlsVisibilityListener import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial import com.pitchedapps.frost.R import com.pitchedapps.frost.databinding.ViewVideoBinding -import com.pitchedapps.frost.db.FrostDatabase +import com.pitchedapps.frost.db.CookieDao import com.pitchedapps.frost.db.currentCookie import com.pitchedapps.frost.utils.L import com.pitchedapps.frost.utils.Prefs @@ -88,6 +88,7 @@ class FrostVideoViewer @JvmOverloads constructor( } private val prefs: Prefs by inject() + private val cookieDao: CookieDao by inject() private val binding: ViewVideoBinding = ViewVideoBinding.inflate(LayoutInflater.from(context), this, true) @@ -116,8 +117,7 @@ class FrostVideoViewer @JvmOverloads constructor( when (it.itemId) { R.id.action_pip -> video.isExpanded = false R.id.action_download -> context.ctxCoroutine.launchMain { - val cookie = - FrostDatabase.get().cookieDao().currentCookie() ?: return@launchMain + val cookie = cookieDao.currentCookie(prefs) ?: return@launchMain context.frostDownload(cookie, video.videoUri) } } |