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
056c213a
Commit
056c213a
authored
Dec 07, 2018
by
Leonardo Aramaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some usability adjustments
parent
d1aa1b36
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
223 additions
and
167 deletions
+223
-167
MessageViewHolder.kt
...chat/rocket/android/chatroom/adapter/MessageViewHolder.kt
+1
-0
UserDao.kt
app/src/main/java/chat/rocket/android/db/UserDao.kt
+1
-1
UserDetailsPresenter.kt
.../android/userdetails/presentation/UserDetailsPresenter.kt
+80
-53
UserDetailsView.kt
...ocket/android/userdetails/presentation/UserDetailsView.kt
+4
-0
UserDetailsActivity.kt
...chat/rocket/android/userdetails/ui/UserDetailsActivity.kt
+84
-52
activity_user_details.xml
app/src/main/res/layout/activity_user_details.xml
+1
-0
strings.xml
app/src/main/res/values-de/strings.xml
+2
-0
strings.xml
app/src/main/res/values-es/strings.xml
+3
-0
strings.xml
app/src/main/res/values-fr/strings.xml
+8
-10
strings.xml
app/src/main/res/values-hi-rIN/strings.xml
+6
-9
strings.xml
app/src/main/res/values-it/strings.xml
+7
-10
strings.xml
app/src/main/res/values-ja/strings.xml
+7
-10
strings.xml
app/src/main/res/values-pt-rBR/strings.xml
+2
-2
strings.xml
app/src/main/res/values-ru-rRU/strings.xml
+7
-10
strings.xml
app/src/main/res/values-tr/strings.xml
+2
-0
strings.xml
app/src/main/res/values-uk/strings.xml
+6
-10
strings.xml
app/src/main/res/values/strings.xml
+2
-0
No files found.
app/src/main/java/chat/rocket/android/chatroom/adapter/MessageViewHolder.kt
View file @
056c213a
...
@@ -75,6 +75,7 @@ class MessageViewHolder(
...
@@ -75,6 +75,7 @@ class MessageViewHolder(
val
senderId
=
data
.
message
.
sender
?.
id
val
senderId
=
data
.
message
.
sender
?.
id
val
subscriptionId
=
data
.
subscriptionId
val
subscriptionId
=
data
.
subscriptionId
text_sender
.
setOnClickListener
{
text_sender
.
setOnClickListener
{
toUserDetails
(
context
,
senderId
,
subscriptionId
)
toUserDetails
(
context
,
senderId
,
subscriptionId
)
}
}
...
...
app/src/main/java/chat/rocket/android/db/UserDao.kt
View file @
056c213a
...
@@ -29,7 +29,7 @@ abstract class UserDao : BaseDao<UserEntity> {
...
@@ -29,7 +29,7 @@ abstract class UserDao : BaseDao<UserEntity> {
abstract
fun
findUser
(
id
:
String
):
String
?
abstract
fun
findUser
(
id
:
String
):
String
?
@Query
(
"SELECT * FROM users WHERE ID = :id"
)
@Query
(
"SELECT * FROM users WHERE ID = :id"
)
abstract
fun
getUser
(
id
:
String
):
UserEntity
?
abstract
fun
getUser
(
id
:
String
):
UserEntity
?
@Transaction
@Transaction
open
fun
upsert
(
user
:
BaseUserEntity
)
{
open
fun
upsert
(
user
:
BaseUserEntity
)
{
...
...
app/src/main/java/chat/rocket/android/userdetails/presentation/UserDetailsPresenter.kt
View file @
056c213a
...
@@ -2,7 +2,6 @@ package chat.rocket.android.userdetails.presentation
...
@@ -2,7 +2,6 @@ package chat.rocket.android.userdetails.presentation
import
chat.rocket.android.core.lifecycle.CancelStrategy
import
chat.rocket.android.core.lifecycle.CancelStrategy
import
chat.rocket.android.db.DatabaseManager
import
chat.rocket.android.db.DatabaseManager
import
chat.rocket.android.helper.UserHelper
import
chat.rocket.android.server.domain.GetConnectingServerInteractor
import
chat.rocket.android.server.domain.GetConnectingServerInteractor
import
chat.rocket.android.server.infraestructure.ConnectionManagerFactory
import
chat.rocket.android.server.infraestructure.ConnectionManagerFactory
import
chat.rocket.android.util.extension.launchUI
import
chat.rocket.android.util.extension.launchUI
...
@@ -10,8 +9,8 @@ import chat.rocket.android.util.extensions.avatarUrl
...
@@ -10,8 +9,8 @@ import chat.rocket.android.util.extensions.avatarUrl
import
chat.rocket.android.util.retryIO
import
chat.rocket.android.util.retryIO
import
chat.rocket.common.model.RoomType
import
chat.rocket.common.model.RoomType
import
chat.rocket.common.model.roomTypeOf
import
chat.rocket.common.model.roomTypeOf
import
chat.rocket.common.model.userStatusOf
import
chat.rocket.core.internal.rest.createDirectMessage
import
chat.rocket.core.internal.rest.createDirectMessage
import
chat.rocket.core.internal.rest.spotlight
import
chat.rocket.core.model.ChatRoom
import
chat.rocket.core.model.ChatRoom
import
kotlinx.coroutines.experimental.CommonPool
import
kotlinx.coroutines.experimental.CommonPool
import
kotlinx.coroutines.experimental.withContext
import
kotlinx.coroutines.experimental.withContext
...
@@ -23,13 +22,11 @@ class UserDetailsPresenter @Inject constructor(
...
@@ -23,13 +22,11 @@ class UserDetailsPresenter @Inject constructor(
private
val
dbManager
:
DatabaseManager
,
private
val
dbManager
:
DatabaseManager
,
private
val
strategy
:
CancelStrategy
,
private
val
strategy
:
CancelStrategy
,
serverInteractor
:
GetConnectingServerInteractor
,
serverInteractor
:
GetConnectingServerInteractor
,
factory
:
ConnectionManagerFactory
,
factory
:
ConnectionManagerFactory
userHelper
:
UserHelper
)
{
)
{
private
var
currentServer
=
serverInteractor
.
get
()
!!
private
var
currentServer
=
serverInteractor
.
get
()
!!
private
val
manager
=
factory
.
create
(
currentServer
)
private
val
manager
=
factory
.
create
(
currentServer
)
private
val
client
=
manager
.
client
private
val
client
=
manager
.
client
private
val
currentUserId
=
userHelper
.
user
()
?.
id
fun
loadUserDetails
(
userId
:
String
)
{
fun
loadUserDetails
(
userId
:
String
)
{
launchUI
(
strategy
)
{
launchUI
(
strategy
)
{
...
@@ -39,54 +36,41 @@ class UserDetailsPresenter @Inject constructor(
...
@@ -39,54 +36,41 @@ class UserDetailsPresenter @Inject constructor(
}
}
user
?.
let
{
u
->
user
?.
let
{
u
->
val
localDM
s
=
chatRoomByName
(
name
=
u
.
name
)
val
openedChatRoom
s
=
chatRoomByName
(
name
=
u
.
name
)
val
avatarUrl
=
u
.
username
?.
let
{
currentServer
.
avatarUrl
(
avatar
=
it
)
}
val
avatarUrl
=
u
.
username
?.
let
{
currentServer
.
avatarUrl
(
avatar
=
it
)
}
val
chatRoom
:
ChatRoom
?
=
if
(
localDMs
.
isEmpty
())
{
val
chatRoom
:
ChatRoom
?
=
if
(
openedChatRooms
.
isEmpty
())
{
val
query
=
u
.
username
!!
ChatRoom
(
val
spotlightResult
=
retryIO
(
"spotlight($query)"
)
{
id
=
""
,
client
.
spotlight
(
query
=
query
)
type
=
roomTypeOf
(
RoomType
.
DIRECT_MESSAGE
),
}
name
=
u
.
username
?:
u
.
name
.
orEmpty
(),
fullName
=
u
.
name
,
favorite
=
false
,
open
=
false
,
alert
=
false
,
status
=
userStatusOf
(
u
.
status
),
client
=
client
,
broadcast
=
false
,
archived
=
false
,
default
=
false
,
description
=
null
,
groupMentions
=
null
,
userMentions
=
null
,
lastMessage
=
null
,
lastSeen
=
null
,
topic
=
null
,
announcement
=
null
,
roles
=
null
,
unread
=
0
,
readonly
=
false
,
muted
=
null
,
subscriptionId
=
""
,
timestamp
=
null
,
updatedAt
=
null
,
user
=
null
)
}
else
openedChatRooms
.
firstOrNull
()
val
matchFromSpotlight
=
spotlightResult
.
users
.
firstOrNull
{
it
.
username
==
query
}
if
(
matchFromSpotlight
!=
null
)
{
val
result
=
retryIO
(
"createDirectMessage(${matchFromSpotlight.id}"
)
{
client
.
createDirectMessage
(
username
=
matchFromSpotlight
.
id
)
}
with
(
matchFromSpotlight
)
{
ChatRoom
(
id
=
result
.
id
,
type
=
roomTypeOf
(
RoomType
.
DIRECT_MESSAGE
),
name
=
u
.
username
?:
u
.
name
.
orEmpty
(),
fullName
=
u
.
name
,
favorite
=
false
,
open
=
false
,
alert
=
false
,
status
=
status
,
client
=
client
,
broadcast
=
false
,
archived
=
false
,
default
=
false
,
description
=
null
,
groupMentions
=
null
,
userMentions
=
null
,
lastMessage
=
null
,
lastSeen
=
null
,
topic
=
null
,
announcement
=
null
,
roles
=
null
,
unread
=
0
,
readonly
=
false
,
muted
=
null
,
subscriptionId
=
""
,
timestamp
=
null
,
updatedAt
=
null
,
user
=
null
)
}
}
else
null
}
else
localDMs
.
firstOrNull
()
view
.
showUserDetails
(
view
.
showUserDetails
(
avatarUrl
=
avatarUrl
,
avatarUrl
=
avatarUrl
,
username
=
u
.
username
,
username
=
u
.
username
,
...
@@ -102,10 +86,54 @@ class UserDetailsPresenter @Inject constructor(
...
@@ -102,10 +86,54 @@ class UserDetailsPresenter @Inject constructor(
}
}
}
}
fun
createDirectMessage
(
username
:
String
)
{
fun
createDirectMessage
(
id
:
String
)
=
launchUI
(
strategy
)
{
try
{
val
result
=
retryIO
(
"createDirectMessage($id"
)
{
client
.
createDirectMessage
(
username
=
id
)
}
}
val
userEntity
=
withContext
(
CommonPool
)
{
dbManager
.
userDao
().
getUser
(
id
=
id
)
}
if
(
userEntity
!=
null
)
{
view
.
toDirectMessage
(
chatRoom
=
ChatRoom
(
id
=
result
.
id
,
type
=
roomTypeOf
(
RoomType
.
DIRECT_MESSAGE
),
name
=
userEntity
.
username
?:
userEntity
.
name
.
orEmpty
(),
fullName
=
userEntity
.
name
,
favorite
=
false
,
open
=
false
,
alert
=
false
,
status
=
userStatusOf
(
userEntity
.
status
),
client
=
client
,
broadcast
=
false
,
archived
=
false
,
default
=
false
,
description
=
null
,
groupMentions
=
null
,
userMentions
=
null
,
lastMessage
=
null
,
lastSeen
=
null
,
topic
=
null
,
announcement
=
null
,
roles
=
null
,
unread
=
0
,
readonly
=
false
,
muted
=
null
,
subscriptionId
=
""
,
timestamp
=
null
,
updatedAt
=
result
.
updatedAt
,
user
=
null
)
)
}
}
catch
(
ex
:
Exception
)
{
Timber
.
e
(
ex
)
view
.
onOpenDirectMessageError
()
}
}
private
suspend
fun
chatRoomByName
(
name
:
String
?
=
null
):
List
<
ChatRoom
>
=
withContext
(
CommonPool
)
{
private
suspend
fun
chatRoomByName
(
name
:
String
?
=
null
):
List
<
ChatRoom
>
=
withContext
(
CommonPool
)
{
return
@withContext
dbManager
.
chatRoomDao
().
getAllSync
().
filter
{
return
@withContext
dbManager
.
chatRoomDao
().
getAllSync
().
filter
{
if
(
name
==
null
)
{
if
(
name
==
null
)
{
...
@@ -145,5 +173,4 @@ class UserDetailsPresenter @Inject constructor(
...
@@ -145,5 +173,4 @@ class UserDetailsPresenter @Inject constructor(
}
}
}
}
}
}
}
}
app/src/main/java/chat/rocket/android/userdetails/presentation/UserDetailsView.kt
View file @
056c213a
...
@@ -5,4 +5,8 @@ import chat.rocket.core.model.ChatRoom
...
@@ -5,4 +5,8 @@ import chat.rocket.core.model.ChatRoom
interface
UserDetailsView
{
interface
UserDetailsView
{
fun
showUserDetails
(
avatarUrl
:
String
?,
username
:
String
?,
name
:
String
?,
utcOffset
:
Float
?,
status
:
String
,
chatRoom
:
ChatRoom
?)
fun
showUserDetails
(
avatarUrl
:
String
?,
username
:
String
?,
name
:
String
?,
utcOffset
:
Float
?,
status
:
String
,
chatRoom
:
ChatRoom
?)
fun
toDirectMessage
(
chatRoom
:
ChatRoom
)
fun
onOpenDirectMessageError
()
}
}
app/src/main/java/chat/rocket/android/userdetails/ui/UserDetailsActivity.kt
View file @
056c213a
...
@@ -16,16 +16,20 @@ import chat.rocket.android.userdetails.presentation.UserDetailsView
...
@@ -16,16 +16,20 @@ import chat.rocket.android.userdetails.presentation.UserDetailsView
import
chat.rocket.android.util.extension.launchUI
import
chat.rocket.android.util.extension.launchUI
import
chat.rocket.android.util.extension.orFalse
import
chat.rocket.android.util.extension.orFalse
import
chat.rocket.android.util.extensions.showToast
import
chat.rocket.android.util.extensions.showToast
import
chat.rocket.android.util.retryIO
import
chat.rocket.common.model.roomTypeOf
import
chat.rocket.common.model.roomTypeOf
import
chat.rocket.core.internal.rest.createDirectMessage
import
chat.rocket.core.model.ChatRoom
import
chat.rocket.core.model.ChatRoom
import
chat.rocket.core.model.userId
import
chat.rocket.core.model.userId
import
com.bumptech.glide.Glide
import
com.bumptech.glide.Glide
import
com.bumptech.glide.Priority
import
com.bumptech.glide.Priority
import
com.bumptech.glide.load.engine.DiskCacheStrategy
import
com.bumptech.glide.load.resource.bitmap.CenterCrop
import
com.bumptech.glide.load.resource.bitmap.CenterCrop
import
com.bumptech.glide.load.resource.bitmap.CenterInside
import
com.bumptech.glide.load.resource.bitmap.CenterInside
import
com.bumptech.glide.load.resource.bitmap.FitCenter
import
com.bumptech.glide.load.resource.bitmap.FitCenter
import
com.bumptech.glide.load.resource.bitmap.RoundedCorners
import
com.bumptech.glide.load.resource.bitmap.RoundedCorners
import
com.bumptech.glide.request.RequestOptions
import
com.bumptech.glide.request.RequestOptions
import
com.google.android.material.snackbar.Snackbar
import
dagger.android.AndroidInjection
import
dagger.android.AndroidInjection
import
dagger.android.AndroidInjector
import
dagger.android.AndroidInjector
import
dagger.android.DispatchingAndroidInjector
import
dagger.android.DispatchingAndroidInjector
...
@@ -62,6 +66,7 @@ class UserDetailsActivity : AppCompatActivity(), UserDetailsView, HasSupportFrag
...
@@ -62,6 +66,7 @@ class UserDetailsActivity : AppCompatActivity(), UserDetailsView, HasSupportFrag
lateinit
var
presenter
:
UserDetailsPresenter
lateinit
var
presenter
:
UserDetailsPresenter
private
lateinit
var
subscriptionId
:
String
private
lateinit
var
subscriptionId
:
String
private
lateinit
var
userId
:
String
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
AndroidInjection
.
inject
(
this
)
AndroidInjection
.
inject
(
this
)
...
@@ -69,7 +74,7 @@ class UserDetailsActivity : AppCompatActivity(), UserDetailsView, HasSupportFrag
...
@@ -69,7 +74,7 @@ class UserDetailsActivity : AppCompatActivity(), UserDetailsView, HasSupportFrag
setContentView
(
R
.
layout
.
activity_user_details
)
setContentView
(
R
.
layout
.
activity_user_details
)
setupToolbar
()
setupToolbar
()
val
userId
=
intent
.
getStringExtra
(
EXTRA_USER_ID
)
userId
=
intent
.
getStringExtra
(
EXTRA_USER_ID
)
subscriptionId
=
intent
.
getStringExtra
(
EXTRA_SUBSCRIPTION_ID
)
subscriptionId
=
intent
.
getStringExtra
(
EXTRA_SUBSCRIPTION_ID
)
showLoadingView
(
true
)
showLoadingView
(
true
)
presenter
.
loadUserDetails
(
userId
=
userId
)
presenter
.
loadUserDetails
(
userId
=
userId
)
...
@@ -95,45 +100,67 @@ class UserDetailsActivity : AppCompatActivity(), UserDetailsView, HasSupportFrag
...
@@ -95,45 +100,67 @@ class UserDetailsActivity : AppCompatActivity(), UserDetailsView, HasSupportFrag
text_view_username
.
text
=
username
text_view_username
.
text
=
username
text_view_status
.
text
=
status
.
capitalize
()
text_view_status
.
text
=
status
.
capitalize
()
launch
(
UI
)
{
try
{
val
image
=
withContext
(
CommonPool
)
{
launch
(
UI
)
{
val
requestOptions
=
RequestOptions
()
val
image
=
withContext
(
CommonPool
)
{
.
priority
(
Priority
.
IMMEDIATE
)
try
{
.
transforms
(
CenterInside
(),
FitCenter
())
val
requestOptions
=
RequestOptions
()
.
priority
(
Priority
.
IMMEDIATE
)
return
@withContext
GlideApp
.
with
(
this
@UserDetailsActivity
)
.
transforms
(
CenterInside
(),
FitCenter
())
.
asBitmap
()
.
load
(
avatarUrl
)
return
@withContext
GlideApp
.
with
(
this
@UserDetailsActivity
)
.
apply
(
requestOptions
)
.
asBitmap
()
.
submit
()
.
diskCacheStrategy
(
DiskCacheStrategy
.
ALL
)
.
get
().
also
{
showLoadingView
(
false
)
}
.
load
(
avatarUrl
)
.
apply
(
requestOptions
)
.
submit
()
.
get
()
}
catch
(
ex
:
Exception
)
{
Timber
.
e
(
ex
)
return
@withContext
null
}
finally
{
showLoadingView
(
false
)
}
}
image
?.
let
{
val
blurredBitmap
=
image
.
blurred
(
context
=
this
@UserDetailsActivity
,
newWidth
=
toolbar
.
measuredWidth
,
newHeight
=
toolbar
.
measuredHeight
)
toolbar
.
background
=
BitmapDrawable
(
resources
,
blurredBitmap
)
GlideApp
.
with
(
this
@UserDetailsActivity
)
.
asBitmap
()
.
transforms
(
RoundedCorners
(
25
),
CenterCrop
())
.
load
(
image
)
.
into
(
image_view_avatar
)
}
}
}
val
blurredBitmap
=
image
.
blurred
(
context
=
this
@UserDetailsActivity
,
utcOffset
?.
let
{
newWidth
=
toolbar
.
measuredWidth
,
newHeight
=
toolbar
.
measuredHeight
)
val
offsetLong
=
it
.
roundToLong
()
toolbar
.
background
=
BitmapDrawable
(
resources
,
blurredBitmap
)
val
offset
=
if
(
it
>
0
)
"+$offsetLong"
else
offsetLong
.
toString
()
GlideApp
.
with
(
this
@UserDetailsActivity
)
val
formatter
=
DateTimeFormatter
.
ofPattern
(
"'(GMT$offset)' hh:mm a"
)
.
asBitmap
()
val
zoneId
=
ZoneId
.
systemDefault
()
.
transforms
(
RoundedCorners
(
25
),
CenterCrop
())
val
timeNow
=
OffsetDateTime
.
now
(
ZoneOffset
.
UTC
).
plusHours
(
offsetLong
).
toLocalDateTime
()
.
load
(
avatarUrl
)
text_view_tz
.
text
=
formatter
.
format
(
ZonedDateTime
.
of
(
timeNow
,
zoneId
))
.
into
(
image_view_avatar
)
}
}
utcOffset
?.
let
{
val
offsetLong
=
it
.
roundToLong
()
val
offset
=
if
(
it
>
0
)
"+$offsetLong"
else
offsetLong
.
toString
()
val
formatter
=
DateTimeFormatter
.
ofPattern
(
"'(GMT$offset)' hh:mm a"
)
val
zoneId
=
ZoneId
.
systemDefault
()
val
timeNow
=
OffsetDateTime
.
now
(
ZoneOffset
.
UTC
).
plusHours
(
offsetLong
).
toLocalDateTime
()
text_view_tz
.
text
=
formatter
.
format
(
ZonedDateTime
.
of
(
timeNow
,
zoneId
))
}
text_view_message
.
setOnClickListener
{
text_view_message
.
setOnClickListener
{
toDirectMessage
(
chatRoom
=
chatRoom
)
if
(
chatRoom
==
null
)
{
}
presenter
.
createDirectMessage
(
id
=
userId
)
}
else
{
toDirectMessage
(
chatRoom
)
}
}
image_view_message
.
setOnClickListener
{
image_view_message
.
setOnClickListener
{
toDirectMessage
(
chatRoom
=
chatRoom
)
if
(
chatRoom
==
null
)
{
presenter
.
createDirectMessage
(
id
=
userId
)
}
else
{
toDirectMessage
(
chatRoom
)
}
}
}
catch
(
ex
:
Exception
)
{
Timber
.
e
(
ex
)
}
}
}
}
...
@@ -144,23 +171,28 @@ class UserDetailsActivity : AppCompatActivity(), UserDetailsView, HasSupportFrag
...
@@ -144,23 +171,28 @@ class UserDetailsActivity : AppCompatActivity(), UserDetailsView, HasSupportFrag
}
}
}
}
private
fun
toDirectMessage
(
chatRoom
:
ChatRoom
?)
{
override
fun
onOpenDirectMessageError
()
{
chatRoom
?.
let
{
c
->
Snackbar
.
make
(
root_layout
,
R
.
string
.
error_opening_dm
,
Snackbar
.
LENGTH_INDEFINITE
)
finish
()
.
setAction
(
R
.
string
.
retry
)
{
if
(
c
.
subscriptionId
.
isEmpty
()
||
c
.
subscriptionId
!=
subscriptionId
)
{
presenter
.
createDirectMessage
(
userId
)
startActivity
(
}.
show
()
chatRoomIntent
(
}
chatRoomId
=
c
.
id
,
chatRoomName
=
c
.
name
,
override
fun
toDirectMessage
(
chatRoom
:
ChatRoom
)
{
chatRoomType
=
c
.
type
.
toString
(),
finish
()
isReadOnly
=
c
.
readonly
.
orFalse
(),
if
(
chatRoom
.
subscriptionId
.
isEmpty
()
||
chatRoom
.
subscriptionId
!=
subscriptionId
)
{
chatRoomLastSeen
=
c
.
lastSeen
?:
0
,
startActivity
(
isSubscribed
=
c
.
open
,
chatRoomIntent
(
isCreator
=
false
,
chatRoomId
=
chatRoom
.
id
,
isFavorite
=
c
.
favorite
chatRoomName
=
chatRoom
.
name
,
)
chatRoomType
=
chatRoom
.
type
.
toString
(),
isReadOnly
=
chatRoom
.
readonly
.
orFalse
(),
chatRoomLastSeen
=
chatRoom
.
lastSeen
?:
0
,
isSubscribed
=
chatRoom
.
open
,
isCreator
=
false
,
isFavorite
=
chatRoom
.
favorite
)
)
}
)
}
}
}
}
}
}
app/src/main/res/layout/activity_user_details.xml
View file @
056c213a
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/root_layout"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@android:color/white"
android:background=
"@android:color/white"
...
...
app/src/main/res/values-de/strings.xml
View file @
056c213a
...
@@ -336,6 +336,8 @@
...
@@ -336,6 +336,8 @@
<!-- User Details -->
<!-- User Details -->
<string
name=
"message"
>
Message
</string>
<!--TODO - Add proper translation-->
<string
name=
"message"
>
Message
</string>
<!--TODO - Add proper translation-->
<string
name=
"timezone"
>
Timezone
</string>
<!--TODO - Add proper translation-->
<string
name=
"timezone"
>
Timezone
</string>
<!--TODO - Add proper translation-->
<string
name=
"error_opening_dm"
>
Something went wrong while we were creating this conversation…
</string>
<!-- TODO - Add proper translation -->
<string
name=
"retry"
>
Retry
</string>
<!-- TODO - Add proper translation -->
<!-- Report -->
<!-- Report -->
<string
name=
"submit"
>
Submit
</string>
<!--TODO - Add proper translation-->
<string
name=
"submit"
>
Submit
</string>
<!--TODO - Add proper translation-->
...
...
app/src/main/res/values-es/strings.xml
View file @
056c213a
...
@@ -337,6 +337,9 @@
...
@@ -337,6 +337,9 @@
<!-- User Details -->
<!-- User Details -->
<string
name=
"message"
>
Message
</string>
<!-- TODO - Add proper translation -->
<string
name=
"message"
>
Message
</string>
<!-- TODO - Add proper translation -->
<string
name=
"timezone"
>
Timezone
</string>
<!-- TODO - Add proper translation -->
<string
name=
"timezone"
>
Timezone
</string>
<!-- TODO - Add proper translation -->
<string
name=
"error_opening_dm"
>
Something went wrong while we were creating this conversation…
</string>
<!-- TODO - Add proper translation -->
<string
name=
"retry"
>
Retry
</string>
<!-- TODO - Add proper translation -->
<!-- Report -->
<!-- Report -->
<string
name=
"submit"
>
Submit
</string>
<!--TODO - Add proper translation-->
<string
name=
"submit"
>
Submit
</string>
<!--TODO - Add proper translation-->
<string
name=
"required"
>
*required
</string>
<!--TODO - Add proper translation-->
<string
name=
"required"
>
*required
</string>
<!--TODO - Add proper translation-->
...
...
app/src/main/res/values-fr/strings.xml
View file @
056c213a
...
@@ -338,15 +338,13 @@
...
@@ -338,15 +338,13 @@
<string
name=
"message_room_changed_privacy"
>
Room type changed to: %1$s by %2$s
</string>
<string
name=
"message_room_changed_privacy"
>
Room type changed to: %1$s by %2$s
</string>
<!-- User Details -->
<!-- User Details -->
<!-- TODO - Add proper translation -->
<string
name=
"message"
>
Message
</string>
<!-- TODO - Add proper translation -->
<string
name=
"message"
>
Message
</string>
<string
name=
"timezone"
>
Timezone
</string>
<!-- TODO - Add proper translation -->
<!-- TODO - Add proper translation -->
<string
name=
"error_opening_dm"
>
Something went wrong while we were creating this conversation…
</string>
<!-- TODO - Add proper translation -->
<string
name=
"timezone"
>
Timezone
</string>
<string
name=
"retry"
>
Retry
</string>
<!-- TODO - Add proper translation -->
<!-- Report -->
<!-- Report -->
<!--TODO - Add proper translation-->
<string
name=
"submit"
>
Submit
</string>
<!-- TODO - Add proper translation -->
<string
name=
"submit"
>
Submit
</string>
<string
name=
"required"
>
*required
</string>
<!-- TODO - Add proper translation -->
<!--TODO - Add proper translation-->
<string
name=
"report_sent"
>
Your report has been sent!
</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>
</resources>
app/src/main/res/values-hi-rIN/strings.xml
View file @
056c213a
...
@@ -337,16 +337,13 @@
...
@@ -337,16 +337,13 @@
<string
name=
"message_room_changed_privacy"
>
%2$s ने रूम का प्रकार बदलकर %1$s किया
</string>
<string
name=
"message_room_changed_privacy"
>
%2$s ने रूम का प्रकार बदलकर %1$s किया
</string>
<!-- User Details -->
<!-- User Details -->
<!-- TODO - Add proper translation -->
<
string
name=
"message"
>
Message
</string>
<
!-- TODO - Add proper translation -->
<string
name=
"
message"
>
Message
</string
>
<string
name=
"
timezone"
>
Timezone
</string>
<!-- TODO - Add proper translation --
>
<!-- TODO - Add proper translation -->
<
string
name=
"error_opening_dm"
>
Something went wrong while we were creating this conversation…
</string>
<
!-- TODO - Add proper translation -->
<string
name=
"
timezone"
>
Timezone
</string
>
<string
name=
"
retry"
>
Retry
</string>
<!-- TODO - Add proper translation --
>
<!-- Report -->
<!-- Report -->
<!--TODO - Add proper translation-->
<string
name=
"submit"
>
Submit
</string>
<!-- TODO - Add proper translation -->
<string
name=
"submit"
>
Submit
</string>
<string
name=
"required"
>
*required
</string>
<!-- TODO - Add proper translation -->
<!--TODO - Add proper translation-->
<string
name=
"required"
>
*required
</string>
<!--TODO - Add proper translation-->
<string
name=
"report_sent"
>
Your report has been sent!
</string>
<string
name=
"report_sent"
>
Your report has been sent!
</string>
</resources>
</resources>
app/src/main/res/values-it/strings.xml
View file @
056c213a
...
@@ -332,16 +332,13 @@
...
@@ -332,16 +332,13 @@
<string
name=
"message_room_changed_privacy"
>
Il tipo di stanza è cambiato in: %1$s da %2$s
</string>
<string
name=
"message_room_changed_privacy"
>
Il tipo di stanza è cambiato in: %1$s da %2$s
</string>
<!-- User Details -->
<!-- User Details -->
<!-- TODO - Add proper translation -->
<
string
name=
"message"
>
Message
</string>
<
!-- TODO - Add proper translation -->
<string
name=
"
message"
>
Message
</string
>
<string
name=
"
timezone"
>
Timezone
</string>
<!-- TODO - Add proper translation --
>
<!-- TODO - Add proper translation -->
<
string
name=
"error_opening_dm"
>
Something went wrong while we were creating this conversation…
</string>
<
!-- TODO - Add proper translation -->
<string
name=
"
timezone"
>
Timezone
</string
>
<string
name=
"
retry"
>
Retry
</string>
<!-- TODO - Add proper translation --
>
<!-- Report -->
<!-- Report -->
<!--TODO - Add proper translation-->
<string
name=
"submit"
>
Submit
</string>
<!-- TODO - Add proper translation -->
<string
name=
"submit"
>
Submit
</string>
<string
name=
"required"
>
*required
</string>
<!-- TODO - Add proper translation -->
<!--TODO - Add proper translation-->
<string
name=
"report_sent"
>
Your report has been sent!
</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>
</resources>
app/src/main/res/values-ja/strings.xml
View file @
056c213a
...
@@ -339,16 +339,13 @@
...
@@ -339,16 +339,13 @@
<string
name=
"message_room_changed_privacy"
>
ルームタイプを %2$s から %1$s に変更しました
</string>
<string
name=
"message_room_changed_privacy"
>
ルームタイプを %2$s から %1$s に変更しました
</string>
<!-- User Details -->
<!-- User Details -->
<
!-- TODO - Add proper translation
-->
<
string
name=
"message"
>
Message
</string>
<!--TODO - Add proper translation
-->
<string
name=
"
message"
>
Message
</string
>
<string
name=
"
timezone"
>
Timezone
</string>
<!--TODO - Add proper translation--
>
<!-- TODO - Add proper translation -->
<
string
name=
"error_opening_dm"
>
Something went wrong while we were creating this conversation…
</string>
<
!-- TODO - Add proper translation -->
<string
name=
"
timezone"
>
Timezone
</string
>
<string
name=
"
retry"
>
Retry
</string>
<!-- TODO - Add proper translation --
>
<!-- Report -->
<!-- Report -->
<!--TODO - Add proper translation-->
<string
name=
"submit"
>
Submit
</string>
<!--TODO - Add proper translation-->
<string
name=
"submit"
>
Submit
</string>
<string
name=
"required"
>
*required
</string>
<!--TODO - Add proper translation-->
<!--TODO - Add proper translation-->
<string
name=
"report_sent"
>
Your report has been sent!
</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>
</resources>
app/src/main/res/values-pt-rBR/strings.xml
View file @
056c213a
...
@@ -336,10 +336,10 @@
...
@@ -336,10 +336,10 @@
<string
name=
"message_room_changed_privacy"
>
O tipo da sala mudou para: %1$s por %2$s
</string>
<string
name=
"message_room_changed_privacy"
>
O tipo da sala mudou para: %1$s por %2$s
</string>
<!-- User Details -->
<!-- User Details -->
<!-- TODO - Add proper translation -->
<string
name=
"message"
>
Mensagem
</string>
<string
name=
"message"
>
Mensagem
</string>
<!-- TODO - Add proper translation -->
<string
name=
"timezone"
>
Fuso horário
</string>
<string
name=
"timezone"
>
Fuso horário
</string>
<string
name=
"error_opening_dm"
>
Algo deu errado quando tentamos abrir esta conversa…
</string>
<string
name=
"retry"
>
Retentar
</string>
<!-- Report -->
<!-- Report -->
<string
name=
"submit"
>
Enviar
</string>
<string
name=
"submit"
>
Enviar
</string>
...
...
app/src/main/res/values-ru-rRU/strings.xml
View file @
056c213a
...
@@ -334,16 +334,13 @@
...
@@ -334,16 +334,13 @@
<string
name=
"message_room_changed_privacy"
>
Тип канала изменен на: %1$s пользователем %2$s
</string>
<string
name=
"message_room_changed_privacy"
>
Тип канала изменен на: %1$s пользователем %2$s
</string>
<!-- User Details -->
<!-- User Details -->
<
!-- TODO - Add proper translation
-->
<
string
name=
"message"
>
Message
</string>
<!--TODO - Add proper translation
-->
<string
name=
"
message"
>
Message
</string
>
<string
name=
"
timezone"
>
Timezone
</string>
<!--TODO - Add proper translation--
>
<!-- TODO - Add proper translation -->
<
string
name=
"error_opening_dm"
>
Something went wrong while we were creating this conversation…
</string>
<
!-- TODO - Add proper translation -->
<string
name=
"
timezone"
>
Timezone
</string
>
<string
name=
"
retry"
>
Retry
</string>
<!-- TODO - Add proper translation --
>
<!-- Report -->
<!-- Report -->
<!--TODO - Add proper translation-->
<string
name=
"submit"
>
Submit
</string>
<!--TODO - Add proper translation-->
<string
name=
"submit"
>
Submit
</string>
<string
name=
"required"
>
*required
</string>
<!--TODO - Add proper translation-->
<!--TODO - Add proper translation-->
<string
name=
"report_sent"
>
Your report has been sent!
</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>
</resources>
app/src/main/res/values-tr/strings.xml
View file @
056c213a
...
@@ -339,6 +339,8 @@
...
@@ -339,6 +339,8 @@
<!-- User Details -->
<!-- User Details -->
<string
name=
"message"
>
Message
</string>
<!--TODO - Add proper translation-->
<string
name=
"message"
>
Message
</string>
<!--TODO - Add proper translation-->
<string
name=
"timezone"
>
Timezone
</string>
<!--TODO - Add proper translation-->
<string
name=
"timezone"
>
Timezone
</string>
<!--TODO - Add proper translation-->
<string
name=
"error_opening_dm"
>
Something went wrong while we were creating this conversation…
</string>
<!-- TODO - Add proper translation -->
<string
name=
"retry"
>
Retry
</string>
<!-- TODO - Add proper translation -->
<!-- Report -->
<!-- Report -->
<string
name=
"submit"
>
Submit
</string>
<!--TODO - Add proper translation-->
<string
name=
"submit"
>
Submit
</string>
<!--TODO - Add proper translation-->
...
...
app/src/main/res/values-uk/strings.xml
View file @
056c213a
...
@@ -332,20 +332,16 @@
...
@@ -332,20 +332,16 @@
<string
name=
"message_information_title"
>
Інформація про прочитання
</string>
<string
name=
"message_information_title"
>
Інформація про прочитання
</string>
<string
name=
"msg_log_out"
>
Виходимо…
</string>
<string
name=
"msg_log_out"
>
Виходимо…
</string>
<string
name=
"msg_sent_attachment"
>
Долучення відправлено
</string>
<string
name=
"msg_sent_attachment"
>
Долучення відправлено
</string>
<!--TODO - Add proper translation-->
<string
name=
"message_room_changed_privacy"
>
Room type changed to: %1$s by %2$s
</string>
<!-- TODO - Add proper translation -->
<string
name=
"message_room_changed_privacy"
>
Room type changed to: %1$s by %2$s
</string>
<!-- User Details -->
<!-- User Details -->
<!-- TODO - Add proper translation -->
<string
name=
"message"
>
Message
</string>
<string
name=
"message"
>
Message
</string>
<!-- TODO - Add proper translation -->
<string
name=
"timezone"
>
Timezone
</string>
<string
name=
"timezone"
>
Timezone
</string>
<string
name=
"error_opening_dm"
>
Something went wrong while we were creating this conversation…
</string>
<!-- TODO - Add proper translation -->
<string
name=
"retry"
>
Retry
</string>
<!-- TODO - Add proper translation -->
<!-- Report -->
<!-- Report -->
<!--TODO - Add proper translation-->
<string
name=
"submit"
>
Submit
</string>
<!-- TODO - Add proper translation -->
<string
name=
"submit"
>
Submit
</string>
<string
name=
"required"
>
*required
</string>
<!-- TODO - Add proper translation -->
<!--TODO - Add proper translation-->
<string
name=
"report_sent"
>
Your report has been sent!
</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>
</resources>
app/src/main/res/values/strings.xml
View file @
056c213a
...
@@ -353,6 +353,8 @@ https://github.com/RocketChat/java-code-styles/blob/master/CODING_STYLE.md#strin
...
@@ -353,6 +353,8 @@ https://github.com/RocketChat/java-code-styles/blob/master/CODING_STYLE.md#strin
<string
name=
"message"
>
Message
</string>
<string
name=
"message"
>
Message
</string>
<string
name=
"timezone"
>
Timezone
</string>
<string
name=
"timezone"
>
Timezone
</string>
<string
name=
"status"
translatable=
"false"
>
Status
</string>
<string
name=
"status"
translatable=
"false"
>
Status
</string>
<string
name=
"error_opening_dm"
>
Something went wrong while we were creating this conversation…
</string>
<string
name=
"retry"
>
Retry
</string>
<!-- Report -->
<!-- Report -->
<string
name=
"submit"
>
Submit
</string>
<string
name=
"submit"
>
Submit
</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