Skip to content

Commit fe5f190

Browse files
authored
chore(chat): turn off the thank-you reply to a claimed cash link (#1614)
1 parent c59d957 commit fe5f190

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

  • apps/flipcash/features/messenger/src/main/kotlin/com/flipcash/app/messenger/internal

‎apps/flipcash/features/messenger/src/main/kotlin/com/flipcash/app/messenger/internal/ChatViewModel.kt‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,6 +1327,8 @@ internal class ChatViewModel @Inject constructor(
13271327
*/
13281328
private fun thankForClaim(claim: SettledClaim) {
13291329
val messageId = claimReplyTargets.settled(claim) ?: return
1330+
// After settled(), so the target is still consumed while the reply is off.
1331+
if (!CLAIM_THANKS_ENABLED) return
13301332
val chatId = stateFlow.value.chatId ?: return
13311333

13321334
// Decided on the collector, sent off it. The claim is consumed before this returns, so the
@@ -2561,6 +2563,12 @@ internal class ChatViewModel @Inject constructor(
25612563
*/
25622564
private val CLAIM_REFRESH_INTERVAL = 15.seconds
25632565

2566+
/**
2567+
* Whether a collected claim is answered with [thankForClaim]'s reply. Off for now; the
2568+
* tap and claim bookkeeping still runs, so turning this back on is the only change needed.
2569+
*/
2570+
private const val CLAIM_THANKS_ENABLED = false
2571+
25642572
/** Long enough to coalesce a burst of typing, short enough to survive a fast exit. */
25652573
private val DRAFT_WRITE_DEBOUNCE = 300.milliseconds
25662574

0 commit comments

Comments
 (0)