@@ -105,6 +105,28 @@ class EntryMenuController(args: Bundle) :
105
105
binding?.okButton?.alpha = OPACITY_BUTTON_DISABLED
106
106
}
107
107
}
108
+
109
+ emojiPopup = binding?.let {
110
+ EmojiPopup (
111
+ rootView = view,
112
+ editText = it.textEdit,
113
+ onEmojiPopupShownListener = {
114
+ viewThemeUtils.platform.colorImageView(it.smileyButton, ColorRole .PRIMARY )
115
+ },
116
+ onEmojiPopupDismissListener = {
117
+ it.smileyButton.imageTintList = ColorStateList .valueOf(
118
+ ResourcesCompat .getColor(
119
+ resources!! ,
120
+ R .color.medium_emphasis_text,
121
+ context.theme
122
+ )
123
+ )
124
+ },
125
+ onEmojiClickListener = {
126
+ binding?.textEdit?.editableText?.append(" " )
127
+ }
128
+ )
129
+ }
108
130
}
109
131
110
132
override fun onViewBound (view : View ) {
@@ -113,16 +135,28 @@ class EntryMenuController(args: Bundle) :
113
135
currentUser = userManager.currentUser.blockingGet()
114
136
115
137
if (operation == ConversationOperationEnum .OPS_CODE_GET_AND_JOIN_ROOM ) {
116
- var labelText = " "
117
- labelText = resources!! .getString(R .string.nc_conversation_link)
118
138
binding?.textEdit?.inputType = InputType .TYPE_CLASS_TEXT or InputType .TYPE_TEXT_VARIATION_URI
119
139
120
140
textEditAddChangedListener()
121
141
122
142
binding?.textInputLayout?.let { viewThemeUtils.material.colorTextInputLayout(it) }
123
143
binding?.okButton?.let { viewThemeUtils.material.colorMaterialButtonText(it) }
124
144
125
- binding?.textInputLayout?.hint = labelText
145
+ binding?.textInputLayout?.hint = resources!! .getString(R .string.nc_conversation_link)
146
+
147
+ binding?.textInputLayout?.requestFocus()
148
+
149
+ binding?.smileyButton?.setOnClickListener { onSmileyClick() }
150
+ binding?.okButton?.setOnClickListener { onOkButtonClick() }
151
+ } else if (operation == ConversationOperationEnum .OPS_CODE_INVITE_USERS ) {
152
+ binding?.textEdit?.inputType = InputType .TYPE_CLASS_TEXT
153
+
154
+ textEditAddChangedListener()
155
+ binding?.smileyButton?.visibility = View .VISIBLE
156
+
157
+ binding?.textInputLayout?.let { viewThemeUtils.material.colorTextInputLayout(it) }
158
+ binding?.okButton?.let { viewThemeUtils.material.colorMaterialButtonText(it) }
159
+
126
160
binding?.textInputLayout?.requestFocus()
127
161
128
162
binding?.smileyButton?.setOnClickListener { onSmileyClick() }
@@ -162,32 +196,10 @@ class EntryMenuController(args: Bundle) :
162
196
163
197
var labelText = " "
164
198
when (operation) {
165
- ConversationOperationEnum .OPS_CODE_INVITE_USERS ,
166
199
ConversationOperationEnum .OPS_CODE_RENAME_ROOM -> {
167
200
labelText = resources!! .getString(R .string.nc_call_name)
168
201
binding?.textEdit?.inputType = InputType .TYPE_CLASS_TEXT
169
202
binding?.smileyButton?.visibility = View .VISIBLE
170
- emojiPopup = binding?.let {
171
- EmojiPopup (
172
- rootView = view,
173
- editText = it.textEdit,
174
- onEmojiPopupShownListener = {
175
- viewThemeUtils.platform.colorImageView(it.smileyButton, ColorRole .PRIMARY )
176
- },
177
- onEmojiPopupDismissListener = {
178
- it.smileyButton.imageTintList = ColorStateList .valueOf(
179
- ResourcesCompat .getColor(
180
- resources!! ,
181
- R .color.medium_emphasis_text,
182
- context.theme
183
- )
184
- )
185
- },
186
- onEmojiClickListener = {
187
- binding?.textEdit?.editableText?.append(" " )
188
- }
189
- )
190
- }
191
203
}
192
204
193
205
ConversationOperationEnum .OPS_CODE_JOIN_ROOM -> {
0 commit comments