Skip to content

Commit

Permalink
[FEATURE]#155 : 예약된 쪽지 익명 여부에 따라 보낸이 상태를 다르게 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
jeongjaino committed Sep 8, 2024
1 parent fe31e4c commit 4bb325a
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,14 @@ class SendViewModel @Inject constructor(
selectedUser = message.receiver,
messageInput = message.content,
isRandomName = message.isAnonymous,
sender = message.senderName,
)
}
// 예약된 메세지 보낸이가 익명인 경우, 새로 프로필을 불러온다.
// 예약된 메세지 보낸이가 익명인 경우, 새로 프로필을 불러와 상태에 대입한다.
if (message.isAnonymous) {
reduce { state.copy(randomName = message.senderName) }
getProfile()
} else {
reduce { state.copy(sender = message.senderName) }
}

messageInput.value = message.content
Expand Down

0 comments on commit 4bb325a

Please sign in to comment.