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
1be1872f
Commit
1be1872f
authored
Jul 27, 2018
by
Lucio Maciel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check if we are in a RESUMED state before showing the Dialog.
parent
87ec4725
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
BaseViewHolder.kt
...va/chat/rocket/android/chatroom/adapter/BaseViewHolder.kt
+6
-3
No files found.
app/src/main/java/chat/rocket/android/chatroom/adapter/BaseViewHolder.kt
View file @
1be1872f
...
...
@@ -6,6 +6,7 @@ import android.view.View
import
android.view.ViewGroup
import
androidx.appcompat.app.AppCompatActivity
import
androidx.core.view.children
import
androidx.lifecycle.Lifecycle
import
androidx.recyclerview.widget.RecyclerView
import
chat.rocket.android.R
import
chat.rocket.android.chatroom.ui.bottomsheet.MessageActionsBottomSheet
...
...
@@ -94,9 +95,11 @@ abstract class BaseViewHolder<T : BaseUiModel<*>>(
view
.
context
?.
let
{
if
(
it
is
ContextThemeWrapper
&&
it
.
baseContext
is
AppCompatActivity
)
{
with
(
it
.
baseContext
as
AppCompatActivity
)
{
val
actionsBottomSheet
=
MessageActionsBottomSheet
()
actionsBottomSheet
.
addItems
(
menuItems
,
this
@BaseViewHolder
)
actionsBottomSheet
.
show
(
supportFragmentManager
,
null
)
if
(
this
.
lifecycle
.
currentState
.
isAtLeast
(
Lifecycle
.
State
.
RESUMED
))
{
val
actionsBottomSheet
=
MessageActionsBottomSheet
()
actionsBottomSheet
.
addItems
(
menuItems
,
this
@BaseViewHolder
)
actionsBottomSheet
.
show
(
supportFragmentManager
,
null
)
}
}
}
}
...
...
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