Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
52f8d58
chore: 버전 업
HamBP Jan 20, 2026
253df9d
Merge branch 'develop' of github.com:Nexters/Boolti into develop
HamBP Feb 19, 2026
d6a2d6b
fix: response의 answer와 description을 nullable 타입으로 변경했어요.
HamBP Feb 21, 2026
00a5a24
feat: 선물 dto 필드 추가
HamBP Mar 1, 2026
b965c3e
fix: 점심 모드를 변경했어요.
HamBP Mar 3, 2026
a42e040
refactor: 같은 브랜치에 여러 조건을 묶었어요.
HamBP Mar 3, 2026
ab3812d
feat: 사전 질문을 작성하는 화면을 위한 파일을 만들었어요.
HamBP Mar 3, 2026
251ab9e
feat: 등록하기 시 만약 사전 질문이 있다면 질문 작성 화면으로 내비게이션 해요.
HamBP Mar 3, 2026
b3c78b9
feat: git에 누락된 파일을 추가했어요.
HamBP Mar 3, 2026
29aca98
fix: cold start 시 로그인 정보를 가져오지 못 하는 문제를 수정했어요.
HamBP Mar 3, 2026
6c4397b
feat: 공연 정보와 사전 질문 목록을 가져와요
HamBP Mar 4, 2026
a7c013d
feat: 공연 정보를 표시해요
HamBP Mar 4, 2026
74cdac9
feat: 사전 질문 작성 폼을 만들었어요.
HamBP Mar 4, 2026
85375f9
feat: 등록하기 버튼을 추가했어요.
HamBP Mar 4, 2026
a68e790
refactor: 텍스트들을 리소스화 했어요.
HamBP Mar 4, 2026
cf5897f
feat: 페이지 이탈 전 다이얼로그를 띄워줘요.
HamBP Mar 4, 2026
027432f
feat: 등록하기 버튼 클릭 시 필요한 API를 호출해요.
HamBP Mar 4, 2026
85f11b7
feat: 첫 번째 API 실패 시 오류 이벤트를 내보내요.
HamBP Mar 4, 2026
d6cd666
feat: API 호출 성공 여부를 체크하여 메시지를 띄워요
HamBP Mar 5, 2026
f2227a6
feat: 선물 받기 API 호출 순서를 변경했어요.
HamBP Mar 5, 2026
f0f1c5d
feat: 캐시된 값이 있다면 캐시된 값을 사용해요.
HamBP Mar 6, 2026
93d908c
Merge branch 'develop' of github.com:Nexters/Boolti into develop
HamBP Mar 6, 2026
72a9961
merge
HamBP Mar 6, 2026
8acfb7c
feat: 등록 버튼 enabled 처리했어요.
HamBP Mar 6, 2026
bf8d778
chore: 버전 업
HamBP Mar 6, 2026
7a93107
feat: retry 로직을 넣었어요.
HamBP Mar 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
android:name=".presentation.screen.MainActivity"
android:exported="true"
android:theme="@style/Theme.Boolti"
android:windowSoftInputMode="adjustPan">
android:windowSoftInputMode="adjustPan"
android:launchMode="singleTop">

<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.nexters.boolti.data.network.response

