fix #9 images projets
This commit is contained in:
@@ -47,7 +47,8 @@ class ProjectAdapter(private val projects: List<Project>, private val listener:
|
||||
val context = holder.itemView.context
|
||||
val color = project.getStatusColor()
|
||||
Glide.with(holder.projectImage.context)
|
||||
.load("https://timelapse.kerboul.me/api/smile") // L'URL de l'image
|
||||
.load("https://timelapse.kerboul.me/api/images/${project.id}/${1}") // L'URL de l'image
|
||||
.placeholder(R.drawable.not_found)
|
||||
.into(holder.projectImage)
|
||||
DrawableCompat.setTint(holder.projectBadge.background, ContextCompat.getColor(context, color))
|
||||
holder.itemView.setOnClickListener {
|
||||
|
||||
@@ -19,7 +19,7 @@ data class Project(
|
||||
val description: String,
|
||||
val start_date: Date,
|
||||
val status: Int,
|
||||
val thumbnail_url: String?
|
||||
//val thumbnail_url: String?
|
||||
) : Parcelable {
|
||||
|
||||
fun getStatusText(): String{
|
||||
@@ -44,7 +44,7 @@ data class Project(
|
||||
parcel.readString() ?: "",
|
||||
Date(parcel.readLong()),
|
||||
parcel.readInt(),
|
||||
parcel.readString()
|
||||
//parcel.readString()
|
||||
)
|
||||
|
||||
// Write object to Parcel
|
||||
|
||||
@@ -66,7 +66,7 @@ class ProjectRepository(private val apiService: ApiService) {
|
||||
})
|
||||
}
|
||||
fun createProject(name: String, description: String, onSuccess: () -> Unit, onError: (String) -> Unit) {
|
||||
val call = apiService.createProject(Project(0, name, description, Date(), 0, null))
|
||||
val call = apiService.createProject(Project(0, name, description, Date(), 0))
|
||||
call.enqueue(object : Callback<Confirmation> {
|
||||
override fun onResponse(call: Call<Confirmation>, response: Response<Confirmation>) {
|
||||
if (response.isSuccessful) {
|
||||
|
||||
Reference in New Issue
Block a user