Skip to content

Commit 6bd28b6

Browse files
committed
Align Compose & XML option name trimming
1 parent c47fe90 commit 6bd28b6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/messages/list/internal/poll/SuggestPollOptionDialogFragment.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import io.getstream.chat.android.ui.utils.extensions.streamThemeInflater
3232
* Dialog that lets a voter suggest a new option for a poll.
3333
*
3434
* Delivers the entered option via the fragment-result API under [REQUEST_KEY], with
35-
* the poll id in [BUNDLE_KEY_POLL_ID] and the trimmed option text in [BUNDLE_KEY_OPTION_TEXT].
35+
* the poll id in [BUNDLE_KEY_POLL_ID] and the option text in [BUNDLE_KEY_OPTION_TEXT].
3636
*/
3737
public class SuggestPollOptionDialogFragment : AppCompatDialogFragment() {
3838

@@ -47,8 +47,8 @@ public class SuggestPollOptionDialogFragment : AppCompatDialogFragment() {
4747
.setTitle(R.string.stream_ui_poll_suggest_option_dialog_title)
4848
.setView(binding.root)
4949
.setPositiveButton(R.string.stream_ui_poll_suggest_option_dialog_submit) { _, _ ->
50-
val text = binding.optionInput.text?.toString()?.trim().orEmpty()
51-
if (text.isNotEmpty()) {
50+
val text = binding.optionInput.text?.toString().orEmpty()
51+
if (text.isNotBlank()) {
5252
parentFragmentManager.setFragmentResult(
5353
REQUEST_KEY,
5454
bundleOf(

0 commit comments

Comments
 (0)