Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ fun HilingualBasicPicker(
listScrollCount,
key = { it }
) { index ->
val currentItemText = getItem(index)?.toString().orEmpty()
val currentItemText = getItem(index).orEmpty()
val isSelected = index == currentCenterIndex

val textColor = remember(isSelected) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ private fun UserItemDto.toModel(): UserModel = UserModel(
userId = this.userId,
nickname = this.nickname,
profileImg = this.profileImg,
followState = FollowState.getValueByFollowState(this.isFollowing, this.isFollowed)!!
followState = FollowState.getValueByFollowState(this.isFollowing, this.isFollowed)
)

enum class FollowState(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ import com.hilingual.presentation.diarywrite.component.WriteGuideTooltip
import com.hilingual.presentation.diarywrite.screen.DiaryFeedbackLoadingScreen
import com.hilingual.presentation.diarywrite.screen.DiaryFeedbackStatusScreen
import com.skydoves.balloon.BalloonSizeSpec
import com.skydoves.balloon.compose.Balloon
import com.skydoves.balloon.compose.balloon
import com.skydoves.balloon.compose.rememberBalloonBuilder
import com.skydoves.balloon.compose.rememberBalloonState
import com.skydoves.balloon.compose.setBackgroundColor
import kotlinx.collections.immutable.persistentListOf
import kotlinx.coroutines.delay
Expand Down Expand Up @@ -473,43 +474,46 @@ private fun DiaryWriteScreen(
}
}

Balloon(
builder = rememberBalloonBuilder {
setWidth(BalloonSizeSpec.WRAP)
setHeight(BalloonSizeSpec.WRAP)
setBackgroundColor(Color.Transparent)
setIsVisibleArrow(false)
setArrowSize(0)
setDismissWhenTouchOutside(false)
setIsAttachedInDecor(false)
},
balloonContent = {
WriteGuideTooltip(
text = "10์ž ์ด์ƒ ์ž‘์„ฑํ•ด์•ผ ํ”ผ๋“œ๋ฐฑ ์š”์ฒญ์ด ๊ฐ€๋Šฅํ•ด์š”!"
)
},
modifier = Modifier.align(Alignment.BottomCenter)
) { balloon ->
LaunchedEffect(Unit) {
balloon.showAlignTop()
delay(5000)
balloon.dismiss()
}
val balloonBuilder = rememberBalloonBuilder {
setWidth(BalloonSizeSpec.WRAP)
setHeight(BalloonSizeSpec.WRAP)
setBackgroundColor(Color.Transparent)
setIsVisibleArrow(false)
setArrowSize(0)
setDismissWhenTouchOutside(false)
setIsAttachedInDecor(false)
}

LaunchedEffect(isTextFieldFocused) {
if (isTextFieldFocused) balloon.dismiss()
}
val balloonState = rememberBalloonState(balloonBuilder)

HilingualButton(
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 16.dp)
.padding(bottom = 16.dp)
.navigationBarsPadding(),
text = "ํ”ผ๋“œ๋ฐฑ ์š”์ฒญํ•˜๊ธฐ",
enableProvider = { diaryText.length >= 10 },
onClick = onDiaryFeedbackRequestButtonClick
)
HilingualButton(
modifier = Modifier
.align(Alignment.BottomCenter)
.fillMaxWidth()
.padding(horizontal = 16.dp)
.padding(bottom = 16.dp)
.navigationBarsPadding()
.balloon(
state = balloonState,
balloonContent = {
WriteGuideTooltip(
text = "10์ž ์ด์ƒ ์ž‘์„ฑํ•ด์•ผ ํ”ผ๋“œ๋ฐฑ ์š”์ฒญ์ด ๊ฐ€๋Šฅํ•ด์š”!"
)
}
),
text = "ํ”ผ๋“œ๋ฐฑ ์š”์ฒญํ•˜๊ธฐ",
enableProvider = { diaryText.length >= 10 },
onClick = onDiaryFeedbackRequestButtonClick
)

LaunchedEffect(Unit) {
balloonState.showAlignTop()
delay(5000)
balloonState.dismiss()
}

LaunchedEffect(isTextFieldFocused) {
if (isTextFieldFocused) balloonState.dismiss()
}
}
}
Expand Down