mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 22:30:30 +05:30
commit
538654d715
@ -79,7 +79,6 @@ dependencies {
|
|||||||
implementation(libs.exoplayer.extension.cronet) { exclude group: 'com.google.android.gms' }
|
implementation(libs.exoplayer.extension.cronet) { exclude group: 'com.google.android.gms' }
|
||||||
implementation libs.exoplayer.extension.mediasession
|
implementation libs.exoplayer.extension.mediasession
|
||||||
|
|
||||||
implementation libs.square.picasso
|
|
||||||
implementation libs.square.retrofit
|
implementation libs.square.retrofit
|
||||||
implementation libs.square.retrofit.converterJackson
|
implementation libs.square.retrofit.converterJackson
|
||||||
// Do not update jackson annotations! It does not supports < API 26.
|
// Do not update jackson annotations! It does not supports < API 26.
|
||||||
@ -90,5 +89,6 @@ dependencies {
|
|||||||
coreLibraryDesugaring libs.desugaring
|
coreLibraryDesugaring libs.desugaring
|
||||||
implementation libs.cronet.embedded
|
implementation libs.cronet.embedded
|
||||||
implementation libs.cronet.okhttp
|
implementation libs.cronet.okhttp
|
||||||
|
implementation libs.coil
|
||||||
implementation libs.gson
|
implementation libs.gson
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,8 @@ package com.github.libretube.util
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.net.ConnectivityManager
|
import android.net.ConnectivityManager
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
|
import coil.load
|
||||||
import com.github.libretube.Globals
|
import com.github.libretube.Globals
|
||||||
import com.squareup.picasso.Picasso
|
|
||||||
|
|
||||||
object ConnectionHelper {
|
object ConnectionHelper {
|
||||||
fun isNetworkAvailable(context: Context): Boolean {
|
fun isNetworkAvailable(context: Context): Boolean {
|
||||||
@ -41,7 +41,7 @@ object ConnectionHelper {
|
|||||||
fun loadImage(url: String?, target: ImageView) {
|
fun loadImage(url: String?, target: ImageView) {
|
||||||
// only load the image if the data saver mode is disabled
|
// only load the image if the data saver mode is disabled
|
||||||
if (!Globals.DATA_SAVER_MODE_ENABLED) {
|
if (!Globals.DATA_SAVER_MODE_ENABLED) {
|
||||||
Picasso.get().load(url).fit().centerCrop().into(target)
|
target.load(url)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,6 @@ legacySupport = "1.0.0"
|
|||||||
preference = "1.2.0"
|
preference = "1.2.0"
|
||||||
extJunit = "1.1.3"
|
extJunit = "1.1.3"
|
||||||
espresso = "3.4.0"
|
espresso = "3.4.0"
|
||||||
picasso = "2.8"
|
|
||||||
circleimageview = "3.1.0"
|
circleimageview = "3.1.0"
|
||||||
exoplayer = "2.17.1"
|
exoplayer = "2.17.1"
|
||||||
multidex = "2.0.1"
|
multidex = "2.0.1"
|
||||||
@ -17,6 +16,7 @@ mobileffmpeg = "4.5.1.LTS"
|
|||||||
desugaring = "1.1.5"
|
desugaring = "1.1.5"
|
||||||
cronetEmbedded = "101.4951.41"
|
cronetEmbedded = "101.4951.41"
|
||||||
cronetOkHttp = "0.1.0"
|
cronetOkHttp = "0.1.0"
|
||||||
|
coil = "2.1.0"
|
||||||
leakcanary = "2.8.1"
|
leakcanary = "2.8.1"
|
||||||
gson = "2.9.0"
|
gson = "2.9.0"
|
||||||
|
|
||||||
@ -30,7 +30,6 @@ androidx-legacySupport = { group = "androidx.legacy", name = "legacy-support-v4"
|
|||||||
androidx-preference = { group = "androidx.preference", name = "preference-ktx", version.ref = "preference" }
|
androidx-preference = { group = "androidx.preference", name = "preference-ktx", version.ref = "preference" }
|
||||||
androidx-test-junit = { group = "androidx.test.ext", name = "junit", version.ref = "extJunit" }
|
androidx-test-junit = { group = "androidx.test.ext", name = "junit", version.ref = "extJunit" }
|
||||||
androidx-test-espressoCore = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espresso" }
|
androidx-test-espressoCore = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espresso" }
|
||||||
square-picasso = { group = "com.squareup.picasso", name = "picasso", version.ref = "picasso" }
|
|
||||||
circleimageview = { group = "de.hdodenhof", name = "circleimageview", version.ref = "circleimageview" }
|
circleimageview = { group = "de.hdodenhof", name = "circleimageview", version.ref = "circleimageview" }
|
||||||
exoplayer = { group = "com.google.android.exoplayer", name = "exoplayer", version.ref = "exoplayer" }
|
exoplayer = { group = "com.google.android.exoplayer", name = "exoplayer", version.ref = "exoplayer" }
|
||||||
exoplayer-extension-mediasession = { group = "com.google.android.exoplayer", name = "extension-mediasession", version.ref = "exoplayer" }
|
exoplayer-extension-mediasession = { group = "com.google.android.exoplayer", name = "extension-mediasession", version.ref = "exoplayer" }
|
||||||
@ -43,5 +42,6 @@ desugaring = { group = "com.android.tools", name = "desugar_jdk_libs", version.r
|
|||||||
exoplayer-extension-cronet = { group = "com.google.android.exoplayer", name = "extension-cronet", version.ref = "exoplayer" }
|
exoplayer-extension-cronet = { group = "com.google.android.exoplayer", name = "extension-cronet", version.ref = "exoplayer" }
|
||||||
cronet-embedded = { group = "org.chromium.net", name = "cronet-embedded", version.ref = "cronetEmbedded" }
|
cronet-embedded = { group = "org.chromium.net", name = "cronet-embedded", version.ref = "cronetEmbedded" }
|
||||||
cronet-okhttp = { group = "com.google.net.cronet", name = "cronet-okhttp", version.ref = "cronetOkHttp" }
|
cronet-okhttp = { group = "com.google.net.cronet", name = "cronet-okhttp", version.ref = "cronetOkHttp" }
|
||||||
|
coil = { group = "io.coil-kt", name = "coil", version.ref="coil" }
|
||||||
square-leakcanary = { group = "com.squareup.leakcanary", name = "leakcanary-android", version.ref = "leakcanary" }
|
square-leakcanary = { group = "com.squareup.leakcanary", name = "leakcanary-android", version.ref = "leakcanary" }
|
||||||
gson = { group = "com.google.code.gson", name="gson", version.ref = "gson"}
|
gson = { group = "com.google.code.gson", name="gson", version.ref = "gson"}
|
Loading…
Reference in New Issue
Block a user