16
16
17
17
package io.element.android.features.messages.impl.messagecomposer
18
18
19
- import androidx.compose.foundation.layout.Box
20
19
import androidx.compose.foundation.layout.Column
21
20
import androidx.compose.foundation.layout.IntrinsicSize
22
21
import androidx.compose.foundation.layout.height
@@ -35,8 +34,6 @@ import kotlinx.coroutines.launch
35
34
fun MessageComposerView (
36
35
state : MessageComposerState ,
37
36
subcomposing : Boolean ,
38
- onSendLocationClicked : () -> Unit ,
39
- onCreatePollClicked : () -> Unit ,
40
37
enableTextFormatting : Boolean ,
41
38
modifier : Modifier = Modifier ,
42
39
) {
@@ -67,28 +64,20 @@ fun MessageComposerView(
67
64
}
68
65
}
69
66
70
- Box (modifier = modifier) {
71
- AttachmentsBottomSheet (
72
- state = state,
73
- onSendLocationClicked = onSendLocationClicked,
74
- onCreatePollClicked = onCreatePollClicked,
75
- enableTextFormatting = enableTextFormatting,
76
- )
77
-
78
- TextComposer (
79
- state = state.richTextEditorState,
80
- subcomposing = subcomposing,
81
- onRequestFocus = ::onRequestFocus,
82
- onSendMessage = ::sendMessage,
83
- composerMode = state.mode,
84
- showTextFormatting = state.showTextFormatting,
85
- onResetComposerMode = ::onCloseSpecialMode,
86
- onAddAttachment = ::onAddAttachment,
87
- onDismissTextFormatting = ::onDismissTextFormatting,
88
- enableTextFormatting = enableTextFormatting,
89
- onError = ::onError,
90
- )
91
- }
67
+ TextComposer (
68
+ modifier = modifier,
69
+ state = state.richTextEditorState,
70
+ subcomposing = subcomposing,
71
+ onRequestFocus = ::onRequestFocus,
72
+ onSendMessage = ::sendMessage,
73
+ composerMode = state.mode,
74
+ showTextFormatting = state.showTextFormatting,
75
+ onResetComposerMode = ::onCloseSpecialMode,
76
+ onAddAttachment = ::onAddAttachment,
77
+ onDismissTextFormatting = ::onDismissTextFormatting,
78
+ enableTextFormatting = enableTextFormatting,
79
+ onError = ::onError,
80
+ )
92
81
}
93
82
94
83
@PreviewsDayNight
@@ -98,16 +87,12 @@ internal fun MessageComposerViewPreview(@PreviewParameter(MessageComposerStatePr
98
87
MessageComposerView (
99
88
modifier = Modifier .height(IntrinsicSize .Min ),
100
89
state = state,
101
- onSendLocationClicked = {},
102
- onCreatePollClicked = {},
103
90
enableTextFormatting = true ,
104
91
subcomposing = false ,
105
92
)
106
93
MessageComposerView (
107
94
modifier = Modifier .height(200 .dp),
108
95
state = state,
109
- onSendLocationClicked = {},
110
- onCreatePollClicked = {},
111
96
enableTextFormatting = true ,
112
97
subcomposing = false ,
113
98
)
0 commit comments