Skip to content

Commit a002a58

Browse files
authored
Merge pull request #261 from rainxchzed/settings-to-profile
2 parents 0bd9abc + e8cbd79 commit a002a58

53 files changed

Lines changed: 867 additions & 208 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

composeApp/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ kotlin {
4949
implementation(projects.feature.search.data)
5050
implementation(projects.feature.search.presentation)
5151

52-
implementation(projects.feature.settings.domain)
53-
implementation(projects.feature.settings.data)
54-
implementation(projects.feature.settings.presentation)
52+
implementation(projects.feature.profile.domain)
53+
implementation(projects.feature.profile.data)
54+
implementation(projects.feature.profile.presentation)
5555

5656
implementation(projects.feature.starred.domain)
5757
implementation(projects.feature.starred.data)

composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/di/ViewModelsModule.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import zed.rainxch.details.presentation.DetailsViewModel
88
import zed.rainxch.devprofile.presentation.DeveloperProfileViewModel
99
import zed.rainxch.favourites.presentation.FavouritesViewModel
1010
import zed.rainxch.home.presentation.HomeViewModel
11+
import zed.rainxch.profile.presentation.ProfileViewModel
1112
import zed.rainxch.search.presentation.SearchViewModel
12-
import zed.rainxch.settings.presentation.SettingsViewModel
1313
import zed.rainxch.starred.presentation.StarredReposViewModel
1414

1515
val viewModelsModule = module {
@@ -20,6 +20,6 @@ val viewModelsModule = module {
2020
viewModelOf(::FavouritesViewModel)
2121
viewModelOf(::HomeViewModel)
2222
viewModelOf(::SearchViewModel)
23-
viewModelOf(::SettingsViewModel)
23+
viewModelOf(::ProfileViewModel)
2424
viewModelOf(::StarredReposViewModel)
2525
}

composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/di/initKoin.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import zed.rainxch.details.data.di.detailsModule
1212
import zed.rainxch.devprofile.data.di.devProfileModule
1313
import zed.rainxch.home.data.di.homeModule
1414
import zed.rainxch.search.data.di.searchModule
15-
import zed.rainxch.settings.data.di.settingsModule
15+
import zed.rainxch.profile.data.di.settingsModule
1616

1717
fun initKoin(config: KoinAppDeclaration? = null) {
1818
startKoin {

composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/navigation/AppNavigation.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import zed.rainxch.devprofile.presentation.DeveloperProfileRoot
2727
import zed.rainxch.favourites.presentation.FavouritesRoot
2828
import zed.rainxch.home.presentation.HomeRoot
2929
import zed.rainxch.search.presentation.SearchRoot
30-
import zed.rainxch.settings.presentation.SettingsRoot
30+
import zed.rainxch.profile.presentation.ProfileRoot
3131
import zed.rainxch.starred.presentation.StarredReposRoot
3232

3333
@Composable
@@ -53,7 +53,7 @@ fun AppNavigation(
5353
navController.navigate(GithubStoreGraph.SearchScreen)
5454
},
5555
onNavigateToSettings = {
56-
navController.navigate(GithubStoreGraph.SettingsScreen)
56+
navController.navigate(GithubStoreGraph.ProfileScreen)
5757
},
5858
onNavigateToApps = {
5959
navController.navigate(GithubStoreGraph.AppsScreen)
@@ -199,8 +199,8 @@ fun AppNavigation(
199199
)
200200
}
201201

202-
composable<GithubStoreGraph.SettingsScreen> {
203-
SettingsRoot(
202+
composable<GithubStoreGraph.ProfileScreen> {
203+
ProfileRoot(
204204
onNavigateBack = {
205205
navController.navigateUp()
206206
}

composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/navigation/BottomNavigationUtils.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ object BottomNavigationUtils {
4646
titleRes = Res.string.bottom_nav_profile_title,
4747
iconOutlined = Icons.Outlined.Person2,
4848
iconFilled = Icons.Filled.Person2,
49-
screen = GithubStoreGraph.SettingsScreen
49+
screen = GithubStoreGraph.ProfileScreen
5050
)
5151
)
5252

composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/navigation/GithubStoreGraph.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ sealed interface GithubStoreGraph {
2626
) : GithubStoreGraph
2727

2828
@Serializable
29-
data object SettingsScreen : GithubStoreGraph
29+
data object ProfileScreen : GithubStoreGraph
3030

3131
@Serializable
3232
data object FavouritesScreen : GithubStoreGraph

composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/navigation/NavigationUtils.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ fun NavBackStackEntry?.getCurrentScreen(): GithubStoreGraph? {
1313
route.contains("AuthenticationScreen") -> GithubStoreGraph.AuthenticationScreen
1414
route.contains("DetailsScreen") -> toRoute<GithubStoreGraph.DetailsScreen>()
1515
route.contains("DeveloperProfileScreen") -> toRoute<GithubStoreGraph.DeveloperProfileScreen>()
16-
route.contains("SettingsScreen") -> GithubStoreGraph.SettingsScreen
16+
route.contains("ProfileScreen") -> GithubStoreGraph.ProfileScreen
1717
route.contains("FavouritesScreen") -> GithubStoreGraph.FavouritesScreen
1818
route.contains("StarredReposScreen") -> GithubStoreGraph.StarredReposScreen
1919
route.contains("AppsScreen") -> GithubStoreGraph.AppsScreen

0 commit comments

Comments
 (0)