Skip to content

Commit

Permalink
Add :core:model, and move to :core:ui
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaehwa-Noh committed Jun 18, 2024
1 parent b042b33 commit 17c2252
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 23 deletions.
11 changes: 8 additions & 3 deletions Compose-Flight-Search-App/core/ui/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@ android {
}

dependencies {
api(projects.core.model)

implementation(platform(libs.androidx.compose.bom))
implementation(libs.androidx.compose.runtime)
implementation(libs.androidx.material3)
implementation(libs.androidx.ui.tooling.preview)

implementation(projects.core.designsystem)

implementation(libs.androidx.core.ktx)
implementation(libs.androidx.appcompat)
implementation(libs.material)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.flightsearchapp.ui.flight
package com.example.flightsearchapp.core.ui.flight

import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
Expand All @@ -23,9 +23,9 @@ import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.semantics.stateDescription
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.example.flightsearchapp.ui.AirportInfoUiComponent
import com.example.flightsearchapp.ui.model.Flight
import com.example.flightsearchapp.ui.theme.FlightSearchAppTheme
import com.example.flightsearchapp.core.designsystem.theme.FlightSearchAppTheme
import com.example.flightsearchapp.core.model.Flight
import com.example.flightsearchapp.core.ui.AirportInfoUiComponent

@Composable
fun FlightItemCardUiComponent(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import com.example.flightsearchapp.core.designsystem.theme.FlightSearchAppTheme
import com.example.flightsearchapp.core.ui.model.Flight
import com.example.flightsearchapp.core.model.Flight
import com.example.flightsearchapp.core.ui.uistate.SearchScreenUiState
import com.example.flightsearchapp.core.ui.uistate.ShowFlightUiState

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.example.flightsearchapp.ui.suggestion
package com.example.flightsearchapp.core.ui.suggestion

import androidx.compose.foundation.clickable
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import com.example.flightsearchapp.ui.AirportInfoUiComponent
import com.example.flightsearchapp.ui.model.SuggestionAirport
import com.example.flightsearchapp.ui.theme.FlightSearchAppTheme
import com.example.flightsearchapp.core.designsystem.theme.FlightSearchAppTheme
import com.example.flightsearchapp.core.model.SuggestionAirport
import com.example.flightsearchapp.core.ui.AirportInfoUiComponent

@Composable
fun SuggestionsListItemUiComponent(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.flightsearchapp.ui.suggestion
package com.example.flightsearchapp.core.ui.suggestion

import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
Expand All @@ -8,8 +8,8 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.example.flightsearchapp.ui.model.SuggestionAirport
import com.example.flightsearchapp.ui.theme.FlightSearchAppTheme
import com.example.flightsearchapp.core.designsystem.theme.FlightSearchAppTheme
import com.example.flightsearchapp.core.model.SuggestionAirport

@Composable
fun SuggestionsListScreen(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.example.flightsearchapp.core.ui.uistate

import com.example.flightsearchapp.core.model.Flight
import com.example.flightsearchapp.core.model.SuggestionAirport

sealed interface SearchScreenUiState {
data class ShowFavorite(val results: List<Flight>) : SearchScreenUiState
data class ShowSuggests(val results: List<SuggestionAirport>) :
SearchScreenUiState
data object Init : SearchScreenUiState
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.example.flightsearchapp.core.ui.uistate

import com.example.flightsearchapp.core.ui.model.Flight
import com.example.flightsearchapp.core.model.Flight

sealed interface ShowFlightUiState {
data object Clear : ShowFlightUiState
Expand Down

This file was deleted.

0 comments on commit 17c2252

Please sign in to comment.