Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
AloqaIM-Android
Commits
731e786c
Commit
731e786c
authored
Aug 06, 2018
by
Leonardo Aramaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not render custom emojis on composer
parent
56dc7727
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
ChatRoomFragment.kt
.../java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
+4
-2
No files found.
app/src/main/java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
View file @
731e786c
...
...
@@ -55,6 +55,7 @@ import chat.rocket.android.emoji.EmojiKeyboardPopup
import
chat.rocket.android.emoji.EmojiParser
import
chat.rocket.android.emoji.EmojiPickerPopup
import
chat.rocket.android.emoji.EmojiReactionListener
import
chat.rocket.android.emoji.internal.isCustom
import
chat.rocket.android.helper.EndlessRecyclerViewScrollListener
import
chat.rocket.android.helper.ImageHelper
import
chat.rocket.android.helper.KeyboardHelper
...
...
@@ -637,8 +638,9 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
val
cursorPosition
=
text_message
.
selectionStart
if
(
cursorPosition
>
-
1
)
{
context
?.
let
{
val
offset
=
if
(
emoji
.
url
==
null
)
emoji
.
unicode
.
length
else
emoji
.
shortname
.
length
text_message
.
text
?.
insert
(
cursorPosition
,
EmojiParser
.
parse
(
it
,
emoji
.
shortname
))
val
offset
=
if
(!
emoji
.
isCustom
())
emoji
.
unicode
.
length
else
emoji
.
shortname
.
length
val
parsed
=
if
(
emoji
.
isCustom
())
emoji
.
shortname
else
EmojiParser
.
parse
(
it
,
emoji
.
shortname
)
text_message
.
text
?.
insert
(
cursorPosition
,
parsed
)
text_message
.
setSelection
(
cursorPosition
+
offset
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment