Skip to content

Commit

Permalink
Switch to Coil to load demo app images, rather than fix lint issues w…
Browse files Browse the repository at this point in the history
…ith Glide
  • Loading branch information
jayohms committed Mar 21, 2024
1 parent ae366f9 commit 699b1df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion demo/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.0")

// Images
implementation("com.github.bumptech.glide:glide:4.15.1")
implementation("io.coil-kt:coil:2.6.0")

implementation(project(":core"))
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import com.bumptech.glide.Glide
import coil.load
import dev.hotwire.core.navigation.fragments.HotwireFragment
import dev.hotwire.core.turbo.nav.HotwireDestination
import dev.hotwire.core.turbo.util.displayBackButtonAsCloseIcon
Expand All @@ -28,8 +28,6 @@ class ImageViewerFragment : HotwireFragment() {
}

private fun loadImage(view: View) {
view.findViewById<ImageView>(R.id.image_view)?.let {
Glide.with(this).load(location).into(it)
}
view.findViewById<ImageView>(R.id.image_view)?.load(location)
}
}

0 comments on commit 699b1df

Please sign in to comment.