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
f66024bb
Commit
f66024bb
authored
Jun 19, 2018
by
divyanshu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use context instead of activity
parent
d5621af4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
ChatRoomAdapter.kt
...a/chat/rocket/android/chatroom/adapter/ChatRoomAdapter.kt
+3
-3
ChatRoomFragment.kt
.../java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
+1
-1
No files found.
app/src/main/java/chat/rocket/android/chatroom/adapter/ChatRoomAdapter.kt
View file @
f66024bb
package
chat.rocket.android.chatroom.adapter
import
android.app.AlertDialog
import
android.content.Context
import
androidx.recyclerview.widget.RecyclerView
import
android.view.MenuItem
import
android.view.ViewGroup
import
androidx.fragment.app.FragmentActivity
import
chat.rocket.android.R
import
chat.rocket.android.chatroom.presentation.ChatRoomPresenter
import
chat.rocket.android.chatroom.uimodel.*
...
...
@@ -21,7 +21,7 @@ class ChatRoomAdapter(
private
val
presenter
:
ChatRoomPresenter
?
=
null
,
private
val
enableActions
:
Boolean
=
true
,
private
val
reactionListener
:
EmojiReactionListener
?
=
null
,
private
val
activity
:
FragmentActivity
?
=
null
private
val
context
:
Context
?
=
null
)
:
RecyclerView
.
Adapter
<
BaseViewHolder
<*>>()
{
private
val
dataSet
=
ArrayList
<
BaseUiModel
<*>>()
...
...
@@ -237,7 +237,7 @@ class ChatRoomAdapter(
}
}
R
.
id
.
action_message_delete
->
{
activity
?.
let
{
context
?.
let
{
val
builder
=
AlertDialog
.
Builder
(
it
)
builder
.
setTitle
(
it
.
getString
(
R
.
string
.
msg_delete_message
))
.
setMessage
(
it
.
getString
(
R
.
string
.
msg_delete_description
))
...
...
app/src/main/java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
View file @
f66024bb
...
...
@@ -258,7 +258,7 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
chatRoomName
,
presenter
,
reactionListener
=
this
@ChatRoomFragment
,
activity
=
activity
context
=
context
)
recycler_view
.
adapter
=
adapter
if
(
dataSet
.
size
>=
30
)
{
...
...
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