Skip to content

Commit

Permalink
[feature/api_get_university] API Mock Data 제거 (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
SsongSik committed Nov 8, 2023
1 parent dea22be commit 76ca1bc
Show file tree
Hide file tree
Showing 14 changed files with 0 additions and 254 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.everymeal.everymeal_android.di

import com.everymeal.data.service.ExampleApi
import com.everymeal.data.service.onboarding.OnboardingApi
import com.jakewharton.retrofit2.converter.kotlinx.serialization.asConverterFactory
import dagger.Module
Expand Down Expand Up @@ -41,12 +40,6 @@ object NetworkModule {
.build()
}

@Provides
@Singleton
fun provideApi(retrofit: Retrofit): ExampleApi {
return retrofit.create(ExampleApi::class.java)
}

@Provides
@Singleton
fun provideOnboardingApi(retrofit: Retrofit): OnboardingApi {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
package com.everymeal.everymeal_android.di

import com.everymeal.data.datasource.FoodDataSource
import com.everymeal.data.datasource.FoodDataSourceImpl
import com.everymeal.data.datasource.onboarding.OnboardingDataSource
import com.everymeal.data.datasource.onboarding.OnboardingDataSourceImpl
import com.everymeal.data.repository.FoodRepositoryImpl
import com.everymeal.data.repository.onboarding.OnboardingRepositoryImpl
import com.everymeal.domain.repository.FoodRepository
import com.everymeal.domain.repository.onboarding.OnboardingRepository
import dagger.Binds
import dagger.Module
Expand All @@ -18,18 +14,6 @@ import javax.inject.Singleton
@InstallIn(SingletonComponent::class)
abstract class RepositoryModule {

@Singleton
@Binds
abstract fun bindFoodRepository(
foodRepositoryImpl: FoodRepositoryImpl,
) : FoodRepository

@Singleton
@Binds
abstract fun bindFoodV2DataSource(
foodDataSourceImpl: FoodDataSourceImpl
): FoodDataSource

@Singleton
@Binds
abstract fun bindOnboardingRepository(
Expand Down

This file was deleted.

This file was deleted.

44 changes: 0 additions & 44 deletions data/src/main/java/com/everymeal/data/model/GetWeekFood.kt

This file was deleted.

This file was deleted.

14 changes: 0 additions & 14 deletions data/src/main/java/com/everymeal/data/service/ExampleApi.kt

This file was deleted.

This file was deleted.

7 changes: 0 additions & 7 deletions domain/src/main/java/com/everymeal/domain/model/Result.kt

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,59 +1,27 @@
package com.everymeal.presentation.ui.splash

import android.annotation.SuppressLint
import android.util.Log
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.size
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.hilt.navigation.compose.hiltViewModel
import com.airbnb.lottie.compose.LottieAnimation
import com.airbnb.lottie.compose.LottieCompositionSpec
import com.airbnb.lottie.compose.animateLottieCompositionAsState
import com.airbnb.lottie.compose.rememberLottieComposition
import com.everymeal.presentation.ExampleFoodState
import com.everymeal.presentation.ExampleViewModel
import com.everymeal.presentation.ui.theme.EveryMeal_AndroidTheme

@SuppressLint("CoroutineCreationDuringComposition")
@Composable
fun SplashScreen(
onFinishSplash: () -> Unit,
viewModel: ExampleViewModel = hiltViewModel(),
) {
LaunchedEffect(Unit) {
viewModel.getWeekFood("MCC식당")
}
val weekFoodState by viewModel.weekGetFoodArea.collectAsState()

when (weekFoodState) {
is ExampleFoodState.UnInitialized -> {

}

is ExampleFoodState.Loading -> {

}

is ExampleFoodState.SuccessWeekFoodGetData -> {
val data =
(weekFoodState as ExampleFoodState.SuccessWeekFoodGetData).getWeekFoodData
Log.d("clean architecture test url success", "$data")
}

is ExampleFoodState.Error -> {

}
}

val composition by rememberLottieComposition(LottieCompositionSpec.Asset("everymeal_splash.json"))
val progress by animateLottieCompositionAsState(composition)

Expand Down

0 comments on commit 76ca1bc

Please sign in to comment.