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
c6f9636b
Commit
c6f9636b
authored
May 07, 2018
by
Leonardo Aramaki
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into new/check-permissions-ro-channel
parents
74f6eb9b
c0c5ec4e
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
52 additions
and
13 deletions
+52
-13
build.gradle
app/build.gradle
+1
-1
UrlPreviewViewHolder.kt
...t/rocket/android/chatroom/adapter/UrlPreviewViewHolder.kt
+11
-3
ChatRoomsFragment.kt
...ava/chat/rocket/android/chatrooms/ui/ChatRoomsFragment.kt
+5
-1
MessageParser.kt
...src/main/java/chat/rocket/android/helper/MessageParser.kt
+2
-7
SaveActiveUsersInteractor.kt
...rocket/android/server/domain/SaveActiveUsersInteractor.kt
+1
-1
View.kt
...src/main/java/chat/rocket/android/util/extensions/View.kt
+16
-0
fragment_chat_rooms.xml
app/src/main/res/layout/fragment_chat_rooms.xml
+11
-0
strings.xml
app/src/main/res/values-es/strings.xml
+1
-0
strings.xml
app/src/main/res/values-fr/strings.xml
+1
-0
strings.xml
app/src/main/res/values-hi-rIN/strings.xml
+1
-0
strings.xml
app/src/main/res/values-pt-rBR/strings.xml
+1
-0
strings.xml
app/src/main/res/values/strings.xml
+1
-0
No files found.
app/build.gradle
View file @
c6f9636b
...
@@ -13,7 +13,7 @@ android {
...
@@ -13,7 +13,7 @@ android {
applicationId
"chat.rocket.android"
applicationId
"chat.rocket.android"
minSdkVersion
21
minSdkVersion
21
targetSdkVersion
versions
.
targetSdk
targetSdkVersion
versions
.
targetSdk
versionCode
201
8
versionCode
201
9
versionName
"2.1.0"
versionName
"2.1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled
true
multiDexEnabled
true
...
...
app/src/main/java/chat/rocket/android/chatroom/adapter/UrlPreviewViewHolder.kt
View file @
c6f9636b
...
@@ -5,6 +5,7 @@ import android.net.Uri
...
@@ -5,6 +5,7 @@ import android.net.Uri
import
android.view.View
import
android.view.View
import
chat.rocket.android.chatroom.viewmodel.UrlPreviewViewModel
import
chat.rocket.android.chatroom.viewmodel.UrlPreviewViewModel
import
chat.rocket.android.util.extensions.content
import
chat.rocket.android.util.extensions.content
import
chat.rocket.android.util.extensions.openTabbedUrl
import
chat.rocket.android.util.extensions.setVisible
import
chat.rocket.android.util.extensions.setVisible
import
chat.rocket.android.widget.emoji.EmojiReactionListener
import
chat.rocket.android.widget.emoji.EmojiReactionListener
import
kotlinx.android.synthetic.main.message_url_preview.view.*
import
kotlinx.android.synthetic.main.message_url_preview.view.*
...
@@ -32,10 +33,17 @@ class UrlPreviewViewHolder(itemView: View,
...
@@ -32,10 +33,17 @@ class UrlPreviewViewHolder(itemView: View,
text_title
.
content
=
data
.
title
text_title
.
content
=
data
.
title
text_description
.
content
=
data
.
description
?:
""
text_description
.
content
=
data
.
description
?:
""
url_preview_layout
.
setOnClickListener
{
view
->
url_preview_layout
.
setOnClickListener
(
onClickListener
)
view
.
context
.
startActivity
(
Intent
(
Intent
.
ACTION_VIEW
,
Uri
.
parse
(
data
.
rawData
.
url
)))
text_host
.
setOnClickListener
(
onClickListener
)
}
text_title
.
setOnClickListener
(
onClickListener
)
image_preview
.
setOnClickListener
(
onClickListener
)
text_description
.
setOnClickListener
(
onClickListener
)
}
}
}
}
private
val
onClickListener
=
{
view
:
View
->
if
(
data
!=
null
)
{
view
.
openTabbedUrl
(
Uri
.
parse
(
data
!!
.
rawData
.
url
))
}
}
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/chatrooms/ui/ChatRoomsFragment.kt
View file @
c6f9636b
...
@@ -166,7 +166,11 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
...
@@ -166,7 +166,11 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
/*val diff = async(CommonPool) {
/*val diff = async(CommonPool) {
DiffUtil.calculateDiff(RoomsDiffCallback(adapter.baseAdapter.dataSet, newDataSet))
DiffUtil.calculateDiff(RoomsDiffCallback(adapter.baseAdapter.dataSet, newDataSet))
}.await()*/
}.await()*/
if
(
newDataSet
.
isEmpty
())
{
text_no_search
.
visibility
=
View
.
VISIBLE
}
else
{
text_no_search
.
visibility
=
View
.
GONE
}
if
(
isActive
)
{
if
(
isActive
)
{
adapter
.
baseAdapter
.
updateRooms
(
newDataSet
)
adapter
.
baseAdapter
.
updateRooms
(
newDataSet
)
// TODO - fix crash to re-enable diff.dispatchUpdatesTo(adapter)
// TODO - fix crash to re-enable diff.dispatchUpdatesTo(adapter)
...
...
app/src/main/java/chat/rocket/android/helper/MessageParser.kt
View file @
c6f9636b
...
@@ -6,7 +6,6 @@ import android.graphics.Canvas
...
@@ -6,7 +6,6 @@ import android.graphics.Canvas
import
android.graphics.Paint
import
android.graphics.Paint
import
android.graphics.RectF
import
android.graphics.RectF
import
android.net.Uri
import
android.net.Uri
import
android.support.customtabs.CustomTabsIntent
import
android.support.v4.content.res.ResourcesCompat
import
android.support.v4.content.res.ResourcesCompat
import
android.text.Spanned
import
android.text.Spanned
import
android.text.style.ClickableSpan
import
android.text.style.ClickableSpan
...
@@ -16,6 +15,7 @@ import android.view.View
...
@@ -16,6 +15,7 @@ import android.view.View
import
chat.rocket.android.R
import
chat.rocket.android.R
import
chat.rocket.android.server.domain.PublicSettings
import
chat.rocket.android.server.domain.PublicSettings
import
chat.rocket.android.server.domain.useRealName
import
chat.rocket.android.server.domain.useRealName
import
chat.rocket.android.util.extensions.openTabbedUrl
import
chat.rocket.android.widget.emoji.EmojiParser
import
chat.rocket.android.widget.emoji.EmojiParser
import
chat.rocket.android.widget.emoji.EmojiRepository
import
chat.rocket.android.widget.emoji.EmojiRepository
import
chat.rocket.android.widget.emoji.EmojiTypefaceSpan
import
chat.rocket.android.widget.emoji.EmojiTypefaceSpan
...
@@ -151,12 +151,7 @@ class MessageParser @Inject constructor(
...
@@ -151,12 +151,7 @@ class MessageParser @Inject constructor(
if
(!
link
.
startsWith
(
"@"
)
&&
link
!
in
consumed
)
{
if
(!
link
.
startsWith
(
"@"
)
&&
link
!
in
consumed
)
{
builder
.
setSpan
(
object
:
ClickableSpan
()
{
builder
.
setSpan
(
object
:
ClickableSpan
()
{
override
fun
onClick
(
view
:
View
)
{
override
fun
onClick
(
view
:
View
)
{
with
(
view
)
{
view
.
openTabbedUrl
(
getUri
(
link
))
val
tabsbuilder
=
CustomTabsIntent
.
Builder
()
tabsbuilder
.
setToolbarColor
(
ResourcesCompat
.
getColor
(
context
.
resources
,
R
.
color
.
colorPrimary
,
context
.
theme
))
val
customTabsIntent
=
tabsbuilder
.
build
()
customTabsIntent
.
launchUrl
(
context
,
getUri
(
link
))
}
}
}
},
matcher
.
start
(
0
),
matcher
.
end
(
0
))
},
matcher
.
start
(
0
),
matcher
.
end
(
0
))
consumed
.
add
(
link
)
consumed
.
add
(
link
)
...
...
app/src/main/java/chat/rocket/android/server/domain/SaveActiveUsersInteractor.kt
View file @
c6f9636b
...
@@ -30,7 +30,7 @@ class SaveActiveUsersInteractor @Inject constructor(
...
@@ -30,7 +30,7 @@ class SaveActiveUsersInteractor @Inject constructor(
status
=
user
.
status
?:
it
.
status
,
status
=
user
.
status
?:
it
.
status
,
emails
=
user
.
emails
?:
it
.
emails
,
emails
=
user
.
emails
?:
it
.
emails
,
utcOffset
=
user
.
utcOffset
?:
it
.
utcOffset
,
utcOffset
=
user
.
utcOffset
?:
it
.
utcOffset
,
roles
=
user
.
roles
roles
=
user
.
roles
?:
it
.
roles
)
)
val
activeUserList
:
MutableList
<
User
>
=
val
activeUserList
:
MutableList
<
User
>
=
...
...
app/src/main/java/chat/rocket/android/util/extensions/View.kt
0 → 100644
View file @
c6f9636b
package
chat.rocket.android.util.extensions
import
android.net.Uri
import
android.support.customtabs.CustomTabsIntent
import
android.support.v4.content.res.ResourcesCompat
import
android.view.View
import
chat.rocket.android.R
fun
View
.
openTabbedUrl
(
url
:
Uri
)
{
with
(
this
)
{
val
tabsbuilder
=
CustomTabsIntent
.
Builder
()
tabsbuilder
.
setToolbarColor
(
ResourcesCompat
.
getColor
(
context
.
resources
,
R
.
color
.
colorPrimary
,
context
.
theme
))
val
customTabsIntent
=
tabsbuilder
.
build
()
customTabsIntent
.
launchUrl
(
context
,
url
)
}
}
\ No newline at end of file
app/src/main/res/layout/fragment_chat_rooms.xml
View file @
c6f9636b
...
@@ -45,4 +45,15 @@
...
@@ -45,4 +45,15 @@
tools:text=
"connected"
tools:text=
"connected"
tools:visibility=
"visible"
/>
tools:visibility=
"visible"
/>
<TextView
android:id=
"@+id/text_no_search"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"56dp"
android:text=
"@string/msg_no_search_found"
android:textSize=
"20sp"
android:layout_centerHorizontal=
"true"
android:visibility=
"gone"
tools:visibility=
"visible"
/>
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
app/src/main/res/values-es/strings.xml
View file @
c6f9636b
...
@@ -111,6 +111,7 @@
...
@@ -111,6 +111,7 @@
<string
name=
"msg_no_chat_title"
>
Sin mensajes de chat
</string>
<string
name=
"msg_no_chat_title"
>
Sin mensajes de chat
</string>
<string
name=
"msg_no_chat_description"
>
Comience a conversar para ver\nsus mensajes aquí.
</string>
<string
name=
"msg_no_chat_description"
>
Comience a conversar para ver\nsus mensajes aquí.
</string>
<string
name=
"msg_edited"
>
(editado)
</string>
<string
name=
"msg_edited"
>
(editado)
</string>
<string
name=
"msg_no_search_found"
>
No se han encontrado resultados
</string>
<!-- System messages -->
<!-- System messages -->
<string
name=
"message_room_name_changed"
>
Nombre de la sala cambiado para: %1$s por %2$s
</string>
<string
name=
"message_room_name_changed"
>
Nombre de la sala cambiado para: %1$s por %2$s
</string>
...
...
app/src/main/res/values-fr/strings.xml
View file @
c6f9636b
...
@@ -111,6 +111,7 @@
...
@@ -111,6 +111,7 @@
<string
name=
"msg_no_chat_title"
>
Aucun message de discussion
</string>
<string
name=
"msg_no_chat_title"
>
Aucun message de discussion
</string>
<string
name=
"msg_no_chat_description"
>
Commencez à converser pour voir\nvos messages ici.
</string>
<string
name=
"msg_no_chat_description"
>
Commencez à converser pour voir\nvos messages ici.
</string>
<string
name=
"msg_edited"
>
(édité)
</string>
<string
name=
"msg_edited"
>
(édité)
</string>
<string
name=
"msg_no_search_found"
>
Aucun résultat trouvé
</string>
<!-- System messages -->
<!-- System messages -->
<string
name=
"message_room_name_changed"
>
Le nom de le salle a changé à: %1$s par %2$s
</string>
<string
name=
"message_room_name_changed"
>
Le nom de le salle a changé à: %1$s par %2$s
</string>
...
...
app/src/main/res/values-hi-rIN/strings.xml
View file @
c6f9636b
...
@@ -113,6 +113,7 @@
...
@@ -113,6 +113,7 @@
<string
name=
"msg_no_chat_title"
>
कोई चैट संदेश नहीं
</string>
<string
name=
"msg_no_chat_title"
>
कोई चैट संदेश नहीं
</string>
<string
name=
"msg_no_chat_description"
>
यहां अपने संदेश देखने के लिए\nबातचीत शुरू करें।
</string>
<string
name=
"msg_no_chat_description"
>
यहां अपने संदेश देखने के लिए\nबातचीत शुरू करें।
</string>
<string
name=
"msg_edited"
>
(संपादित)
</string>
<string
name=
"msg_edited"
>
(संपादित)
</string>
<string
name=
"msg_no_search_found"
>
कोई परिणाम नहीं मिला
</string>
<!-- System messages -->
<!-- System messages -->
<string
name=
"message_room_name_changed"
>
%2$s ने रूम का नाम बदलकर %1$s किया
</string>
<string
name=
"message_room_name_changed"
>
%2$s ने रूम का नाम बदलकर %1$s किया
</string>
...
...
app/src/main/res/values-pt-rBR/strings.xml
View file @
c6f9636b
...
@@ -107,6 +107,7 @@
...
@@ -107,6 +107,7 @@
<string
name=
"msg_image_saved_successfully"
>
Imagem salva na galeria
</string>
<string
name=
"msg_image_saved_successfully"
>
Imagem salva na galeria
</string>
<string
name=
"msg_image_saved_failed"
>
Falha ao salvar a imagem
</string>
<string
name=
"msg_image_saved_failed"
>
Falha ao salvar a imagem
</string>
<string
name=
"msg_edited"
>
(editado)
</string>
<string
name=
"msg_edited"
>
(editado)
</string>
<string
name=
"msg_no_search_found"
>
nenhum resultado encontrado
</string>
<!-- System messages -->
<!-- System messages -->
<string
name=
"message_room_name_changed"
>
Nome da sala alterado para: %1$s por %2$s
</string>
<string
name=
"message_room_name_changed"
>
Nome da sala alterado para: %1$s por %2$s
</string>
...
...
app/src/main/res/values/strings.xml
View file @
c6f9636b
...
@@ -108,6 +108,7 @@
...
@@ -108,6 +108,7 @@
<string
name=
"msg_image_saved_successfully"
>
Image has been saved to gallery
</string>
<string
name=
"msg_image_saved_successfully"
>
Image has been saved to gallery
</string>
<string
name=
"msg_image_saved_failed"
>
Failed to save image
</string>
<string
name=
"msg_image_saved_failed"
>
Failed to save image
</string>
<string
name=
"msg_edited"
>
(edited)
</string>
<string
name=
"msg_edited"
>
(edited)
</string>
<string
name=
"msg_no_search_found"
>
No result found
</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