Skip to content

Commit 6914f44

Browse files
authored
Merge pull request #203 from YAPP-Github/BOOK-382-feature/#202
feat: 기록 플로우 감상평 기록 선택으로 변경
2 parents a162742 + fad03d2 commit 6914f44

File tree

17 files changed

+16
-23
lines changed

17 files changed

+16
-23
lines changed

core/common/src/main/kotlin/com/ninecraft/booket/core/common/extensions/Context.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import androidx.core.content.FileProvider
1616
import com.orhanobut.logger.Logger
1717
import java.io.File
1818

19-
@Suppress("TooGenericExceptionCaught")
2019
fun Context.externalShareForBitmap(bitmap: ImageBitmap) {
2120
try {
2221
val file = File(bitmap.saveToDisk(this))
@@ -31,7 +30,6 @@ fun Context.externalShareForBitmap(bitmap: ImageBitmap) {
3130
}
3231
}
3332

34-
@Suppress("TooGenericExceptionCaught")
3533
fun Context.saveImageToGallery(bitmap: ImageBitmap) {
3634
try {
3735
val fileName = "reed_record_${System.currentTimeMillis()}.png"

core/common/src/main/kotlin/com/ninecraft/booket/core/common/utils/HandleException.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ fun postErrorDialog(
9393
ErrorEventHelper.sendError(event = ErrorEvent.ShowDialog(spec))
9494
}
9595

96-
@Suppress("TooGenericExceptionCaught")
9796
private fun HttpException.parseErrorMessage(): String? {
9897
return try {
9998
val errorBody = response()?.errorBody()?.string()

core/common/src/main/kotlin/com/ninecraft/booket/core/common/utils/RunSuspendCatching.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import kotlin.contracts.ExperimentalContracts
1414
*/
1515

1616
@OptIn(ExperimentalContracts::class)
17-
@Suppress("WRONG_INVOCATION_KIND", "TooGenericExceptionCaught")
17+
@Suppress("WRONG_INVOCATION_KIND")
1818
inline fun <T> runSuspendCatching(block: () -> T): Result<T> {
1919
// 계약(contract): 컴파일러에게 'block' 람다의 실행 시점과 횟수를 명시적으로 알림
2020
// 'callsInPlace'와 'EXACTLY_ONCE'는 'block'이 이 함수 내에서 즉시, 그리고 정확히 한 번만 실행됨을 보장

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ internal fun RecordRegisterResponse.toModel(): RecordRegisterModel {
193193
pageNumber = pageNumber,
194194
quote = quote,
195195
emotionTags = emotionTags,
196-
review = review,
196+
review = review ?: "",
197197
createdAt = createdAt,
198198
updatedAt = updatedAt,
199199
)
@@ -215,7 +215,7 @@ internal fun ReadingRecord.toModel(): ReadingRecordModel {
215215
userBookId = userBookId,
216216
pageNumber = pageNumber,
217217
quote = quote,
218-
review = review,
218+
review = review ?: "",
219219
emotionTags = emotionTags,
220220
createdAt = createdAt,
221221
updatedAt = updatedAt,
@@ -232,7 +232,7 @@ internal fun RecordDetailResponse.toModel(): RecordDetailModel {
232232
userBookId = userBookId,
233233
pageNumber = pageNumber,
234234
quote = quote,
235-
review = review,
235+
review = review ?: "",
236236
emotionTags = emotionTags,
237237
createdAt = createdAt.toFormattedDate(),
238238
updatedAt = updatedAt.toFormattedDate(),

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import javax.inject.Inject
1717
class DefaultBookRecentSearchDataSource @Inject constructor(
1818
@BookRecentSearchDataStore private val dataStore: DataStore<Preferences>,
1919
) : BookRecentSearchDataSource {
20-
@Suppress("TooGenericExceptionCaught")
2120
override val recentSearches: Flow<List<String>> = dataStore.data
2221
.handleIOException()
2322
.map { prefs ->
@@ -34,7 +33,6 @@ class DefaultBookRecentSearchDataSource @Inject constructor(
3433
} ?: emptyList()
3534
}
3635

37-
@Suppress("TooGenericExceptionCaught")
3836
override suspend fun addRecentSearch(query: String) {
3937
if (query.isBlank()) return
4038

@@ -66,7 +64,6 @@ class DefaultBookRecentSearchDataSource @Inject constructor(
6664
}
6765
}
6866

69-
@Suppress("TooGenericExceptionCaught")
7067
override suspend fun deleteRecentSearch(query: String) {
7168
dataStore.edit { prefs ->
7269
val currentSearches = prefs[BOOK_RECENT_SEARCHES]?.let { jsonString ->

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import javax.inject.Inject
1717
class DefaultLibraryRecentSearchDataSource @Inject constructor(
1818
@LibraryRecentSearchDataStore private val dataStore: DataStore<Preferences>,
1919
) : LibraryRecentSearchDataSource {
20-
@Suppress("TooGenericExceptionCaught")
2120
override val recentSearches: Flow<List<String>> = dataStore.data
2221
.handleIOException()
2322
.map { prefs ->
@@ -34,7 +33,6 @@ class DefaultLibraryRecentSearchDataSource @Inject constructor(
3433
} ?: emptyList()
3534
}
3635

37-
@Suppress("TooGenericExceptionCaught")
3836
override suspend fun addRecentSearch(query: String) {
3937
if (query.isBlank()) return
4038

@@ -66,7 +64,6 @@ class DefaultLibraryRecentSearchDataSource @Inject constructor(
6664
}
6765
}
6866

69-
@Suppress("TooGenericExceptionCaught")
7067
override suspend fun deleteRecentSearch(query: String) {
7168
dataStore.edit { prefs ->
7269
val currentSearches = prefs[LIBRARY_RECENT_SEARCHES]?.let { jsonString ->

core/network/src/main/kotlin/com/ninecraft/booket/core/network/TokenAuthenticator.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import okhttp3.Route
1212
import javax.inject.Inject
1313
import javax.inject.Provider
1414

15-
@Suppress("TooGenericExceptionCaught")
1615
class TokenAuthenticator @Inject constructor(
1716
private val tokenDataSource: TokenDataSource,
1817
private val serviceProvider: Provider<ReedService>,

core/network/src/main/kotlin/com/ninecraft/booket/core/network/response/ReadingRecordsResponse.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ data class ReadingRecord(
2828
@SerialName("quote")
2929
val quote: String,
3030
@SerialName("review")
31-
val review: String = "",
31+
val review: String?,
3232
@SerialName("emotionTags")
3333
val emotionTags: List<String> = emptyList(),
3434
@SerialName("createdAt")

core/network/src/main/kotlin/com/ninecraft/booket/core/network/response/RecordDetailResponse.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ data class RecordDetailResponse(
1414
@SerialName("quote")
1515
val quote: String,
1616
@SerialName("review")
17-
val review: String,
17+
val review: String?,
1818
@SerialName("emotionTags")
1919
val emotionTags: List<String>,
2020
@SerialName("createdAt")

core/network/src/main/kotlin/com/ninecraft/booket/core/network/response/RecordRegisterResponse.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ data class RecordRegisterResponse(
1616
@SerialName("emotionTags")
1717
val emotionTags: List<String>,
1818
@SerialName("review")
19-
val review: String,
19+
val review: String?,
2020
@SerialName("createdAt")
2121
val createdAt: String,
2222
@SerialName("updatedAt")

0 commit comments

Comments
 (0)