import com.nexters.boolti.data.util.toLocalDate
import com.nexters.boolti.data.util.toLocalDateTime
import com.nexters.boolti.domain.model.Gift
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
Expand All @@ -21,6 +22,12 @@ data class GiftResponse(
val recipientPhoneNumber: String,
val salesEndTime: String,
val isDone: Boolean,
val showId: String,
val showName: String,
val showImg: String,
val showDate: String,
val salesTicketName: String,
val ticketCount: Int,
) {
fun toDomain(): Gift {
return Gift(
Expand All @@ -38,6 +45,12 @@ data class GiftResponse(
recipientPhoneNumber = recipientPhoneNumber,
salesEndTime = salesEndTime.toLocalDate(),
isDone = isDone,
showId = showId,
showName = showName,
showImage = showImg,
showDate = showDate.toLocalDateTime(),
salesTicketName = salesTicketName,
ticketCount = ticketCount,
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,16 @@ import com.nexters.boolti.domain.request.GiftApproveRequest
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.flow
import timber.log.Timber
import java.util.concurrent.ConcurrentHashMap
import javax.inject.Inject

internal class GiftRepositoryImpl @Inject constructor(
private val dataSource: GiftDataSource,
) : GiftRepository {
private data class CacheEntry<T>(val value: T, val cachedAt: Long)

private val giftCache = ConcurrentHashMap<String, CacheEntry<Gift>>()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

receiveGift() 후 캐시 무효화 없음

선물 등록 후에도 60초간 이전 상태의 캐시를 반환합니다. receiveGift() 성공 시 giftCache.remove(giftUuid) 추가를 권장합니다

private val cacheTtlMs = 60_000L
override fun receiveGift(giftUuid: String): Flow<Boolean> = flow {
emit(dataSource.receiveGift(GiftReceiveRequest(giftUuid)))
}
Expand All @@ -33,7 +38,14 @@ internal class GiftRepositoryImpl @Inject constructor(
}

override fun getGift(giftUuid: String): Flow<Gift> = flow {
emit(dataSource.getGift(giftUuid).toDomain())
val cached = giftCache[giftUuid]
if (cached != null && System.currentTimeMillis() - cached.cachedAt < cacheTtlMs) {
emit(cached.value)
return@flow
}
val gift = dataSource.getGift(giftUuid).toDomain()
giftCache[giftUuid] = CacheEntry(gift, System.currentTimeMillis())
emit(gift)
}

override fun getGiftImages(): Flow<List<ImagePair>> = flow {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,17 @@ import com.nexters.boolti.domain.request.TicketingRequest
import com.nexters.boolti.domain.request.SubmitPreQuestionAnswersRequest
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.flow
import java.util.concurrent.ConcurrentHashMap
import javax.inject.Inject

internal class TicketingRepositoryImpl @Inject constructor(
private val dataSource: TicketingDataSource,
private val reservationDataSource: ReservationDataSource,
) : TicketingRepository {
private data class CacheEntry<T>(val value: T, val cachedAt: Long)

private val preQuestionsCache = ConcurrentHashMap<String, CacheEntry<List<PreQuestion>>>()
private val cacheTtlMs = 60_000L
override fun getSalesTickets(request: SalesTicketRequest): Flow<List<TicketWithQuantity>> = flow {
emit(dataSource.getSalesTickets(request))
}
Expand Down Expand Up @@ -88,7 +93,14 @@ internal class TicketingRepositoryImpl @Inject constructor(
}

override fun getPreQuestions(showId: String): Flow<List<PreQuestion>> = flow {
emit(dataSource.getPreQuestions(showId))
val cached = preQuestionsCache[showId]
if (cached != null && System.currentTimeMillis() - cached.cachedAt < cacheTtlMs) {
emit(cached.value)
return@flow
}
val preQuestions = dataSource.getPreQuestions(showId)
preQuestionsCache[showId] = CacheEntry(preQuestions, System.currentTimeMillis())
emit(preQuestions)
}

override fun submitPreQuestionAnswers(request: SubmitPreQuestionAnswersRequest): Flow<Unit> = flow {
Expand Down
7 changes: 7 additions & 0 deletions domain/src/main/java/com/nexters/boolti/domain/model/Gift.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.nexters.boolti.domain.model

import java.time.LocalDate
import java.time.LocalDateTime

data class Gift(
val id: String,
Expand All @@ -17,4 +18,10 @@ data class Gift(
val recipientPhoneNumber: String,
val salesEndTime: LocalDate,
val isDone: Boolean,
val showId: String,
val showName: String,
val showImage: String,
val showDate: LocalDateTime,
val salesTicketName: String,
val ticketCount: Int,
)
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[versions]
minSdk = "28"
targetSdk = "36"
versionCode = "48"
versionName = "1.13.0"
versionCode = "50"
versionName = "1.14.0"
packageName = "com.nexters.boolti"
compileSdk = "36"
targetJvm = "17"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import com.nexters.boolti.presentation.component.ToastSnackbarHost
import com.nexters.boolti.presentation.screen.accountsetting.accountSettingScreen
import com.nexters.boolti.presentation.screen.business.businessScreen
import com.nexters.boolti.presentation.screen.gift.giftScreen
import com.nexters.boolti.presentation.screen.giftprequestion.giftPreQuestionScreen
import com.nexters.boolti.presentation.screen.giftcomplete.giftCompleteScreen
import com.nexters.boolti.presentation.screen.home.homeScreen
import com.nexters.boolti.presentation.screen.link.linkListScreen
Expand Down Expand Up @@ -185,6 +186,7 @@ fun MainNavigation(
}

giftScreen()
giftPreQuestionScreen()

hostedShowScreen(
onClickShow = onClickQrScan,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package com.nexters.boolti.presentation.screen.giftprequestion

sealed interface GiftPreQuestionEvent {
data object GiftRegistered : GiftPreQuestionEvent
data object GiftRegistrationFailed : GiftPreQuestionEvent
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.nexters.boolti.presentation.screen.giftprequestion

import androidx.navigation.NavGraphBuilder
import androidx.navigation.compose.composable
import androidx.navigation.toRoute
import com.nexters.boolti.presentation.screen.LocalNavController
import com.nexters.boolti.presentation.screen.navigation.MainRoute

fun NavGraphBuilder.giftPreQuestionScreen() {
composable<MainRoute.GiftPreQuestion> { backStackEntry ->
val navController = LocalNavController.current

GiftPreQuestionScreen(
onBackPressed = navController::navigateUp,
)
}
}
Loading