-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Frist Delivery #43
base: main
Are you sure you want to change the base?
Frist Delivery #43
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
buen trabajo, deje unos comentarios
android:padding="16dp" | ||
android:orientation="vertical"> | ||
|
||
<ImageView |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ten cuidado con la indentacion
app:layout_constraintTop_toTopOf="parent"/> | ||
|
||
<TextView | ||
android:id="@+id/txt_MinimumPrice" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
usa cammel case o snake case en los nombres de los ids pero debes ser consistente.
import android.net.ConnectivityManager | ||
|
||
object BaseUtils { | ||
var context: Context? = null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
para que conservas el contexrto aca?
): View? { | ||
_binding = FragmentCryptoListBinding.inflate(inflater, container, false) | ||
val view = binding.root | ||
return view } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ten cuidado con la indentacion
} | ||
|
||
cryptoViewModel.onCreateTicker(bookName) | ||
cryptoViewModel.tickerState.observe(viewLifecycleOwner) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Puedes tener 1 solo Live data si emites estados distintos con la informacion necesaria
){ | ||
suspend operator fun invoke(): List<BooksModelDomain> { | ||
val books = cryptoRepository.getAllAvailableBooksFromApi() | ||
return if (books.isNotEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
el use case debe capturar las excepciones
suspend operator fun invoke(book: String): List<AsksModelDomain> { | ||
val asks = cryptoRepository.getAllAsksFromApi(book) | ||
|
||
return if (asks.isNotEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
el use case debe capturar las excepciones
import kotlinx.coroutines.withContext | ||
import javax.inject.Inject | ||
|
||
class CryptoService @Inject constructor( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
creo que CryptoRemoteDataSource es mas claro como nombre
import com.jpgl.cryptocurrencies.domain.model.* | ||
import javax.inject.Inject | ||
|
||
class CryptoRepository @Inject constructor( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
el use case no deberia saber si esta consumiendo la informacion desde un api o desde una base de datos local, se supone que el repo abstrae todo esto, no lo expone.
import retrofit2.converter.gson.GsonConverterFactory | ||
|
||
object RetrofitConfig { | ||
fun getConfigRetrofit(): Retrofit { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
creo que esto ya no se usa
-Setup
-Navigation
-Dependency Injection
-Retrofit adapter and dependency injection.
-MVVM
-Add visual items