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
c16a1d36
Commit
c16a1d36
authored
Nov 26, 2018
by
Leonardo Aramaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add icon and localization strings to the report feature
parent
57507918
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
34 additions
and
38 deletions
+34
-38
ChatRoomPresenter.kt
...rocket/android/chatroom/presentation/ChatRoomPresenter.kt
+1
-0
ChatRoomFragment.kt
.../java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
+2
-32
ic_action_message_report_24dp.xml
app/src/main/res/drawable/ic_action_message_report_24dp.xml
+10
-0
message_actions.xml
app/src/main/res/menu/message_actions.xml
+2
-2
strings.xml
app/src/main/res/values-de/strings.xml
+3
-2
strings.xml
app/src/main/res/values-es/strings.xml
+1
-0
strings.xml
app/src/main/res/values-fr/strings.xml
+2
-0
strings.xml
app/src/main/res/values-hi-rIN/strings.xml
+2
-0
strings.xml
app/src/main/res/values-it/strings.xml
+2
-0
strings.xml
app/src/main/res/values-ja/strings.xml
+2
-0
strings.xml
app/src/main/res/values-pt-rBR/strings.xml
+1
-2
strings.xml
app/src/main/res/values-ru-rRU/strings.xml
+2
-0
strings.xml
app/src/main/res/values-tr/strings.xml
+1
-0
strings.xml
app/src/main/res/values-uk/strings.xml
+2
-0
strings.xml
app/src/main/res/values/strings.xml
+1
-0
No files found.
app/src/main/java/chat/rocket/android/chatroom/presentation/ChatRoomPresenter.kt
View file @
c16a1d36
...
...
@@ -380,6 +380,7 @@ class ChatRoomPresenter @Inject constructor(
retryIO
(
"reportMessage($messageId, $description)"
)
{
client
.
reportMessage
(
messageId
=
messageId
,
description
=
description
)
}
view
.
showMessage
(
R
.
string
.
report_sent
)
}
catch
(
ex
:
RocketChatException
)
{
Timber
.
e
(
ex
)
}
...
...
app/src/main/java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
View file @
c16a1d36
...
...
@@ -86,8 +86,6 @@ import dagger.android.support.AndroidSupportInjection
import
io.reactivex.Observable
import
io.reactivex.disposables.CompositeDisposable
import
io.reactivex.disposables.Disposable
import
kotlinx.android.synthetic.main.dialog_report.view.*
import
kotlinx.android.synthetic.main.emoji_image_row_item.*
import
kotlinx.android.synthetic.main.emoji_image_row_item.view.*
import
kotlinx.android.synthetic.main.emoji_row_item.view.*
import
kotlinx.android.synthetic.main.fragment_chat_room.*
...
...
@@ -95,7 +93,6 @@ import kotlinx.android.synthetic.main.message_attachment_options.*
import
kotlinx.android.synthetic.main.message_composer.*
import
kotlinx.android.synthetic.main.message_list.*
import
kotlinx.android.synthetic.main.reaction_praises_list_item.view.*
import
kotlinx.android.synthetic.main.reaction_praises_list_item.*
import
timber.log.Timber
import
java.io.File
import
java.io.IOException
...
...
@@ -1174,34 +1171,7 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
}
override
fun
reportMessage
(
id
:
String
)
{
val
root
=
LayoutInflater
.
from
(
requireContext
()).
inflate
(
R
.
layout
.
dialog_report
,
null
)
val
disposable
=
CompositeDisposable
()
val
dialog
=
androidx
.
appcompat
.
app
.
AlertDialog
.
Builder
(
requireContext
())
.
setTitle
(
R
.
string
.
action_msg_report
)
.
setCancelable
(
true
)
.
setView
(
root
)
.
setOnDismissListener
{
disposable
.
clear
()
}
.
show
()
with
(
root
)
{
disposable
.
add
(
edit_text_description
.
asObservable
()
.
skip
(
1
)
.
subscribe
{
if
(
it
.
isNotEmpty
())
text_view_error
.
fadeOut
()
}
)
button_send_report
.
setOnClickListener
{
val
description
=
edit_text_description
.
text
.
toString
()
if
(
description
.
isBlank
())
{
text_view_error
.
fadeIn
()
}
else
{
dialog
.
dismiss
()
presenter
.
reportMessage
(
messageId
=
id
,
description
=
description
)
}
}
}
presenter
.
reportMessage
(
messageId
=
id
,
description
=
"This message was reported by a user from the Android app"
)
}
}
app/src/main/res/drawable/ic_action_message_report_24dp.xml
0 → 100644
View file @
c16a1d36
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"20"
android:viewportHeight=
"20"
>
<path
android:fillColor=
"@color/actionMenuColor"
android:pathData=
"M10.11,16.546h-0.183c-4.329,0 -7.47,-2.753 -7.47,-6.546 0,-3.61 2.942,-6.547 6.56,-6.547 3.616,0 6.56,2.937 6.56,6.547 0,0.59 -0.276,1.18 -0.567,1.803 -0.1,0.218 -0.2,0.433 -0.278,0.618 -0.756,1.626 0.731,2.41 1.364,2.743 0.098,0.051 0.224,0.117 0.326,0.178 -0.416,0.478 -1.814,1.22 -6.312,1.204m6.666,-2.667c-0.895,-0.473 -0.852,-0.567 -0.71,-0.875 0.081,-0.193 0.172,-0.389 0.264,-0.587 0.33,-0.705 0.703,-1.505 0.703,-2.417 0,-4.412 -3.597,-8 -8.017,-8S1,5.588 1,10c0,4.635 3.755,8 8.927,8h0.382c2.857,0 6.632,-0.256 7.565,-2.237 0.493,-1.046 -0.58,-1.612 -1.098,-1.884"
/>
</vector>
app/src/main/res/menu/message_actions.xml
View file @
c16a1d36
<?xml version="1.0" encoding="utf-8"?>
<menu
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<menu
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:id=
"@+id/action_message_info"
...
...
@@ -52,6 +51,7 @@
<item
android:id=
"@+id/action_message_report"
android:icon=
"@drawable/ic_action_message_report_24dp"
android:title=
"@string/action_msg_report"
/>
<item
...
...
app/src/main/res/values-de/strings.xml
View file @
c16a1d36
...
...
@@ -338,6 +338,7 @@
<string
name=
"timezone"
>
Timezone
</string>
<!--TODO - Add proper translation-->
<!-- Report -->
<string
name=
"submit"
>
Submit
</string>
<string
name=
"required"
>
*required
</string>
<string
name=
"submit"
>
Submit
</string>
<!--TODO - Add proper translation-->
<string
name=
"required"
>
*required
</string>
<!--TODO - Add proper translation-->
<string
name=
"report_sent"
>
Your report has been sent!
</string>
<!--TODO - Add proper translation-->
</resources>
app/src/main/res/values-es/strings.xml
View file @
c16a1d36
...
...
@@ -340,4 +340,5 @@
<!-- Report -->
<string
name=
"submit"
>
Submit
</string>
<!--TODO - Add proper translation-->
<string
name=
"required"
>
*required
</string>
<!--TODO - Add proper translation-->
<string
name=
"report_sent"
>
Your report has been sent!
</string>
<!--TODO - Add proper translation-->
</resources>
app/src/main/res/values-fr/strings.xml
View file @
c16a1d36
...
...
@@ -347,4 +347,6 @@
<string
name=
"submit"
>
Submit
</string>
<!--TODO - Add proper translation-->
<string
name=
"required"
>
*required
</string>
<!--TODO - Add proper translation-->
<string
name=
"report_sent"
>
Your report has been sent!
</string>
</resources>
app/src/main/res/values-hi-rIN/strings.xml
View file @
c16a1d36
...
...
@@ -347,4 +347,6 @@
<string
name=
"submit"
>
Submit
</string>
<!--TODO - Add proper translation-->
<string
name=
"required"
>
*required
</string>
<!--TODO - Add proper translation-->
<string
name=
"report_sent"
>
Your report has been sent!
</string>
</resources>
app/src/main/res/values-it/strings.xml
View file @
c16a1d36
...
...
@@ -342,4 +342,6 @@
<string
name=
"submit"
>
Submit
</string>
<!--TODO - Add proper translation-->
<string
name=
"required"
>
*required
</string>
<!--TODO - Add proper translation-->
<string
name=
"report_sent"
>
Your report has been sent!
</string>
</resources>
app/src/main/res/values-ja/strings.xml
View file @
c16a1d36
...
...
@@ -349,4 +349,6 @@
<string
name=
"submit"
>
Submit
</string>
<!--TODO - Add proper translation-->
<string
name=
"required"
>
*required
</string>
<!--TODO - Add proper translation-->
<string
name=
"report_sent"
>
Your report has been sent!
</string>
</resources>
app/src/main/res/values-pt-rBR/strings.xml
View file @
c16a1d36
...
...
@@ -342,8 +342,7 @@
<string
name=
"timezone"
>
Fuso horário
</string>
<!-- Report -->
<!--TODO - Add proper translation-->
<string
name=
"submit"
>
Enviar
</string>
<!--TODO - Add proper translation-->
<string
name=
"required"
>
*obrigatório
</string>
<string
name=
"report_sent"
>
A mensagem foi reportada!
</string>
</resources>
app/src/main/res/values-ru-rRU/strings.xml
View file @
c16a1d36
...
...
@@ -344,4 +344,6 @@
<string
name=
"submit"
>
Submit
</string>
<!--TODO - Add proper translation-->
<string
name=
"required"
>
*required
</string>
<!--TODO - Add proper translation-->
<string
name=
"report_sent"
>
Your report has been sent!
</string>
</resources>
app/src/main/res/values-tr/strings.xml
View file @
c16a1d36
...
...
@@ -343,4 +343,5 @@
<!-- Report -->
<string
name=
"submit"
>
Submit
</string>
<!--TODO - Add proper translation-->
<string
name=
"required"
>
*required
</string>
<!--TODO - Add proper translation-->
<string
name=
"report_sent"
>
Your report has been sent!
</string>
<!--TODO - Add proper translation-->
</resources>
app/src/main/res/values-uk/strings.xml
View file @
c16a1d36
...
...
@@ -346,4 +346,6 @@
<string
name=
"submit"
>
Submit
</string>
<!--TODO - Add proper translation-->
<string
name=
"required"
>
*required
</string>
<!--TODO - Add proper translation-->
<string
name=
"report_sent"
>
Your report has been sent!
</string>
</resources>
app/src/main/res/values/strings.xml
View file @
c16a1d36
...
...
@@ -357,4 +357,5 @@ https://github.com/RocketChat/java-code-styles/blob/master/CODING_STYLE.md#strin
<!-- Report -->
<string
name=
"submit"
>
Submit
</string>
<string
name=
"required"
>
*required
</string>
<string
name=
"report_sent"
>
Your report has been sent!
</string>
</resources>
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