Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion app/src/main/java/com/task/data/DataRepository.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ import kotlin.coroutines.CoroutineContext
* Created by AhmedEltaher
*/

class DataRepository @Inject constructor(private val remoteRepository: RemoteData, private val localRepository: LocalData, private val ioDispatcher: CoroutineContext) : DataRepositorySource {
class DataRepository @Inject constructor(
private val remoteRepository: RemoteData,
private val localRepository: LocalData,
private val ioDispatcher: CoroutineContext
) : DataRepositorySource {

override suspend fun requestRecipes(): Flow<Resource<Recipes>> {
return flow {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.task.ui.component.splash
import android.content.Intent
import android.os.Bundle
import android.os.Handler
import android.os.Looper
import androidx.activity.viewModels
import com.task.databinding.SplashLayoutBinding
import com.task.ui.base.BaseActivity
Expand Down Expand Up @@ -33,7 +34,7 @@ class SplashActivity : BaseActivity(){
}

private fun navigateToMainScreen() {
Handler().postDelayed({
Handler(Looper.getMainLooper()).postDelayed({
val nextScreenIntent = Intent(this, LoginActivity::class.java)
startActivity(nextScreenIntent)
finish()
Expand Down