Skip to content

Commit 9779ef2

Browse files
committed
[BOOK-490] chore: run build success
누락된 model 모듈 @stable -> @immutable 추가 적용
1 parent 1f62d87 commit 9779ef2

21 files changed

Lines changed: 62 additions & 505 deletions

File tree

core/data/impl/src/main/kotlin/com/ninecraft/booket/core/data/impl/mapper/ResponseToModel.kt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import com.ninecraft.booket.core.model.LibraryModel
1717
import com.ninecraft.booket.core.model.PageInfoModel
1818
import com.ninecraft.booket.core.model.PrimaryEmotionModel
1919
import com.ninecraft.booket.core.model.ReadingRecordModel
20+
import com.ninecraft.booket.core.model.ReadingRecordsModel
2021
import com.ninecraft.booket.core.model.RecentBookModel
2122
import com.ninecraft.booket.core.model.SeedModel
2223
import com.ninecraft.booket.core.model.TermsAgreementModel
@@ -38,6 +39,7 @@ import com.ninecraft.booket.core.network.response.LibraryResponse
3839
import com.ninecraft.booket.core.network.response.PageInfo
3940
import com.ninecraft.booket.core.network.response.PrimaryEmotion
4041
import com.ninecraft.booket.core.network.response.ReadingRecord
42+
import com.ninecraft.booket.core.network.response.ReadingRecordsResponse
4143
import com.ninecraft.booket.core.network.response.RecentBook
4244
import com.ninecraft.booket.core.network.response.SeedResponse
4345
import com.ninecraft.booket.core.network.response.TermsAgreementResponse
@@ -210,6 +212,17 @@ internal fun DetailEmotion.toModel(): DetailEmotionModel {
210212
)
211213
}
212214

