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
18e06ae0
Unverified
Commit
18e06ae0
authored
Jun 19, 2018
by
Filipe de Lima Brito
Committed by
GitHub
Jun 19, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1393 from divyanshub024/message-confirm
[IMPROVEMENT] Confirm before deleting the message
parents
796f6c26
cfd7193b
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
32 additions
and
3 deletions
+32
-3
ChatRoomAdapter.kt
...a/chat/rocket/android/chatroom/adapter/ChatRoomAdapter.kt
+14
-2
ChatRoomFragment.kt
.../java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
+2
-1
strings.xml
app/src/main/res/values-es/strings.xml
+3
-0
strings.xml
app/src/main/res/values-fr/strings.xml
+3
-0
strings.xml
app/src/main/res/values-hi-rIN/strings.xml
+2
-0
strings.xml
app/src/main/res/values-pt-rBR/strings.xml
+3
-0
strings.xml
app/src/main/res/values-uk-rRU/strings.xml
+3
-0
strings.xml
app/src/main/res/values/strings.xml
+2
-0
No files found.
app/src/main/java/chat/rocket/android/chatroom/adapter/ChatRoomAdapter.kt
View file @
18e06ae0
package
chat.rocket.android.chatroom.adapter
package
chat.rocket.android.chatroom.adapter
import
android.app.AlertDialog
import
android.content.Context
import
androidx.recyclerview.widget.RecyclerView
import
androidx.recyclerview.widget.RecyclerView
import
android.view.MenuItem
import
android.view.MenuItem
import
android.view.ViewGroup
import
android.view.ViewGroup
...
@@ -18,7 +20,8 @@ class ChatRoomAdapter(
...
@@ -18,7 +20,8 @@ class ChatRoomAdapter(
private
val
roomName
:
String
?
=
null
,
private
val
roomName
:
String
?
=
null
,
private
val
presenter
:
ChatRoomPresenter
?
=
null
,
private
val
presenter
:
ChatRoomPresenter
?
=
null
,
private
val
enableActions
:
Boolean
=
true
,
private
val
enableActions
:
Boolean
=
true
,
private
val
reactionListener
:
EmojiReactionListener
?
=
null
private
val
reactionListener
:
EmojiReactionListener
?
=
null
,
private
val
context
:
Context
?
=
null
)
:
RecyclerView
.
Adapter
<
BaseViewHolder
<*>>()
{
)
:
RecyclerView
.
Adapter
<
BaseViewHolder
<*>>()
{
private
val
dataSet
=
ArrayList
<
BaseUiModel
<*>>()
private
val
dataSet
=
ArrayList
<
BaseUiModel
<*>>()
...
@@ -233,7 +236,16 @@ class ChatRoomAdapter(
...
@@ -233,7 +236,16 @@ class ChatRoomAdapter(
presenter
?.
unpinMessage
(
id
)
presenter
?.
unpinMessage
(
id
)
}
}
}
}
R
.
id
.
action_message_delete
->
presenter
?.
deleteMessage
(
roomId
,
id
)
R
.
id
.
action_message_delete
->
{
context
?.
let
{
val
builder
=
AlertDialog
.
Builder
(
it
)
builder
.
setTitle
(
it
.
getString
(
R
.
string
.
msg_delete_message
))
.
setMessage
(
it
.
getString
(
R
.
string
.
msg_delete_description
))
.
setPositiveButton
(
it
.
getString
(
R
.
string
.
msg_ok
))
{
_
,
_
->
presenter
?.
deleteMessage
(
roomId
,
id
)
}
.
setNegativeButton
(
it
.
getString
(
R
.
string
.
msg_cancel
))
{
_
,
_
->
}
.
show
()
}
}
R
.
id
.
action_menu_msg_react
->
presenter
?.
showReactions
(
id
)
R
.
id
.
action_menu_msg_react
->
presenter
?.
showReactions
(
id
)
else
->
TODO
(
"Not implemented"
)
else
->
TODO
(
"Not implemented"
)
}
}
...
...
app/src/main/java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
View file @
18e06ae0
...
@@ -257,7 +257,8 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
...
@@ -257,7 +257,8 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
chatRoomType
,
chatRoomType
,
chatRoomName
,
chatRoomName
,
presenter
,
presenter
,
reactionListener
=
this
@ChatRoomFragment
reactionListener
=
this
@ChatRoomFragment
,
context
=
context
)
)
recycler_view
.
adapter
=
adapter
recycler_view
.
adapter
=
adapter
if
(
dataSet
.
size
>=
30
)
{
if
(
dataSet
.
size
>=
30
)
{
...
...
app/src/main/res/values-es/strings.xml
View file @
18e06ae0
...
@@ -132,6 +132,9 @@
...
@@ -132,6 +132,9 @@
// TODO: Add proper translation.
// TODO: Add proper translation.
<string
name=
"msg_search"
>
Search
</string>
<string
name=
"msg_search"
>
Search
</string>
<string
name=
"msg_message_copied"
>
Mensaje copiado
</string>
<string
name=
"msg_message_copied"
>
Mensaje copiado
</string>
// TODO: Add proper translation.
<string
name=
"msg_delete_message"
>
Delete Message
</string>
<string
name=
"msg_delete_description"
>
Are you sure you want to delete this message
</string>
<!-- Create channel messages -->
<!-- Create channel messages -->
// TODO: Add proper translation.
// TODO: Add proper translation.
...
...
app/src/main/res/values-fr/strings.xml
View file @
18e06ae0
...
@@ -132,6 +132,9 @@
...
@@ -132,6 +132,9 @@
// TODO: Add proper translation.
// TODO: Add proper translation.
<string
name=
"msg_search"
>
Search
</string>
<string
name=
"msg_search"
>
Search
</string>
<string
name=
"msg_message_copied"
>
Message copié
</string>
<string
name=
"msg_message_copied"
>
Message copié
</string>
// TODO: Add proper translation.
<string
name=
"msg_delete_message"
>
Delete Message
</string>
<string
name=
"msg_delete_description"
>
Are you sure you want to delete this message
</string>
<!-- Create channel messages -->
<!-- Create channel messages -->
// TODO: Add proper translation.
// TODO: Add proper translation.
...
...
app/src/main/res/values-hi-rIN/strings.xml
View file @
18e06ae0
...
@@ -123,6 +123,8 @@
...
@@ -123,6 +123,8 @@
// TODO: Add proper translation.
// TODO: Add proper translation.
<string
name=
"msg_search"
>
Search
</string>
<string
name=
"msg_search"
>
Search
</string>
<string
name=
"msg_message_copied"
>
संदेश कॉपी किया गया
</string>
<string
name=
"msg_message_copied"
>
संदेश कॉपी किया गया
</string>
<string
name=
"msg_delete_message"
>
संदेश को हटाएं
</string>
<string
name=
"msg_delete_description"
>
क्या आप निश्चित रूप से यह संदेश हटाना चाहते हैं
</string>
<!-- Create channel messages -->
<!-- Create channel messages -->
// TODO: Add proper translation.
// TODO: Add proper translation.
...
...
app/src/main/res/values-pt-rBR/strings.xml
View file @
18e06ae0
...
@@ -119,6 +119,9 @@
...
@@ -119,6 +119,9 @@
<string
name=
"msg_channel_name"
>
Nome do chat
</string>
<string
name=
"msg_channel_name"
>
Nome do chat
</string>
<string
name=
"msg_search"
>
Buscar
</string>
<string
name=
"msg_search"
>
Buscar
</string>
<string
name=
"msg_message_copied"
>
Mensagem copiada
</string>
<string
name=
"msg_message_copied"
>
Mensagem copiada
</string>
// TODO: Add proper translation.
<string
name=
"msg_delete_message"
>
Delete Message
</string>
<string
name=
"msg_delete_description"
>
Are you sure you want to delete this message
</string>
<!-- Create channel messages -->
<!-- Create channel messages -->
<string
name=
"msg_private_channel"
>
Privado
</string>
<string
name=
"msg_private_channel"
>
Privado
</string>
...
...
app/src/main/res/values-uk-rRU/strings.xml
View file @
18e06ae0
...
@@ -117,6 +117,9 @@
...
@@ -117,6 +117,9 @@
<string
name=
"msg_several_users_are_typing"
>
Несколько пользователей печатают…
</string>
<string
name=
"msg_several_users_are_typing"
>
Несколько пользователей печатают…
</string>
<string
name=
"msg_no_search_found"
>
Результатов не найдено
</string>
<string
name=
"msg_no_search_found"
>
Результатов не найдено
</string>
<string
name=
"msg_message_copied"
>
Сообщение скопировано
</string>
<string
name=
"msg_message_copied"
>
Сообщение скопировано
</string>
// TODO: Add proper translation.
<string
name=
"msg_delete_message"
>
Delete Message
</string>
<string
name=
"msg_delete_description"
>
Are you sure you want to delete this message
</string>
<string
name=
"msg_channel_name"
>
Назва каналу
</string>
<string
name=
"msg_channel_name"
>
Назва каналу
</string>
<string
name=
"msg_search"
>
Пошук
</string>
<string
name=
"msg_search"
>
Пошук
</string>
...
...
app/src/main/res/values/strings.xml
View file @
18e06ae0
...
@@ -133,6 +133,8 @@
...
@@ -133,6 +133,8 @@
<string
name=
"msg_channel_created_successfully"
>
Channel created successfully
</string>
<string
name=
"msg_channel_created_successfully"
>
Channel created successfully
</string>
<string
name=
"msg_message_copied"
>
Message copied
</string>
<string
name=
"msg_message_copied"
>
Message copied
</string>
<string
name=
"msg_delete_message"
>
Delete Message
</string>
<string
name=
"msg_delete_description"
>
Are you sure you want to delete this message
</string>
<!-- System messages -->
<!-- System messages -->
<string
name=
"message_room_name_changed"
>
Room name changed to: %1$s by %2$s
</string>
<string
name=
"message_room_name_changed"
>
Room name changed to: %1$s by %2$s
</string>
...
...
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