Skip to content

Commit 2e5ca98

Browse files
committed
sample: pass event between screens
1 parent 4308c6d commit 2e5ca98

File tree

1 file changed

+2
-1
lines changed
  • sample/app/src/main/java/com/hoc081098/channeleventbus/sample/android/ui/home/detail

1 file changed

+2
-1
lines changed

sample/app/src/main/java/com/hoc081098/channeleventbus/sample/android/ui/home/detail/DetailVM.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ class DetailVM(
2121
}
2222

2323
internal fun sendResultToHome() {
24-
channelEventBus.send(DetailResultToHomeEvent(textStateFlow.value))
24+
val value = textStateFlow.value.takeIf { it.isNotBlank() } ?: return
25+
channelEventBus.send(DetailResultToHomeEvent(value))
2526
}
2627

2728
private companion object {

0 commit comments

Comments
 (0)