215+
internal fun ReadingRecordsResponse.toModel(): ReadingRecordsModel {
216+
return ReadingRecordsModel(
217+
representativeEmotion = representativeEmotion.toModel(),
218+
lastPage = lastPage,
219+
totalResults = totalResults,
220+
startIndex = startIndex,
221+
itemsPerPage = itemsPerPage,
222+
readingRecords = readingRecords.map { it.toModel() },
223+
)
224+
}
225+
213226
internal fun ReadingRecord.toModel(): ReadingRecordModel {
214227
return ReadingRecordModel(
215228
id = id,

core/data/impl/src/main/kotlin/com/ninecraft/booket/core/data/impl/repository/DefaultAuthRepository.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ package com.ninecraft.booket.core.data.impl.repository
33
import com.ninecraft.booket.core.common.utils.runSuspendCatching
44
import com.ninecraft.booket.core.data.api.repository.AuthRepository
55
import com.ninecraft.booket.core.datastore.api.datasource.TokenDataSource
6+
import com.ninecraft.booket.core.di.DataScope
67
import com.ninecraft.booket.core.model.AutoLoginState
78
import com.ninecraft.booket.core.model.UserState
89
import com.ninecraft.booket.core.network.request.LoginRequest
910
import com.ninecraft.booket.core.network.service.ReedService
1011
import dev.zacsweers.metro.Inject
11-
import com.ninecraft.booket.core.di.DataScope
1212
import dev.zacsweers.metro.SingleIn
1313
import kotlinx.coroutines.flow.map
1414

core/datastore/impl/src/main/kotlin/com/ninecraft/booket/core/datastore/impl/datasource/DefaultOnboardingDataSource.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import androidx.datastore.preferences.core.Preferences
55
import androidx.datastore.preferences.core.booleanPreferencesKey
66
import androidx.datastore.preferences.core.edit
77
import com.ninecraft.booket.core.datastore.api.datasource.OnboardingDataSource
8-
import com.ninecraft.booket.core.model.OnboardingState
98
import com.ninecraft.booket.core.datastore.impl.di.OnboardingDataStore
109
import com.ninecraft.booket.core.datastore.impl.util.handleIOException
11-
import dev.zacsweers.metro.Inject
1210
import com.ninecraft.booket.core.di.DataScope
11+
import com.ninecraft.booket.core.model.OnboardingState
12+
import dev.zacsweers.metro.Inject
1313
import dev.zacsweers.metro.SingleIn
1414
import kotlinx.coroutines.flow.Flow
1515
import kotlinx.coroutines.flow.map

core/designsystem/stability/designsystem.stability

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -232,40 +232,3 @@ public fun com.ninecraft.booket.core.designsystem.component.textfield.ReedTextFi
232232
- borderStroke: STABLE (marked @Stable or @Immutable)
233233
- searchIconTint: STABLE (marked @Stable or @Immutable)
234234

235-
@Composable
236-
public fun com.ninecraft.booket.core.designsystem.theme.ReedTheme(content: @[Composable] androidx.compose.runtime.internal.ComposableFunction0<kotlin.Unit>): kotlin.Unit
237-
skippable: true
238-
restartable: true
239-
params:
240-
- content: STABLE (composable function type)
241-
242-
@Composable
243-
public fun com.ninecraft.booket.core.designsystem.theme.ReedTheme.border(): com.ninecraft.booket.core.designsystem.theme.ReedBorder
244-
skippable: true
245-
restartable: true
246-
params:
247-
248-
@Composable
249-
public fun com.ninecraft.booket.core.designsystem.theme.ReedTheme.colors(): com.ninecraft.booket.core.designsystem.theme.ReedColorScheme
250-
skippable: true
251-
restartable: true
252-
params:
253-
254-
@Composable
255-
public fun com.ninecraft.booket.core.designsystem.theme.ReedTheme.radius(): com.ninecraft.booket.core.designsystem.theme.ReedRadius
256-
skippable: true
257-
restartable: true
258-
params:
259-
260-
@Composable
261-
public fun com.ninecraft.booket.core.designsystem.theme.ReedTheme.spacing(): com.ninecraft.booket.core.designsystem.theme.ReedSpacing
262-
skippable: true
263-
restartable: true
264-
params:
265-
266-
@Composable
267-
public fun com.ninecraft.booket.core.designsystem.theme.ReedTheme.typography(): com.ninecraft.booket.core.designsystem.theme.ReedTypography
268-
skippable: true
269-
restartable: true
270-
params:
271-

core/model/src/main/kotlin/com/ninecraft/booket/core/model/AutoLoginState.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
package com.ninecraft.booket.core.model
22

3+
import androidx.compose.runtime.Stable
4+
5+
@Stable
36
enum class AutoLoginState {
47
IDLE,
58
LOGGED_IN,

core/model/src/main/kotlin/com/ninecraft/booket/core/model/BookDetailModel.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.ninecraft.booket.core.model
22

3-
import androidx.compose.runtime.Stable
3+
import androidx.compose.runtime.Immutable
44

5-
@Stable
5+
@Immutable
66
data class BookDetailModel(
77
val version: String = "",
88
val title: String = "",

core/model/src/main/kotlin/com/ninecraft/booket/core/model/BookSearchModel.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.ninecraft.booket.core.model
22

3-
import androidx.compose.runtime.Stable
3+
import androidx.compose.runtime.Immutable
44

5-
@Stable
5+
@Immutable
66
data class BookSearchModel(
77
val version: String = "",
88
val title: String = "",
@@ -17,7 +17,7 @@ data class BookSearchModel(
1717
val books: List<BookSummaryModel> = emptyList(),
1818
)
1919

20-
@Stable
20+
@Immutable
2121
data class BookSummaryModel(
2222
val isbn13: String = "",
2323
val title: String = "",

core/model/src/main/kotlin/com/ninecraft/booket/core/model/HomeModel.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
package com.ninecraft.booket.core.model
22

3-
import androidx.compose.runtime.Stable
3+
import androidx.compose.runtime.Immutable
44

5-
@Stable
5+
@Immutable
66
data class HomeModel(
77
val recentBooks: List<RecentBookModel> = emptyList(),
88
)
99

10-
@Stable
10+
@Immutable
1111
data class RecentBookModel(
1212
val userBookId: String = "",
1313
val isbn13: String = "",

core/model/src/main/kotlin/com/ninecraft/booket/core/model/LibraryModel.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.ninecraft.booket.core.model
22

3-
import androidx.compose.runtime.Stable
3+
import androidx.compose.runtime.Immutable
44

5-
@Stable
5+
@Immutable
66
data class LibraryModel(
77
val books: LibraryBooksModel = LibraryBooksModel(),
88
val totalCount: Int = 0,
@@ -11,13 +11,13 @@ data class LibraryModel(
1111
val completedCount: Int = 0,
1212
)
1313

14-
@Stable
14+
@Immutable
1515
data class LibraryBooksModel(
1616
val content: List<LibraryBookSummaryModel> = emptyList(),
1717
val page: PageInfoModel = PageInfoModel(),
1818
)
1919

20-
@Stable
20+
@Immutable
2121
data class LibraryBookSummaryModel(
2222
val userBookId: String = "",
2323
val userId: String = "",
@@ -32,7 +32,7 @@ data class LibraryBookSummaryModel(
3232
val updatedAt: String = "",
3333
)
3434

35-
@Stable
35+
@Immutable
3636
data class PageInfoModel(
3737
val size: Int = 0,
3838
val number: Int = 0,

core/model/src/main/kotlin/com/ninecraft/booket/core/model/OnboardingState.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
package com.ninecraft.booket.core.model
22

3+
import androidx.compose.runtime.Stable
4+
5+
@Stable
36
enum class OnboardingState {
47
IDLE,
58
NOT_COMPLETED,

0 commit comments

Comments
 (0)