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
cb57e76e
Unverified
Commit
cb57e76e
authored
Sep 18, 2018
by
Filipe de Lima Brito
Committed by
GitHub
Sep 18, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1666 from RocketChat/fix-random-crash-emoji-keyboard
[FIX] Fix random crash emoji keyboard
parents
d4ced11a
91763a21
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
ChatRoomFragment.kt
.../java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
+0
-1
EmojiKeyboardPopup.kt
...main/java/chat/rocket/android/emoji/EmojiKeyboardPopup.kt
+7
-4
No files found.
app/src/main/java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
View file @
cb57e76e
...
...
@@ -334,7 +334,6 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
val
currentDayMarkerText
=
msgModel
.
currentDayMarkerText
val
previousDayMarkerText
=
prevMsgModel
.
currentDayMarkerText
println
(
"$previousDayMarkerText then $currentDayMarkerText"
)
if
(
previousDayMarkerText
!=
currentDayMarkerText
)
{
prevMsgModel
.
showDayMarker
=
true
}
...
...
emoji/src/main/java/chat/rocket/android/emoji/EmojiKeyboardPopup.kt
View file @
cb57e76e
...
...
@@ -156,21 +156,24 @@ class EmojiKeyboardPopup(context: Context, view: View) : OverKeyboardPopupWindow
private
suspend
fun
setupViewPager
()
{
context
.
let
{
val
callback
=
when
(
it
)
{
val
callback
:
EmojiKeyboardListener
?
=
when
(
it
)
{
is
EmojiKeyboardListener
->
it
else
->
{
val
fragments
=
(
it
as
AppCompatActivity
).
supportFragmentManager
.
fragments
if
(
fragments
.
size
==
0
||
!(
fragments
[
0
]
is
EmojiKeyboardListener
))
{
throw
IllegalStateException
(
"activity/fragment should implement Listener interface"
)
}
// Since the app can arrive in an inconsistent state at this point, do not throw
// throw IllegalStateException("activity/fragment should implement Listener interface")
null
}
else
{
fragments
[
0
]
as
EmojiKeyboardListener
}
}
}
adapter
=
EmojiPagerAdapter
(
object
:
EmojiKeyboardListener
{
override
fun
onEmojiAdded
(
emoji
:
Emoji
)
{
EmojiRepository
.
addToRecents
(
emoji
)
callback
.
onEmojiAdded
(
emoji
)
callback
?
.
onEmojiAdded
(
emoji
)
}
})
...
...
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