Skip to content

Instantly share code, notes, and snippets.

View DjangoLC's full-sized avatar
🏠
Working from home

Enrique Perez DjangoLC

🏠
Working from home
View GitHub Profile
package com.djangomx.airsale.utils.dialogs
import android.content.Context
import androidx.appcompat.app.AlertDialog
typealias onClickAllow = (Boolean) -> Unit
object Dialogs {
var alertDialog: AlertDialog.Builder? = null
@DjangoLC
DjangoLC / Coroutines snippet.kt
Created February 26, 2020 22:55
Snippet code about how to implement coroutines with retrofit and viewmodel
// Method in retrofit Ws
suspend fun getDestinyRequestR() : Response<List<ResponseDestinyRequest>>
// Method in repository
override suspend fun getDestinyRequest(): List<DestinyRequest> {
val response = destinyRequestWs.getDestinyRequestR()
//Do stuff
return response
}