File tree Expand file tree Collapse file tree 3 files changed +14
-8
lines changed
composeApp/src/commonMain/kotlin Expand file tree Collapse file tree 3 files changed +14
-8
lines changed Original file line number Diff line number Diff line change 1
1
package data.repository
2
2
3
- import androidx.compose.runtime.getValue
4
- import androidx.compose.runtime.mutableStateOf
5
- import androidx.compose.runtime.setValue
6
-
7
- class SharedRepository {
8
- var isDarkThemeEnabled by mutableStateOf(false )
9
- }
3
+ interface SharedRepository {
4
+ var isDarkThemeEnabled: Boolean
5
+ }
Original file line number Diff line number Diff line change
1
+ package data.repository
2
+
3
+ import androidx.compose.runtime.getValue
4
+ import androidx.compose.runtime.mutableStateOf
5
+ import androidx.compose.runtime.setValue
6
+
7
+ class SharedRepositoryImpl : SharedRepository {
8
+ override var isDarkThemeEnabled: Boolean by mutableStateOf(false )
9
+ }
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import data.mapper.PhotosUrlsMapper
6
6
import data.repository.ImageRepository
7
7
import data.repository.ImageRepositoryImpl
8
8
import data.repository.SharedRepository
9
+ import data.repository.SharedRepositoryImpl
9
10
import de.jensklingenberg.ktorfit.Ktorfit
10
11
import io.ktor.client.HttpClient
11
12
import io.ktor.client.plugins.contentnegotiation.ContentNegotiation
@@ -75,7 +76,7 @@ private fun mapperModule() = module {
75
76
76
77
private fun repositoryModule () = module {
77
78
single<ImageRepository > { ImageRepositoryImpl (get()) }
78
- single { SharedRepository () }
79
+ single< SharedRepository > { SharedRepositoryImpl () }
79
80
}
80
81
81
82
private fun viewModelModule () = module {
You can’t perform that action at this time.
0 commit comments