Skip to content

Commit f34cc03

Browse files
committed
refactor: adjustments of code review
1 parent 1b06198 commit f34cc03

File tree

37 files changed

+645
-413
lines changed

37 files changed

+645
-413
lines changed

app/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ plugins {
77
dependencies {
88

99
implementation(projects.featureListStreams)
10+
implementation(projects.featureProfile)
1011
implementation(projects.coreShared)
1112
implementation(projects.coreSharedUi)
1213
implementation(projects.coreNavigation)

app/src/main/java/com/codandotv/streamplayerapp/navigation/NavigationGraph.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import com.codandotv.streamplayerapp.core_navigation.routes.BottomNavRoutes
1616
import com.codandotv.streamplayerapp.core_navigation.routes.Routes
1717
import com.codandotv.streamplayerapp.feature_list_streams.detail.presentation.navigation.detailStreamNavGraph
1818
import com.codandotv.streamplayerapp.feature_list_streams.list.presentation.navigation.listStreamsNavGraph
19-
import com.codandotv.streamplayerapp.feature_list_streams.profile.presentation.navigation.profilePickerStreamNavGraph
19+
import com.codandotv.streamplayerapp.feature_profile.profile.presentation.navigation.profilePickerStreamNavGraph
2020
import com.codandotv.streamplayerapp.splah.presentation.navigation.splashNavGraph
2121

2222
@Composable

build-logic/src/main/java/Config.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ object Config {
1010
object BuildField {
1111
const val host_debug = "\"https://api.themoviedb.org/3/\""
1212
const val host_release = "\"https://api.themoviedb.org/3/\""
13+
const val api_profile_debug = "\"https://demo3364084.mockable.io/\""
14+
const val api_profile_release = "\"https://demo3364084.mockable.io/\""
1315

1416
private const val tmdb_token_name_debug = "TMDB_BEARER_TOKEN_DEBUG"
1517
private const val tmdb_token_name_release = "TMDB_BEARER_TOKEN_RELEASE"

core-networking/build.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ android {
66
debug {
77
buildConfigField("String", "HOST", Config.BuildField.host_debug)
88
buildConfigField("String", "API_BEARER_AUTH", Config.BuildField.api_bearer_debug)
9+
buildConfigField("String", "PROFILE", Config.BuildField.api_profile_debug)
10+
911
}
1012
getByName("release") {
1113
buildConfigField("String", "HOST", Config.BuildField.host_release)
1214
buildConfigField("String", "API_BEARER_AUTH", Config.BuildField.api_bearer_release)
15+
buildConfigField("String", "PROFILE", Config.BuildField.api_profile_release)
1316
}
1417
}
1518
}

core-networking/src/main/java/com/codandotv/streamplayerapp/core_networking/di/NetworkModule.kt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ object NetworkModule {
1818
BuildConfig.HOST
1919
}
2020

21+
single(QualifierProfile) {
22+
BuildConfig.PROFILE
23+
}
24+
2125
single {
2226
Moshi.Builder()
2327
.add(KotlinJsonAdapterFactory())
@@ -56,6 +60,14 @@ object NetworkModule {
5660
)
5761
}
5862

63+
single(QualifierProfileRetrofit) {
64+
provideRetrofit(
65+
okHttpClient = get(),
66+
moshi = get(),
67+
baseUrl = get(QualifierProfile)
68+
)
69+
}
70+
5971
single {
6072
provideOkhttp(
6173
get(QualifierAuthInterceptor),

core-networking/src/main/java/com/codandotv/streamplayerapp/core_networking/di/QualifierNetworking.kt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ object QualifierHost : Qualifier {
88
get() = "QualifierHost"
99
}
1010

11+
object QualifierProfile : Qualifier {
12+
override val value: QualifierValue
13+
get() = "QualifierProfile"
14+
}
15+
16+
object QualifierProfileRetrofit : Qualifier {
17+
override val value: QualifierValue
18+
get() = "QualifierProfileRetrofit"
19+
}
20+
21+
1122
object QualifierLoggerInterceptor : Qualifier {
1223
override val value: QualifierValue
1324
get() = "QualifierLoggerInterceptor"
@@ -16,4 +27,5 @@ object QualifierLoggerInterceptor : Qualifier {
1627
object QualifierAuthInterceptor : Qualifier {
1728
override val value: QualifierValue
1829
get() = "QualifierAuthInterceptor"
19-
}
30+
}
31+

core-shared-ui/src/main/java/com/codandotv/streamplayerapp/core_shared_ui/widget/StreamPlayerTopBar.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import androidx.compose.ui.res.stringResource
2929
import androidx.compose.ui.unit.dp
3030
import coil.compose.AsyncImage
3131
import com.codandotv.streamplayerapp.core.shared.ui.R
32+
import com.codandotv.streamplayerapp.core_shared.extension.empty
3233
import com.codandotv.streamplayerapp.core_shared_ui.resources.Colors
3334
import com.codandotv.streamplayerapp.core_shared_ui.theme.ThemePreview
3435
import com.codandotv.streamplayerapp.core_shared_ui.theme.ThemePreviews
@@ -144,7 +145,7 @@ fun StreamPlayerTopBarPreview() {
144145
rememberTopAppBarState()
145146
),
146147
onNavigateProfilePicker = {},
147-
onSelectedProfilePicture = ""
148+
onSelectedProfilePicture = String.empty()
148149
)
149150
}
150151
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package com.codandotv.streamplayerapp.core_shared.extension
2+
3+
fun String.Companion.empty() = ""

feature-list-streams/src/main/java/com/codandotv/streamplayerapp/feature_list_streams/profile/di/ProfilePickerStreamModule.kt

Lines changed: 0 additions & 35 deletions
This file was deleted.

feature-list-streams/src/main/java/com/codandotv/streamplayerapp/feature_list_streams/profile/domain/ProfilePickerStreamUseCase.kt

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)