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
42c34407
Unverified
Commit
42c34407
authored
May 14, 2019
by
Filipe Brito
Committed by
GitHub
May 14, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into develop
parents
86a0d24f
475f195e
Changes
30
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
530 additions
and
226 deletions
+530
-226
DrawableHelper.kt
app/src/main/java/chat/rocket/android/app/DrawableHelper.kt
+12
-12
ChatRoomPresenter.kt
...rocket/android/chatroom/presentation/ChatRoomPresenter.kt
+40
-10
ChatRoomFragment.kt
.../java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
+15
-11
SharedPrefsCurrentLanguageRepository.kt
...er/infrastructure/SharedPrefsCurrentLanguageRepository.kt
+3
-2
SettingsPresenter.kt
...rocket/android/settings/presentation/SettingsPresenter.kt
+13
-4
SettingsFragment.kt
.../java/chat/rocket/android/settings/ui/SettingsFragment.kt
+46
-21
ic_send_24dp.xml
app/src/main/res/drawable/ic_send_24dp.xml
+1
-1
strings.xml
app/src/main/res/values-ar/strings.xml
+30
-33
strings.xml
app/src/main/res/values-de/strings.xml
+22
-27
strings.xml
app/src/main/res/values-es/strings.xml
+3
-6
strings.xml
app/src/main/res/values-fa/strings.xml
+3
-6
strings.xml
app/src/main/res/values-fr/strings.xml
+3
-6
strings.xml
app/src/main/res/values-hi-rIN/strings.xml
+3
-6
strings.xml
app/src/main/res/values-it/strings.xml
+3
-6
strings.xml
app/src/main/res/values-ja/strings.xml
+3
-6
strings.xml
app/src/main/res/values-pt-rBR/strings.xml
+3
-6
strings.xml
app/src/main/res/values-pt-rPT/strings.xml
+3
-6
strings.xml
app/src/main/res/values-ru-rRU/strings.xml
+3
-6
strings.xml
app/src/main/res/values-tr/strings.xml
+3
-6
strings.xml
app/src/main/res/values-uk/strings.xml
+3
-6
strings.xml
app/src/main/res/values-zh-rCN/strings.xml
+3
-6
strings.xml
app/src/main/res/values-zh-rTW/strings.xml
+3
-6
strings.xml
app/src/main/res/values/strings.xml
+3
-6
ic_send_black_24dp.xml
draw/src/main/res/drawable/ic_send_black_24dp.xml
+6
-5
EmojiKeyboardPopup.kt
...main/java/chat/rocket/android/emoji/EmojiKeyboardPopup.kt
+5
-7
EmojiPickerPopup.kt
...c/main/java/chat/rocket/android/emoji/EmojiPickerPopup.kt
+3
-7
EmojiViewPager.kt
...src/main/java/chat/rocket/android/emoji/EmojiViewPager.kt
+289
-0
ic_backspace_gray_24dp.xml
emoji/src/main/res/drawable/ic_backspace_gray_24dp.xml
+1
-0
emoji_picker.xml
emoji/src/main/res/layout-land/emoji_picker.xml
+1
-1
emoji_picker.xml
emoji/src/main/res/layout/emoji_picker.xml
+1
-1
No files found.
app/src/main/java/chat/rocket/android/app/DrawableHelper.kt
View file @
42c34407
...
@@ -86,10 +86,10 @@ object DrawableHelper {
...
@@ -86,10 +86,10 @@ object DrawableHelper {
return
return
}
else
{
}
else
{
for
(
i
in
textView
.
indices
)
{
for
(
i
in
textView
.
indices
)
{
if
(
textView
[
i
].
resources
.
configuration
.
layoutDirection
==
View
.
LAYOUT_DIRECTION_LTR
)
{
if
(
textView
[
i
].
resources
.
configuration
.
layoutDirection
==
View
.
LAYOUT_DIRECTION_RTL
)
{
textView
[
i
].
setCompoundDrawablesWithIntrinsicBounds
(
drawables
[
i
],
null
,
null
,
null
)
}
else
{
textView
[
i
].
setCompoundDrawablesWithIntrinsicBounds
(
null
,
null
,
drawables
[
i
],
null
)
textView
[
i
].
setCompoundDrawablesWithIntrinsicBounds
(
null
,
null
,
drawables
[
i
],
null
)
}
else
{
textView
[
i
].
setCompoundDrawablesWithIntrinsicBounds
(
drawables
[
i
],
null
,
null
,
null
)
}
}
}
}
}
}
...
@@ -103,10 +103,10 @@ object DrawableHelper {
...
@@ -103,10 +103,10 @@ object DrawableHelper {
* @see compoundDrawables
* @see compoundDrawables
*/
*/
fun
compoundStartDrawable
(
textView
:
TextView
,
drawable
:
Drawable
)
=
fun
compoundStartDrawable
(
textView
:
TextView
,
drawable
:
Drawable
)
=
if
(
textView
.
resources
.
configuration
.
layoutDirection
==
View
.
LAYOUT_DIRECTION_LTR
)
{
if
(
textView
.
resources
.
configuration
.
layoutDirection
==
View
.
LAYOUT_DIRECTION_RTL
)
{
textView
.
setCompoundDrawablesWithIntrinsicBounds
(
drawable
,
null
,
null
,
null
)
}
else
{
textView
.
setCompoundDrawablesWithIntrinsicBounds
(
null
,
null
,
drawable
,
null
)
textView
.
setCompoundDrawablesWithIntrinsicBounds
(
null
,
null
,
drawable
,
null
)
}
else
{
textView
.
setCompoundDrawablesWithIntrinsicBounds
(
drawable
,
null
,
null
,
null
)
}
}
/**
/**
...
@@ -117,10 +117,10 @@ object DrawableHelper {
...
@@ -117,10 +117,10 @@ object DrawableHelper {
* @see compoundStartDrawable
* @see compoundStartDrawable
*/
*/
fun
compoundEndDrawable
(
textView
:
TextView
,
drawable
:
Drawable
)
=
fun
compoundEndDrawable
(
textView
:
TextView
,
drawable
:
Drawable
)
=
if
(
textView
.
resources
.
configuration
.
layoutDirection
==
View
.
LAYOUT_DIRECTION_LTR
)
{
if
(
textView
.
resources
.
configuration
.
layoutDirection
==
View
.
LAYOUT_DIRECTION_RTL
)
{
textView
.
setCompoundDrawablesWithIntrinsicBounds
(
null
,
null
,
drawable
,
null
)
}
else
{
textView
.
setCompoundDrawablesWithIntrinsicBounds
(
drawable
,
null
,
null
,
null
)
textView
.
setCompoundDrawablesWithIntrinsicBounds
(
drawable
,
null
,
null
,
null
)
}
else
{
textView
.
setCompoundDrawablesWithIntrinsicBounds
(
null
,
null
,
drawable
,
null
)
}
}
/**
/**
...
@@ -136,10 +136,10 @@ object DrawableHelper {
...
@@ -136,10 +136,10 @@ object DrawableHelper {
startDrawable
:
Drawable
,
startDrawable
:
Drawable
,
endDrawable
:
Drawable
endDrawable
:
Drawable
)
=
)
=
if
(
textView
.
resources
.
configuration
.
layoutDirection
==
View
.
LAYOUT_DIRECTION_LTR
)
{
if
(
textView
.
resources
.
configuration
.
layoutDirection
==
View
.
LAYOUT_DIRECTION_RTL
)
{
textView
.
setCompoundDrawablesWithIntrinsicBounds
(
startDrawable
,
null
,
endDrawable
,
null
)
}
else
{
textView
.
setCompoundDrawablesWithIntrinsicBounds
(
endDrawable
,
null
,
startDrawable
,
null
)
textView
.
setCompoundDrawablesWithIntrinsicBounds
(
endDrawable
,
null
,
startDrawable
,
null
)
}
else
{
textView
.
setCompoundDrawablesWithIntrinsicBounds
(
startDrawable
,
null
,
endDrawable
,
null
)
}
}
/**
/**
...
...
app/src/main/java/chat/rocket/android/chatroom/presentation/ChatRoomPresenter.kt
View file @
42c34407
...
@@ -125,6 +125,7 @@ class ChatRoomPresenter @Inject constructor(
...
@@ -125,6 +125,7 @@ class ChatRoomPresenter @Inject constructor(
private
var
lastState
=
manager
.
state
private
var
lastState
=
manager
.
state
private
var
typingStatusList
=
arrayListOf
<
String
>()
private
var
typingStatusList
=
arrayListOf
<
String
>()
private
val
roomChangesChannel
=
Channel
<
Room
>(
Channel
.
CONFLATED
)
private
val
roomChangesChannel
=
Channel
<
Room
>(
Channel
.
CONFLATED
)
private
var
lastMessageId
:
String
?
=
null
private
lateinit
var
draftKey
:
String
private
lateinit
var
draftKey
:
String
fun
setupChatRoom
(
fun
setupChatRoom
(
...
@@ -250,6 +251,7 @@ class ChatRoomPresenter @Inject constructor(
...
@@ -250,6 +251,7 @@ class ChatRoomPresenter @Inject constructor(
isBroadcast
=
chatIsBroadcast
,
isRoom
=
true
isBroadcast
=
chatIsBroadcast
,
isRoom
=
true
)
)
)
)
lastMessageId
=
localMessages
.
firstOrNull
()
?.
id
val
lastSyncDate
=
messagesRepository
.
getLastSyncDate
(
chatRoomId
)
val
lastSyncDate
=
messagesRepository
.
getLastSyncDate
(
chatRoomId
)
if
(
oldMessages
.
isNotEmpty
()
&&
lastSyncDate
!=
null
)
{
if
(
oldMessages
.
isNotEmpty
()
&&
lastSyncDate
!=
null
)
{
view
.
showMessages
(
oldMessages
,
clearDataSet
)
view
.
showMessages
(
oldMessages
,
clearDataSet
)
...
@@ -262,7 +264,7 @@ class ChatRoomPresenter @Inject constructor(
...
@@ -262,7 +264,7 @@ class ChatRoomPresenter @Inject constructor(
}
}
// TODO: For now we are marking the room as read if we can get the messages (I mean, no exception occurs)
// TODO: For now we are marking the room as read if we can get the messages (I mean, no exception occurs)
// but should mark only when the user see the first unread message.
// but should mark only when the user see
s
the first unread message.
markRoomAsRead
(
chatRoomId
)
markRoomAsRead
(
chatRoomId
)
subscribeMessages
(
chatRoomId
)
subscribeMessages
(
chatRoomId
)
...
@@ -396,6 +398,7 @@ class ChatRoomPresenter @Inject constructor(
...
@@ -396,6 +398,7 @@ class ChatRoomPresenter @Inject constructor(
throw
ex
throw
ex
}
}
}
}
lastMessageId
=
id
}
else
{
}
else
{
client
.
updateMessage
(
chatRoomId
,
messageId
,
text
)
client
.
updateMessage
(
chatRoomId
,
messageId
,
text
)
}
}
...
@@ -1117,6 +1120,31 @@ class ChatRoomPresenter @Inject constructor(
...
@@ -1117,6 +1120,31 @@ class ChatRoomPresenter @Inject constructor(
}
}
}
}
fun
reactToLastMessage
(
text
:
String
,
roomId
:
String
)
{
launchUI
(
strategy
)
{
lastMessageId
?.
let
{
messageId
->
val
emoji
=
text
.
substring
(
1
).
trimEnd
()
if
(
emoji
.
length
>=
2
&&
emoji
.
startsWith
(
":"
)
&&
emoji
.
endsWith
(
":"
))
{
try
{
retryIO
(
"toggleEmoji($messageId, $emoji)"
)
{
client
.
toggleReaction
(
messageId
,
emoji
.
removeSurrounding
(
":"
))
}
logReactionEvent
()
view
.
clearMessageComposition
(
true
)
}
catch
(
ex
:
RocketChatException
)
{
Timber
.
e
(
ex
)
// emoji is not valid, post it
sendMessage
(
roomId
,
text
,
null
)
}
}
else
{
sendMessage
(
roomId
,
text
,
null
)
}
}.
ifNull
{
sendMessage
(
roomId
,
text
,
null
)
}
}
}
private
fun
logReactionEvent
()
{
private
fun
logReactionEvent
()
{
when
{
when
{
roomTypeOf
(
chatRoomType
)
is
RoomType
.
DirectMessage
->
roomTypeOf
(
chatRoomType
)
is
RoomType
.
DirectMessage
->
...
@@ -1190,18 +1218,19 @@ class ChatRoomPresenter @Inject constructor(
...
@@ -1190,18 +1218,19 @@ class ChatRoomPresenter @Inject constructor(
sendMessage
(
roomId
,
text
,
null
)
sendMessage
(
roomId
,
text
,
null
)
}
else
{
}
else
{
view
.
disableSendMessageButton
()
view
.
disableSendMessageButton
()
val
command
=
text
.
split
(
" "
)
val
index
=
text
.
indexOf
(
" "
)
va
l
name
=
command
[
0
].
substring
(
1
)
va
r
name
=
""
var
params
=
""
var
params
=
""
command
.
forEachIndexed
{
index
,
param
->
if
(
index
>=
1
)
{
if
(
index
>
0
)
{
name
=
text
.
substring
(
1
,
index
)
params
+=
"$param "
params
=
text
.
substring
(
index
+
1
).
trim
()
}
}
}
val
result
=
retryIO
(
"runCommand($name, $params, $roomId)"
)
{
val
result
=
retryIO
(
"runCommand($name, $params, $roomId)"
)
{
client
.
runCommand
(
Command
(
name
,
params
),
roomId
)
client
.
runCommand
(
Command
(
name
,
params
),
roomId
)
}
}
if
(!
result
)
{
if
(
result
)
{
view
.
clearMessageComposition
(
true
)
}
else
{
// failed, command is not valid so post it
// failed, command is not valid so post it
sendMessage
(
roomId
,
text
,
null
)
sendMessage
(
roomId
,
text
,
null
)
}
}
...
@@ -1279,8 +1308,8 @@ class ChatRoomPresenter @Inject constructor(
...
@@ -1279,8 +1308,8 @@ class ChatRoomPresenter @Inject constructor(
launchUI
(
strategy
)
{
launchUI
(
strategy
)
{
val
viewModelStreamedMessage
=
mapper
.
map
(
val
viewModelStreamedMessage
=
mapper
.
map
(
streamedMessage
,
RoomUiModel
(
streamedMessage
,
RoomUiModel
(
roles
=
chatRoles
,
isBroadcast
=
chatIsBroadcast
,
isRoom
=
true
roles
=
chatRoles
,
isBroadcast
=
chatIsBroadcast
,
isRoom
=
true
)
)
)
)
val
roomMessages
=
messagesRepository
.
getByRoomId
(
streamedMessage
.
roomId
)
val
roomMessages
=
messagesRepository
.
getByRoomId
(
streamedMessage
.
roomId
)
val
index
=
roomMessages
.
indexOfFirst
{
msg
->
msg
.
id
==
streamedMessage
.
id
}
val
index
=
roomMessages
.
indexOfFirst
{
msg
->
msg
.
id
==
streamedMessage
.
id
}
...
@@ -1314,6 +1343,7 @@ class ChatRoomPresenter @Inject constructor(
...
@@ -1314,6 +1343,7 @@ class ChatRoomPresenter @Inject constructor(
fun
clearDraftMessage
()
{
fun
clearDraftMessage
()
{
localRepository
.
clear
(
draftKey
)
localRepository
.
clear
(
draftKey
)
}
}
/**
/**
* Get unfinished message from local repository, when user left chat room without
* Get unfinished message from local repository, when user left chat room without
* sending a message and now the user is back.
* sending a message and now the user is back.
...
...
app/src/main/java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
View file @
42c34407
...
@@ -148,10 +148,14 @@ private const val BUNDLE_CHAT_ROOM_MESSAGE = "chat_room_message"
...
@@ -148,10 +148,14 @@ private const val BUNDLE_CHAT_ROOM_MESSAGE = "chat_room_message"
class
ChatRoomFragment
:
Fragment
(),
ChatRoomView
,
EmojiKeyboardListener
,
EmojiReactionListener
,
class
ChatRoomFragment
:
Fragment
(),
ChatRoomView
,
EmojiKeyboardListener
,
EmojiReactionListener
,
ChatRoomAdapter
.
OnActionSelected
,
Drawable
.
Callback
{
ChatRoomAdapter
.
OnActionSelected
,
Drawable
.
Callback
{
@Inject
lateinit
var
presenter
:
ChatRoomPresenter
@Inject
@Inject
lateinit
var
parser
:
MessageParser
lateinit
var
presenter
:
ChatRoomPresenter
@Inject
lateinit
var
analyticsManager
:
AnalyticsManager
@Inject
@Inject
lateinit
var
navigator
:
ChatRoomNavigator
lateinit
var
parser
:
MessageParser
@Inject
lateinit
var
analyticsManager
:
AnalyticsManager
@Inject
lateinit
var
navigator
:
ChatRoomNavigator
private
lateinit
var
adapter
:
ChatRoomAdapter
private
lateinit
var
adapter
:
ChatRoomAdapter
internal
lateinit
var
chatRoomId
:
String
internal
lateinit
var
chatRoomId
:
String
private
lateinit
var
chatRoomName
:
String
private
lateinit
var
chatRoomName
:
String
...
@@ -457,14 +461,15 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
...
@@ -457,14 +461,15 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
}
}
}
}
override
fun
sendMessage
(
text
:
String
)
{
override
fun
sendMessage
(
text
:
String
)
{
ui
{
ui
{
if
(!
text
.
isBlank
())
{
if
(!
text
.
isBlank
())
{
if
(!
text
.
startsWith
(
"/"
))
{
if
(
text
.
startsWith
(
"/"
))
{
presenter
.
sendMessage
(
chatRoomId
,
text
,
editingMessageId
)
}
else
{
presenter
.
runCommand
(
text
,
chatRoomId
)
presenter
.
runCommand
(
text
,
chatRoomId
)
}
else
if
(
text
.
startsWith
(
"+"
))
{
presenter
.
reactToLastMessage
(
text
,
chatRoomId
)
}
else
{
presenter
.
sendMessage
(
chatRoomId
,
text
,
editingMessageId
)
}
}
}
}
}
}
...
@@ -509,7 +514,6 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
...
@@ -509,7 +514,6 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
}
}
}
}
override
fun
clearMessageComposition
(
deleteMessage
:
Boolean
)
{
override
fun
clearMessageComposition
(
deleteMessage
:
Boolean
)
{
ui
{
ui
{
citation
=
null
citation
=
null
...
@@ -886,7 +890,7 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
...
@@ -886,7 +890,7 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
button_take_a_photo
.
setOnClickListener
{
button_take_a_photo
.
setOnClickListener
{
// Check for camera permission
// Check for camera permission
context
?.
let
{
context
?.
let
{
if
(
hasCameraPermission
(
it
))
{
if
(
hasCameraPermission
(
it
))
{
dispatchTakePictureIntent
()
dispatchTakePictureIntent
()
}
else
{
}
else
{
getCameraPermission
(
this
)
getCameraPermission
(
this
)
...
@@ -954,7 +958,7 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
...
@@ -954,7 +958,7 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
grantResults
:
IntArray
grantResults
:
IntArray
)
{
)
{
super
.
onRequestPermissionsResult
(
requestCode
,
permissions
,
grantResults
)
super
.
onRequestPermissionsResult
(
requestCode
,
permissions
,
grantResults
)
when
(
requestCode
)
{
when
(
requestCode
)
{
AndroidPermissionsHelper
.
CAMERA_CODE
->
{
AndroidPermissionsHelper
.
CAMERA_CODE
->
{
if
(
grantResults
.
isNotEmpty
()
&&
grantResults
[
0
]
==
PackageManager
.
PERMISSION_GRANTED
)
{
if
(
grantResults
.
isNotEmpty
()
&&
grantResults
[
0
]
==
PackageManager
.
PERMISSION_GRANTED
)
{
// permission was granted
// permission was granted
...
...
app/src/main/java/chat/rocket/android/server/infrastructure/SharedPrefsCurrentLanguageRepository.kt
View file @
42c34407
package
chat.rocket.android.server.infrastructure
package
chat.rocket.android.server.infrastructure
import
android.content.SharedPreferences
import
android.content.SharedPreferences
import
java.util.*
private
const
val
CURRENT_LANGUAGE
=
"current_language"
private
const
val
CURRENT_LANGUAGE
=
"current_language"
private
const
val
CURRENT_LANGUAGE_COUNTRY
=
"current_language_country"
private
const
val
CURRENT_LANGUAGE_COUNTRY
=
"current_language_country"
...
@@ -16,10 +17,10 @@ class SharedPrefsCurrentLanguageRepository(private val preferences: SharedPrefer
...
@@ -16,10 +17,10 @@ class SharedPrefsCurrentLanguageRepository(private val preferences: SharedPrefer
}
}
override
fun
getLanguage
():
String
?
{
override
fun
getLanguage
():
String
?
{
return
preferences
.
getString
(
CURRENT_LANGUAGE
,
""
)
return
preferences
.
getString
(
CURRENT_LANGUAGE
,
Locale
.
getDefault
().
language
)
}
}
override
fun
getCountry
():
String
?
{
override
fun
getCountry
():
String
?
{
return
preferences
.
getString
(
CURRENT_LANGUAGE_COUNTRY
,
""
)
return
preferences
.
getString
(
CURRENT_LANGUAGE_COUNTRY
,
Locale
.
getDefault
().
country
)
}
}
}
}
app/src/main/java/chat/rocket/android/settings/presentation/SettingsPresenter.kt
View file @
42c34407
package
chat.rocket.android.settings.presentation
package
chat.rocket.android.settings.presentation
import
android.content.Context
import
android.os.Build
import
chat.rocket.android.core.lifecycle.CancelStrategy
import
chat.rocket.android.core.lifecycle.CancelStrategy
import
chat.rocket.android.db.DatabaseManagerFactory
import
chat.rocket.android.db.DatabaseManagerFactory
import
chat.rocket.android.helper.UserHelper
import
chat.rocket.android.helper.UserHelper
import
chat.rocket.android.main.presentation.MainNavigator
import
chat.rocket.android.main.presentation.MainNavigator
import
chat.rocket.android.server.domain.AnalyticsTrackingInteractor
import
chat.rocket.android.server.domain.AnalyticsTrackingInteractor
import
chat.rocket.android.server.domain.GetCurrentLanguageInteractor
import
chat.rocket.android.server.domain.GetCurrentServerInteractor
import
chat.rocket.android.server.domain.GetCurrentServerInteractor
import
chat.rocket.android.server.domain.PermissionsInteractor
import
chat.rocket.android.server.domain.PermissionsInteractor
import
chat.rocket.android.server.domain.RemoveAccountInteractor
import
chat.rocket.android.server.domain.RemoveAccountInteractor
...
@@ -27,6 +28,7 @@ import chat.rocket.core.internal.rest.serverInfo
...
@@ -27,6 +28,7 @@ import chat.rocket.core.internal.rest.serverInfo
import
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.withContext
import
kotlinx.coroutines.withContext
import
timber.log.Timber
import
timber.log.Timber
import
java.util.*
import
javax.inject.Inject
import
javax.inject.Inject
import
javax.inject.Named
import
javax.inject.Named
...
@@ -40,11 +42,11 @@ class SettingsPresenter @Inject constructor(
...
@@ -40,11 +42,11 @@ class SettingsPresenter @Inject constructor(
private
val
tokenRepository
:
TokenRepository
,
private
val
tokenRepository
:
TokenRepository
,
private
val
permissions
:
PermissionsInteractor
,
private
val
permissions
:
PermissionsInteractor
,
private
val
rocketChatClientFactory
:
RocketChatClientFactory
,
private
val
rocketChatClientFactory
:
RocketChatClientFactory
,
private
val
saveLanguageInteractor
:
SaveCurrentLanguageInteractor
,
getCurrentServerInteractor
:
GetCurrentServerInteractor
,
getCurrentServerInteractor
:
GetCurrentServerInteractor
,
removeAccountInteractor
:
RemoveAccountInteractor
,
removeAccountInteractor
:
RemoveAccountInteractor
,
databaseManagerFactory
:
DatabaseManagerFactory
,
databaseManagerFactory
:
DatabaseManagerFactory
,
connectionManagerFactory
:
ConnectionManagerFactory
,
connectionManagerFactory
:
ConnectionManagerFactory
private
val
saveLanguageInteractor
:
SaveCurrentLanguageInteractor
)
:
CheckServerPresenter
(
)
:
CheckServerPresenter
(
strategy
=
strategy
,
strategy
=
strategy
,
factory
=
rocketChatClientFactory
,
factory
=
rocketChatClientFactory
,
...
@@ -93,7 +95,6 @@ class SettingsPresenter @Inject constructor(
...
@@ -93,7 +95,6 @@ class SettingsPresenter @Inject constructor(
fun
enableAnalyticsTracking
(
isEnabled
:
Boolean
)
{
fun
enableAnalyticsTracking
(
isEnabled
:
Boolean
)
{
analyticsTrackingInteractor
.
save
(
isEnabled
)
analyticsTrackingInteractor
.
save
(
isEnabled
)
}
}
fun
logout
()
{
fun
logout
()
{
...
@@ -127,6 +128,14 @@ class SettingsPresenter @Inject constructor(
...
@@ -127,6 +128,14 @@ class SettingsPresenter @Inject constructor(
}
}
}
}
fun
getCurrentLocale
(
context
:
Context
):
Locale
{
return
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
N
)
{
context
.
resources
.
configuration
.
locales
.
get
(
0
)
}
else
{
context
.
resources
.
configuration
.
locale
}
}
fun
saveLocale
(
language
:
String
,
country
:
String
?
=
null
)
{
fun
saveLocale
(
language
:
String
,
country
:
String
?
=
null
)
{
saveLanguageInteractor
.
save
(
language
,
country
)
saveLanguageInteractor
.
save
(
language
,
country
)
}
}
...
...
app/src/main/java/chat/rocket/android/settings/ui/SettingsFragment.kt
View file @
42c34407
...
@@ -35,8 +35,28 @@ internal const val TAG_SETTINGS_FRAGMENT = "SettingsFragment"
...
@@ -35,8 +35,28 @@ internal const val TAG_SETTINGS_FRAGMENT = "SettingsFragment"
fun
newInstance
():
Fragment
=
SettingsFragment
()
fun
newInstance
():
Fragment
=
SettingsFragment
()
class
SettingsFragment
:
Fragment
(),
SettingsView
,
AppLanguageView
{
class
SettingsFragment
:
Fragment
(),
SettingsView
,
AppLanguageView
{
@Inject
lateinit
var
analyticsManager
:
AnalyticsManager
@Inject
@Inject
lateinit
var
presenter
:
SettingsPresenter
lateinit
var
analyticsManager
:
AnalyticsManager
@Inject
lateinit
var
presenter
:
SettingsPresenter
private
val
locales
=
arrayListOf
(
"en"
,
"ar"
,
"de"
,
"es"
,
"fa"
,
"fr"
,
"hi,IN"
,
"it"
,
"ja"
,
"pt,BR"
,
"pt,PT"
,
"ru,RU"
,
"tr"
,
"uk"
,
"zh,CN"
,
"zh,TW"
)
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
super
.
onCreate
(
savedInstanceState
)
...
@@ -163,28 +183,33 @@ class SettingsFragment : Fragment(), SettingsView, AppLanguageView {
...
@@ -163,28 +183,33 @@ class SettingsFragment : Fragment(), SettingsView, AppLanguageView {
private
fun
changeLanguage
()
{
private
fun
changeLanguage
()
{
context
?.
let
{
context
?.
let
{
val
selectedLocale
=
presenter
.
getCurrentLocale
(
it
)
var
localeIndex
=
-
1
locales
.
forEachIndexed
{
index
,
locale
->
val
array
=
locale
.
split
(
","
)
val
language
=
array
[
0
]
val
country
=
if
(
array
.
size
>
1
)
array
[
1
]
else
""
// If language and country are specified, return the respective locale, else return
// the first locale found if the language is as specified regardless of the country.
if
(
language
==
selectedLocale
.
language
)
{
if
(
country
==
selectedLocale
.
country
)
{
localeIndex
=
index
return
@forEachIndexed
}
else
if
(
localeIndex
==
-
1
)
{
localeIndex
=
index
}
}
}
AlertDialog
.
Builder
(
it
)
AlertDialog
.
Builder
(
it
)
.
setTitle
(
R
.
string
.
title_choose_language
)
.
setTitle
(
R
.
string
.
title_choose_language
)
.
setSingleChoiceItems
(
.
setSingleChoiceItems
(
resources
.
getStringArray
(
R
.
array
.
languages
),
-
1
resources
.
getStringArray
(
R
.
array
.
languages
),
localeIndex
)
{
dialog
,
option
->
)
{
dialog
,
option
->
when
(
option
)
{
val
array
=
locales
[
option
].
split
(
","
)
0
->
updateLanguage
(
"en"
)
if
(
array
.
size
>
1
)
{
1
->
updateLanguage
(
"ar"
)
updateLanguage
(
array
[
0
],
array
[
1
])
2
->
updateLanguage
(
"de"
)
}
else
{
3
->
updateLanguage
(
"es"
)
updateLanguage
(
array
[
0
])
4
->
updateLanguage
(
"fa"
)
5
->
updateLanguage
(
"fr"
)
6
->
updateLanguage
(
"hi"
,
"IN"
)
7
->
updateLanguage
(
"it"
)
8
->
updateLanguage
(
"ja"
)
9
->
updateLanguage
(
"pt"
,
"BR"
)
10
->
updateLanguage
(
"pt"
,
"PT"
)
11
->
updateLanguage
(
"ru"
,
"RU"
)
12
->
updateLanguage
(
"tr"
)
13
->
updateLanguage
(
"uk"
)
14
->
updateLanguage
(
"zh"
,
"CN"
)
15
->
updateLanguage
(
"zh"
,
"TW"
)
}
}
dialog
.
dismiss
()
dialog
.
dismiss
()
}
}
...
@@ -231,4 +256,4 @@ class SettingsFragment : Fragment(), SettingsView, AppLanguageView {
...
@@ -231,4 +256,4 @@ class SettingsFragment : Fragment(), SettingsView, AppLanguageView {
.
show
()
.
show
()
}
}
}
}
}
}
\ No newline at end of file
app/src/main/res/drawable/ic_send_24dp.xml
View file @
42c34407
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:width=
"24dp"
android:height=
"24dp"
android:height=
"24dp"
android:autoMirrored=
"true"
android:viewportHeight=
"20.0"
android:viewportHeight=
"20.0"
android:viewportWidth=
"22.0"
>
android:viewportWidth=
"22.0"
>
<path
<path
android:fillColor=
"#FF1D74F5"
android:fillColor=
"#FF1D74F5"
android:fillType=
"nonZero"
android:pathData=
"M0.869,1.32C0.731,0.987 0.79,0.565 1.045,0.276C1.281,0.01 1.634,-0.079 1.967,0.076L20.645,9.134C20.939,9.29 21.136,9.645 21.136,10C21.155,10.377 20.939,10.71 20.645,10.866L1.967,19.924C1.634,20.079 1.281,19.99 1.045,19.724C0.79,19.435 0.712,19.036 0.869,18.68L4.263,10L0.869,1.32ZM18.193,10L3.262,2.741L5.832,9.29L9.953,9.334C10.404,9.312 10.777,9.734 10.777,10.266C10.796,10.777 10.423,11.199 9.953,11.199L5.636,11.199L3.262,17.259L18.193,10Z"
/>
android:pathData=
"M0.869,1.32C0.731,0.987 0.79,0.565 1.045,0.276C1.281,0.01 1.634,-0.079 1.967,0.076L20.645,9.134C20.939,9.29 21.136,9.645 21.136,10C21.155,10.377 20.939,10.71 20.645,10.866L1.967,19.924C1.634,20.079 1.281,19.99 1.045,19.724C0.79,19.435 0.712,19.036 0.869,18.68L4.263,10L0.869,1.32ZM18.193,10L3.262,2.741L5.832,9.29L9.953,9.334C10.404,9.312 10.777,9.734 10.777,10.266C10.796,10.777 10.423,11.199 9.953,11.199L5.636,11.199L3.262,17.259L18.193,10Z"
/>
</vector>
</vector>
\ No newline at end of file
app/src/main/res/values-ar/strings.xml
View file @
42c34407
This diff is collapsed.
Click to expand it.
app/src/main/res/values-de/strings.xml
View file @
42c34407
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<string
name=
"title_authentication"
>
Login Daten prüfen
</string>
<string
name=
"title_authentication"
>
Login Daten prüfen
</string>
<string
name=
"title_legal_terms"
>
Legal Terms
</string>
<string
name=
"title_legal_terms"
>
Legal Terms
</string>
<string
name=
"title_chats"
>
Chats
</string>
<string
name=
"title_chats"
>
Chats
</string>
<string
name=
"title_choose_language"
>
Choose Language
</string>
<!-- TODO Add translation --
>
<string
name=
"title_choose_language"
>
Sprache wählen
</string
>
<string
name=
"title_profile"
>
Profil
</string>
<string
name=
"title_profile"
>
Profil
</string>
<string
name=
"title_members"
>
Benutzer
</string>
<string
name=
"title_members"
>
Benutzer
</string>
<string
name=
"title_counted_members"
>
Benutzer (%d)
</string>
<string
name=
"title_counted_members"
>
Benutzer (%d)
</string>
...
@@ -70,27 +70,30 @@
...
@@ -70,27 +70,30 @@
<string
name=
"msg_app_version"
>
Version: %1$s (%2$d)
</string>
<string
name=
"msg_app_version"
>
Version: %1$s (%2$d)
</string>
<string
name=
"msg_server_version"
>
Serverversion: %1$s
</string>
<string
name=
"msg_server_version"
>
Serverversion: %1$s
</string>
<string
name=
"msg_send_analytics"
>
Analysesaten senden
</string>
<string
name=
"msg_send_analytics"
>
Analysesaten senden
</string>
<string
name=
"msg_send_analytics_tracking"
>
Anonyme Statistiken senden um diese App weiter zu verbessern
</string>
<string
name=
"msg_do_not_send_analytics_tracking"
>
KEINE anonymen Statistiken senden um diese App weiter zu verbessern
</string>
<string
name=
"msg_not_applicable_since_it_is_a_foss_version"
>
Nicht anwendbar, da es sich um eine FOSS version handelt
</string>
<string
name=
"msg_logout_from_rocket_chat"
>
Logout von Rocket.Chat
</string>
<string
name=
"msg_logout_from_rocket_chat"
>
Logout von Rocket.Chat
</string>
<string
name=
"msg_delete_account"
>
Konto löschen
</string>
<string
name=
"msg_delete_account"
>
Konto löschen
</string>
<string
name=
"msg_change_status"
>
Status ändern
</string>
<string
name=
"msg_change_status"
>
Status ändern
</string>
<string-array
name=
"languages"
>
<!-- TODO Add translations -->
<string-array
name=
"languages"
>
<item>
English
</item>
<item>
Englis
c
h
</item>
<item>
Arabi
c
</item>
<item>
Arabi
sch
</item>
<item>
German
</item>
<item>
Deutsch
</item>
<item>
Spanish
</item>
<item>
Spanis
c
h
</item>
<item>
Persi
an
</item>
<item>
Persi
sch
</item>
<item>
Fr
en
ch
</item>
<item>
Fr
anzösis
ch
</item>
<item>
Hindi (IN)
</item>
<item>
Hindi (IN)
</item>
<item>
Itali
an
</item>
<item>
Itali
enisch
</item>
<item>
Japan
ese
</item>
<item>
Japan
isch
</item>
<item>
Portug
uese
(BR)
</item>
<item>
Portug
iesisch
(BR)
</item>
<item>
Portug
uese
(PT)
</item>
<item>
Portug
iesisch
(PT)
</item>
<item>
Russi
an
(RU)
</item>
<item>
Russi
sch
(RU)
</item>
<item>
T
urkis
h
</item>
<item>
T
ürkisc
h
</item>
<item>
Ukraini
an
</item>
<item>
Ukraini
sch
</item>
<item>
Chines
e
(CN)
</item>
<item>
Chines
isch
(CN)
</item>
<item>
Chines
e
(TW)
</item>
<item>
Chines
isch
(TW)
</item>
</string-array>
</string-array>
<!-- Regular information messages -->
<!-- Regular information messages -->
...
@@ -219,13 +222,6 @@
...
@@ -219,13 +222,6 @@
<string
name=
"msg_send_email"
>
E-Mail senden
</string>
<string
name=
"msg_send_email"
>
E-Mail senden
</string>
<string
name=
"msg_android_app_support"
>
Android App-Unterstützung
</string>
<string
name=
"msg_android_app_support"
>
Android App-Unterstützung
</string>
<!-- Preferences messages -->
<string
name=
"msg_analytics_tracking"
>
Daten für Analysezwecke
</string>
<string
name=
"msg_send_analytics_tracking"
>
Anonyme Statistiken senden um diese App weiter zu verbessern
</string>
<string
name=
"msg_do_not_send_analytics_tracking"
>
KEINE anonymen Statistiken senden um diese App weiter zu verbessern
</string>
<string
name=
"msg_not_applicable_since_it_is_a_foss_version"
>
Nicht anwendbar, da es sich um eine FOSS version handelt
</string>
<!-- System messages -->
<!-- System messages -->
<string
name=
"message_room_name_changed"
>
Raum Namen geändert zu: %1$s von %2$s
</string>
<string
name=
"message_room_name_changed"
>
Raum Namen geändert zu: %1$s von %2$s
</string>
<string
name=
"message_user_added_by"
>
Benutzer %1$s hinzugefügt von %2$s
</string>
<string
name=
"message_user_added_by"
>
Benutzer %1$s hinzugefügt von %2$s
</string>
...
@@ -364,9 +360,8 @@
...
@@ -364,9 +360,8 @@
<!-- User Details -->
<!-- User Details -->
<string
name=
"timezone"
>
Zeitzone
</string>
<string
name=
"timezone"
>
Zeitzone
</string>
<string
name=
"status"
>
Status: %1$s
</string>
<!-- TODO Translate -->
<string
name=
"status"
>
Status: %1$s
</string>
<string
name=
"user_detail_status"
>
Status
</string>
<!-- TODO Translate -->
<string
name=
"user_detail_status"
>
Status
</string>
<!-- Report -->
<!-- Report -->
<string
name=
"submit"
>
Senden
</string>
<string
name=
"submit"
>
Senden
</string>
<string
name=
"required"
>
*erforderlich
</string>
<string
name=
"required"
>
*erforderlich
</string>
...
...
app/src/main/res/values-es/strings.xml
View file @
42c34407
...
@@ -70,6 +70,9 @@
...
@@ -70,6 +70,9 @@
<string
name=
"msg_app_version"
>
Version: %1$s (%2$d)
</string>
<!-- TODO Translate -->
<string
name=
"msg_app_version"
>
Version: %1$s (%2$d)
</string>
<!-- TODO Translate -->
<string
name=
"msg_server_version"
>
Server version: %1$s
</string>
<!-- TODO Translate -->
<string
name=
"msg_server_version"
>
Server version: %1$s
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics"
>
Send analytics
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics"
>
Send analytics
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics_tracking"
>
Envía estadísticas anónimas para ayudar a mejorar esta aplicación
</string>
<string
name=
"msg_do_not_send_analytics_tracking"
>
No envíe estadísticas anónimas para ayudar a mejorar esta aplicación
</string>
<string
name=
"msg_not_applicable_since_it_is_a_foss_version"
>
No aplica ya que es una versión FOSS
</string>
<string
name=
"msg_logout_from_rocket_chat"
>
Logout from Rocket.Chat
</string>
<!-- TODO Translate -->
<string
name=
"msg_logout_from_rocket_chat"
>
Logout from Rocket.Chat
</string>
<!-- TODO Translate -->
<string
name=
"msg_delete_account"
>
Delete account
</string>
<!-- TODO Translate -->
<string
name=
"msg_delete_account"
>
Delete account
</string>
<!-- TODO Translate -->
<string
name=
"msg_change_status"
>
Change status
</string>
<!-- TODO Translate -->
<string
name=
"msg_change_status"
>
Change status
</string>
<!-- TODO Translate -->
...
@@ -215,12 +218,6 @@
...
@@ -215,12 +218,6 @@
<string
name=
"msg_camera_permission_denied"
>
Camera permission is needed to open camera.
</string>
<!-- TODO Add translation -->
<string
name=
"msg_camera_permission_denied"
>
Camera permission is needed to open camera.
</string>
<!-- TODO Add translation -->
<string
name=
"msg_storage_permission_denied"
>
Storage permission is needed to open Drawing.
</string>
<!-- TODO Add translation -->
<string
name=
"msg_storage_permission_denied"
>
Storage permission is needed to open Drawing.
</string>
<!-- TODO Add translation -->
<!-- Preferences messages -->
<string
name=
"msg_analytics_tracking"
>
Seguimiento analítico
</string>
<string
name=
"msg_send_analytics_tracking"
>
Envía estadísticas anónimas para ayudar a mejorar esta aplicación
</string>
<string
name=
"msg_do_not_send_analytics_tracking"
>
No envíe estadísticas anónimas para ayudar a mejorar esta aplicación
</string>
<string
name=
"msg_not_applicable_since_it_is_a_foss_version"
>
No aplica ya que es una versión FOSS
</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>
<string
name=
"message_user_added_by"
>
Usuario %1$s añadido por %2$s
</string>
<string
name=
"message_user_added_by"
>
Usuario %1$s añadido por %2$s
</string>
...
...
app/src/main/res/values-fa/strings.xml
View file @
42c34407
...
@@ -70,6 +70,9 @@
...
@@ -70,6 +70,9 @@
<string
name=
"msg_app_version"
>
Version: %1$s (%2$d)
</string>
<!-- TODO Translate -->
<string
name=
"msg_app_version"
>
Version: %1$s (%2$d)
</string>
<!-- TODO Translate -->
<string
name=
"msg_server_version"
>
Server version: %1$s
</string>
<!-- TODO Translate -->
<string
name=
"msg_server_version"
>
Server version: %1$s
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics"
>
Send analytics
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics"
>
Send analytics
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics_tracking"
>
برای بهبود این کاره آمار ناشناس بفرستید
</string>
<string
name=
"msg_do_not_send_analytics_tracking"
>
برای بهبود این کاره آمار ناشناس نفرستید
</string>
<string
name=
"msg_not_applicable_since_it_is_a_foss_version"
>
قابل اجرا نیست زیرا نسخهی FOSS است
</string>
<string
name=
"msg_logout_from_rocket_chat"
>
Logout from Rocket.Chat
</string>
<!-- TODO Translate -->
<string
name=
"msg_logout_from_rocket_chat"
>
Logout from Rocket.Chat
</string>
<!-- TODO Translate -->
<string
name=
"msg_delete_account"
>
Delete account
</string>
<!-- TODO Translate -->
<string
name=
"msg_delete_account"
>
Delete account
</string>
<!-- TODO Translate -->
<string
name=
"msg_change_status"
>
Change status
</string>
<!-- TODO Translate -->
<string
name=
"msg_change_status"
>
Change status
</string>
<!-- TODO Translate -->
...
@@ -220,12 +223,6 @@
...
@@ -220,12 +223,6 @@
<string
name=
"msg_view_less"
>
مشاهدهی کمتر
</string>
<string
name=
"msg_view_less"
>
مشاهدهی کمتر
</string>
<string
name=
"msg_muted_on_this_channel"
>
آیا این کانال را بیصدا کردید؟
</string>
<string
name=
"msg_muted_on_this_channel"
>
آیا این کانال را بیصدا کردید؟
</string>
<!-- Preferences messages -->
<string
name=
"msg_analytics_tracking"
>
ردگیری تحلیلی
</string>
<string
name=
"msg_send_analytics_tracking"
>
برای بهبود این کاره آمار ناشناس بفرستید
</string>
<string
name=
"msg_do_not_send_analytics_tracking"
>
برای بهبود این کاره آمار ناشناس نفرستید
</string>
<string
name=
"msg_not_applicable_since_it_is_a_foss_version"
>
قابل اجرا نیست زیرا نسخهی FOSS است
</string>
<!-- System messages -->
<!-- System messages -->
<string
name=
"message_room_name_changed"
>
Room name changed to: %1$s by %2$s
</string>
<!-- TODO Add translation -->
<string
name=
"message_room_name_changed"
>
Room name changed to: %1$s by %2$s
</string>
<!-- TODO Add translation -->
<string
name=
"message_user_added_by"
>
User %1$s added by %2$s
</string>
<!-- TODO Add translation -->
<string
name=
"message_user_added_by"
>
User %1$s added by %2$s
</string>
<!-- TODO Add translation -->
...
...
app/src/main/res/values-fr/strings.xml
View file @
42c34407
...
@@ -70,6 +70,9 @@
...
@@ -70,6 +70,9 @@
<string
name=
"msg_app_version"
>
Version: %1$s (%2$d)
</string>
<!-- TODO Translate -->
<string
name=
"msg_app_version"
>
Version: %1$s (%2$d)
</string>
<!-- TODO Translate -->
<string
name=
"msg_server_version"
>
Server version: %1$s
</string>
<!-- TODO Translate -->
<string
name=
"msg_server_version"
>
Server version: %1$s
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics"
>
Send analytics
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics"
>
Send analytics
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics_tracking"
>
Envoyer des statistiques anonymes pour aider à l\'amélioration de l\'application
</string>
<string
name=
"msg_do_not_send_analytics_tracking"
>
Ne pas envoyer des statistiques anonymes pour aider à l\'amélioration de l\'application
</string>
<string
name=
"msg_not_applicable_since_it_is_a_foss_version"
>
Ne s\'applique pas étant donné qu\'il s\'agit d\'une version FOSS
</string>
<string
name=
"msg_logout_from_rocket_chat"
>
Logout from Rocket.Chat
</string>
<!-- TODO Translate -->
<string
name=
"msg_logout_from_rocket_chat"
>
Logout from Rocket.Chat
</string>
<!-- TODO Translate -->
<string
name=
"msg_delete_account"
>
Delete account
</string>
<!-- TODO Translate -->
<string
name=
"msg_delete_account"
>
Delete account
</string>
<!-- TODO Translate -->
<string
name=
"msg_change_status"
>
Change status
</string>
<!-- TODO Translate -->
<string
name=
"msg_change_status"
>
Change status
</string>
<!-- TODO Translate -->
...
@@ -218,12 +221,6 @@
...
@@ -218,12 +221,6 @@
<string
name=
"msg_member_not_found"
>
Membre non trouvé
</string>
<string
name=
"msg_member_not_found"
>
Membre non trouvé
</string>
<string
name=
"msg_channel_created_successfully"
>
Salon créé
</string>
<string
name=
"msg_channel_created_successfully"
>
Salon créé
</string>
<!-- Preferences messages -->
<string
name=
"msg_analytics_tracking"
>
Pistage à des fins d\'analyses
</string>
<string
name=
"msg_send_analytics_tracking"
>
Envoyer des statistiques anonymes pour aider à l\'amélioration de l\'application
</string>
<string
name=
"msg_do_not_send_analytics_tracking"
>
Ne pas envoyer des statistiques anonymes pour aider à l\'amélioration de l\'application
</string>
<string
name=
"msg_not_applicable_since_it_is_a_foss_version"
>
Ne s\'applique pas étant donné qu\'il s\'agit d\'une version FOSS
</string>
<!-- System messages -->
<!-- System messages -->
<string
name=
"message_room_name_changed"
>
Le nom du salon %1$s a été changé en %2$s
</string>
<string
name=
"message_room_name_changed"
>
Le nom du salon %1$s a été changé en %2$s
</string>
<string
name=
"message_user_added_by"
>
Utilisateur %1$s ajouté par %2$s
</string>
<string
name=
"message_user_added_by"
>
Utilisateur %1$s ajouté par %2$s
</string>
...
...
app/src/main/res/values-hi-rIN/strings.xml
View file @
42c34407
...
@@ -70,6 +70,9 @@
...
@@ -70,6 +70,9 @@
<string
name=
"msg_app_version"
>
Version: %1$s (%2$d)
</string>
<!-- TODO Translate -->
<string
name=
"msg_app_version"
>
Version: %1$s (%2$d)
</string>
<!-- TODO Translate -->
<string
name=
"msg_server_version"
>
Server version: %1$s
</string>
<!-- TODO Translate -->
<string
name=
"msg_server_version"
>
Server version: %1$s
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics"
>
Send analytics
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics"
>
Send analytics
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics_tracking"
>
इस ऐप को बेहतर बनाने में मदद के लिए अज्ञात स्टेटिक्स भेजें
</string>
<string
name=
"msg_do_not_send_analytics_tracking"
>
इस ऐप को बेहतर बनाने में मदद के लिए अनाम स्टेटिक न भेजें
</string>
<string
name=
"msg_not_applicable_since_it_is_a_foss_version"
>
लागू नहीं है क्योंकि यह एक FOSS संस्करण है
</string>
<string
name=
"msg_logout_from_rocket_chat"
>
Logout from Rocket.Chat
</string>
<!-- TODO Translate -->
<string
name=
"msg_logout_from_rocket_chat"
>
Logout from Rocket.Chat
</string>
<!-- TODO Translate -->
<string
name=
"msg_delete_account"
>
Delete account
</string>
<!-- TODO Translate -->
<string
name=
"msg_delete_account"
>
Delete account
</string>
<!-- TODO Translate -->
<string
name=
"msg_change_status"
>
Change status
</string>
<!-- TODO Translate -->
<string
name=
"msg_change_status"
>
Change status
</string>
<!-- TODO Translate -->
...
@@ -221,12 +224,6 @@
...
@@ -221,12 +224,6 @@
<string
name=
"msg_add_new_server"
>
Add New Server
</string>
<!-- TODO Translate -->
<string
name=
"msg_add_new_server"
>
Add New Server
</string>
<!-- TODO Translate -->
<string
name=
"msg_directory"
>
Directory
</string>
<!-- TODO Translate -->
<string
name=
"msg_directory"
>
Directory
</string>
<!-- TODO Translate -->
<!-- Preferences messages -->
<string
name=
"msg_analytics_tracking"
>
एनालिटिक्स ट्रैकिंग
</string>
<string
name=
"msg_send_analytics_tracking"
>
इस ऐप को बेहतर बनाने में मदद के लिए अज्ञात स्टेटिक्स भेजें
</string>
<string
name=
"msg_do_not_send_analytics_tracking"
>
इस ऐप को बेहतर बनाने में मदद के लिए अनाम स्टेटिक न भेजें
</string>
<string
name=
"msg_not_applicable_since_it_is_a_foss_version"
>
लागू नहीं है क्योंकि यह एक FOSS संस्करण है
</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>
<string
name=
"message_user_added_by"
>
उपयोगकर्ता %1$s द्वारा %2$s को जोड़ा गया
</string>
<string
name=
"message_user_added_by"
>
उपयोगकर्ता %1$s द्वारा %2$s को जोड़ा गया
</string>
...
...
app/src/main/res/values-it/strings.xml
View file @
42c34407
...
@@ -70,6 +70,9 @@
...
@@ -70,6 +70,9 @@
<string
name=
"msg_app_version"
>
Version: %1$s (%2$d)
</string>
<!-- TODO Translate -->
<string
name=
"msg_app_version"
>
Version: %1$s (%2$d)
</string>
<!-- TODO Translate -->
<string
name=
"msg_server_version"
>
Server version: %1$s
</string>
<!-- TODO Translate -->
<string
name=
"msg_server_version"
>
Server version: %1$s
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics"
>
Send analytics
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics"
>
Send analytics
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics_tracking"
>
Invia statistiche anonime per migliorare questa app
</string>
<string
name=
"msg_do_not_send_analytics_tracking"
>
Non inviare statiche anonime per migliorare questa app
</string>
<string
name=
"msg_not_applicable_since_it_is_a_foss_version"
>
Non applicabile poiché è una versione FOSS
</string>
<string
name=
"msg_logout_from_rocket_chat"
>
Logout from Rocket.Chat
</string>
<!-- TODO Translate -->
<string
name=
"msg_logout_from_rocket_chat"
>
Logout from Rocket.Chat
</string>
<!-- TODO Translate -->
<string
name=
"msg_delete_account"
>
Delete account
</string>
<!-- TODO Translate -->
<string
name=
"msg_delete_account"
>
Delete account
</string>
<!-- TODO Translate -->
<string
name=
"msg_change_status"
>
Change status
</string>
<!-- TODO Translate -->
<string
name=
"msg_change_status"
>
Change status
</string>
<!-- TODO Translate -->
...
@@ -217,12 +220,6 @@
...
@@ -217,12 +220,6 @@
<string
name=
"msg_view_less"
>
vedere di meno
</string>
<string
name=
"msg_view_less"
>
vedere di meno
</string>
<string
name=
"msg_muted_on_this_channel"
>
Sei disattivato su questo canale
</string>
<string
name=
"msg_muted_on_this_channel"
>
Sei disattivato su questo canale
</string>
<!-- Preferences messages -->
<string
name=
"msg_analytics_tracking"
>
Tracciamento Analitico
</string>
<string
name=
"msg_send_analytics_tracking"
>
Invia statistiche anonime per migliorare questa app
</string>
<string
name=
"msg_do_not_send_analytics_tracking"
>
Non inviare statiche anonime per migliorare questa app
</string>
<string
name=
"msg_not_applicable_since_it_is_a_foss_version"
>
Non applicabile poiché è una versione FOSS
</string>
<!-- System messages -->
<!-- System messages -->
<string
name=
"message_room_name_changed"
>
Nome della camera cambiato in: %1$s da %2$s
</string>
<string
name=
"message_room_name_changed"
>
Nome della camera cambiato in: %1$s da %2$s
</string>
<string
name=
"message_user_added_by"
>
Utente %1$s aggiunto da %2$s
</string>
<string
name=
"message_user_added_by"
>
Utente %1$s aggiunto da %2$s
</string>
...
...
app/src/main/res/values-ja/strings.xml
View file @
42c34407
...
@@ -70,6 +70,9 @@
...
@@ -70,6 +70,9 @@
<string
name=
"msg_app_version"
>
Version: %1$s (%2$d)
</string>
<!-- TODO Translate -->
<string
name=
"msg_app_version"
>
Version: %1$s (%2$d)
</string>
<!-- TODO Translate -->
<string
name=
"msg_server_version"
>
Server version: %1$s
</string>
<!-- TODO Translate -->
<string
name=
"msg_server_version"
>
Server version: %1$s
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics"
>
Send analytics
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics"
>
Send analytics
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics_tracking"
>
アプリ改善のための匿名統計情報を送信する
</string>
<string
name=
"msg_do_not_send_analytics_tracking"
>
アプリ改善のための匿名統計情報を送信しない
</string>
<string
name=
"msg_not_applicable_since_it_is_a_foss_version"
>
FOSSバージョンのため、適用できません
</string>
<string
name=
"msg_logout_from_rocket_chat"
>
Logout from Rocket.Chat
</string>
<!-- TODO Translate -->
<string
name=
"msg_logout_from_rocket_chat"
>
Logout from Rocket.Chat
</string>
<!-- TODO Translate -->
<string
name=
"msg_delete_account"
>
Delete account
</string>
<!-- TODO Translate -->
<string
name=
"msg_delete_account"
>
Delete account
</string>
<!-- TODO Translate -->
<string
name=
"msg_change_status"
>
Change status
</string>
<!-- TODO Translate -->
<string
name=
"msg_change_status"
>
Change status
</string>
<!-- TODO Translate -->
...
@@ -220,12 +223,6 @@
...
@@ -220,12 +223,6 @@
<string
name=
"msg_send_email"
>
Send email
</string>
<!-- TODO - Add proper translation -->
<string
name=
"msg_send_email"
>
Send email
</string>
<!-- TODO - Add proper translation -->
<string
name=
"msg_android_app_support"
>
Android app support
</string>
<!-- TODO - Add proper translation -->
<string
name=
"msg_android_app_support"
>
Android app support
</string>
<!-- TODO - Add proper translation -->
<!-- Preferences messages -->
<string
name=
"msg_analytics_tracking"
>
トラッキングの分析
</string>
<string
name=
"msg_send_analytics_tracking"
>
アプリ改善のための匿名統計情報を送信する
</string>
<string
name=
"msg_do_not_send_analytics_tracking"
>
アプリ改善のための匿名統計情報を送信しない
</string>
<string
name=
"msg_not_applicable_since_it_is_a_foss_version"
>
FOSSバージョンのため、適用できません
</string>
<!-- System messages -->
<!-- System messages -->
<string
name=
"message_room_name_changed"
>
ルーム名を %1$s から %2$s へ変更しました。
</string>
<string
name=
"message_room_name_changed"
>
ルーム名を %1$s から %2$s へ変更しました。
</string>
<string
name=
"message_user_added_by"
>
%1$s がユーザー %2$s を追加しました。
</string>
<string
name=
"message_user_added_by"
>
%1$s がユーザー %2$s を追加しました。
</string>
...
...
app/src/main/res/values-pt-rBR/strings.xml
View file @
42c34407
...
@@ -70,6 +70,9 @@
...
@@ -70,6 +70,9 @@
<string
name=
"msg_app_version"
>
Version: %1$s (%2$d)
</string>
<!-- TODO Translate -->
<string
name=
"msg_app_version"
>
Version: %1$s (%2$d)
</string>
<!-- TODO Translate -->
<string
name=
"msg_server_version"
>
Server version: %1$s
</string>
<!-- TODO Translate -->
<string
name=
"msg_server_version"
>
Server version: %1$s
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics"
>
Send analytics
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics"
>
Send analytics
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics_tracking"
>
Envie estatísticas anônimas para ajudar a melhorar este app
</string>
<string
name=
"msg_do_not_send_analytics_tracking"
>
Não envie estatísticas anônimas para ajudar a melhorar este app
</string>
<string
name=
"msg_not_applicable_since_it_is_a_foss_version"
>
Não aplicável devido a versão do aplicativo ser FOSS
</string>
<string
name=
"msg_logout_from_rocket_chat"
>
Logout from Rocket.Chat
</string>
<!-- TODO Translate -->
<string
name=
"msg_logout_from_rocket_chat"
>
Logout from Rocket.Chat
</string>
<!-- TODO Translate -->
<string
name=
"msg_delete_account"
>
Delete account
</string>
<!-- TODO Translate -->
<string
name=
"msg_delete_account"
>
Delete account
</string>
<!-- TODO Translate -->
<string
name=
"msg_change_status"
>
Change status
</string>
<!-- TODO Translate -->
<string
name=
"msg_change_status"
>
Change status
</string>
<!-- TODO Translate -->
...
@@ -219,12 +222,6 @@
...
@@ -219,12 +222,6 @@
<string
name=
"msg_member_not_found"
>
Membro não encontrado
</string>
<string
name=
"msg_member_not_found"
>
Membro não encontrado
</string>
<string
name=
"msg_channel_created_successfully"
>
Chat criado com sucesso
</string>
<string
name=
"msg_channel_created_successfully"
>
Chat criado com sucesso
</string>
<!-- Preferences messages -->
<string
name=
"msg_analytics_tracking"
>
Rastreamento de análises
</string>
<string
name=
"msg_send_analytics_tracking"
>
Envie estatísticas anônimas para ajudar a melhorar este app
</string>
<string
name=
"msg_do_not_send_analytics_tracking"
>
Não envie estatísticas anônimas para ajudar a melhorar este app
</string>
<string
name=
"msg_not_applicable_since_it_is_a_foss_version"
>
Não aplicável devido a versão do aplicativo ser FOSS
</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>
<string
name=
"message_user_added_by"
>
Usuário %1$s adicionado por %2$s
</string>
<string
name=
"message_user_added_by"
>
Usuário %1$s adicionado por %2$s
</string>
...
...
app/src/main/res/values-pt-rPT/strings.xml
View file @
42c34407
...
@@ -70,6 +70,9 @@
...
@@ -70,6 +70,9 @@
<string
name=
"msg_app_version"
>
Version: %1$s (%2$d)
</string>
<!-- TODO Translate -->
<string
name=
"msg_app_version"
>
Version: %1$s (%2$d)
</string>
<!-- TODO Translate -->
<string
name=
"msg_server_version"
>
Server version: %1$s
</string>
<!-- TODO Translate -->
<string
name=
"msg_server_version"
>
Server version: %1$s
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics"
>
Send analytics
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics"
>
Send analytics
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics_tracking"
>
Enviar estatísticas anónimas para ajudar a melhorar esta aplicação
</string>
<string
name=
"msg_do_not_send_analytics_tracking"
>
Não enviar estatísticas anónimas para ajudar a melhorar esta aplicação
</string>
<string
name=
"msg_not_applicable_since_it_is_a_foss_version"
>
Não aplicável, visto ser uma versão FOSS
</string>
<string
name=
"msg_logout_from_rocket_chat"
>
Logout from Rocket.Chat
</string>
<!-- TODO Translate -->
<string
name=
"msg_logout_from_rocket_chat"
>
Logout from Rocket.Chat
</string>
<!-- TODO Translate -->
<string
name=
"msg_delete_account"
>
Delete account
</string>
<!-- TODO Translate -->
<string
name=
"msg_delete_account"
>
Delete account
</string>
<!-- TODO Translate -->
<string
name=
"msg_change_status"
>
Change status
</string>
<!-- TODO Translate -->
<string
name=
"msg_change_status"
>
Change status
</string>
<!-- TODO Translate -->
...
@@ -219,12 +222,6 @@
...
@@ -219,12 +222,6 @@
<string
name=
"msg_view_less"
>
mostrar menos
</string>
<string
name=
"msg_view_less"
>
mostrar menos
</string>
<string
name=
"msg_muted_on_this_channel"
>
Você está silenciado neste canal
</string>
<string
name=
"msg_muted_on_this_channel"
>
Você está silenciado neste canal
</string>
<!-- Preferences messages -->
<string
name=
"msg_analytics_tracking"
>
Acompanhamento de análise
</string>
<string
name=
"msg_send_analytics_tracking"
>
Enviar estatísticas anónimas para ajudar a melhorar esta aplicação
</string>
<string
name=
"msg_do_not_send_analytics_tracking"
>
Não enviar estatísticas anónimas para ajudar a melhorar esta aplicação
</string>
<string
name=
"msg_not_applicable_since_it_is_a_foss_version"
>
Não aplicável, visto ser uma versão FOSS
</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>
<string
name=
"message_user_added_by"
>
Utilizador %1$s adicionado por %2$s
</string>
<string
name=
"message_user_added_by"
>
Utilizador %1$s adicionado por %2$s
</string>
...
...
app/src/main/res/values-ru-rRU/strings.xml
View file @
42c34407
...
@@ -70,6 +70,9 @@
...
@@ -70,6 +70,9 @@
<string
name=
"msg_app_version"
>
Версия программы: %1$s (%2$d)
</string>
<string
name=
"msg_app_version"
>
Версия программы: %1$s (%2$d)
</string>
<string
name=
"msg_server_version"
>
Версия сервера: %1$s
</string>
<string
name=
"msg_server_version"
>
Версия сервера: %1$s
</string>
<string
name=
"msg_send_analytics"
>
Отправка аналитики
</string>
<string
name=
"msg_send_analytics"
>
Отправка аналитики
</string>
<string
name=
"msg_send_analytics_tracking"
>
Отправлять анонимную статистику для улучшения приложения.
</string>
<string
name=
"msg_do_not_send_analytics_tracking"
>
Не отправлять анонимную статистику для улучшения приложения
</string>
<string
name=
"msg_not_applicable_since_it_is_a_foss_version"
>
Не применимо, так как это FOSS версия
</string>
<string
name=
"msg_logout_from_rocket_chat"
>
Выйти из Rocket.Chat
</string>
<string
name=
"msg_logout_from_rocket_chat"
>
Выйти из Rocket.Chat
</string>
<string
name=
"msg_delete_account"
>
Удалить аккаунт
</string>
<string
name=
"msg_delete_account"
>
Удалить аккаунт
</string>
<string
name=
"msg_change_status"
>
Изменить статус
</string>
<string
name=
"msg_change_status"
>
Изменить статус
</string>
...
@@ -217,12 +220,6 @@
...
@@ -217,12 +220,6 @@
<string
name=
"msg_member_not_found"
>
Пользователь не найден
</string>
<string
name=
"msg_member_not_found"
>
Пользователь не найден
</string>
<string
name=
"msg_channel_created_successfully"
>
Канал создан успешно
</string>
<string
name=
"msg_channel_created_successfully"
>
Канал создан успешно
</string>
<!-- Preferences messages -->
<string
name=
"msg_analytics_tracking"
>
Отслеживание аналитики
</string>
<string
name=
"msg_send_analytics_tracking"
>
Отправлять анонимную статистику для улучшения приложения.
</string>
<string
name=
"msg_do_not_send_analytics_tracking"
>
Не отправлять анонимную статистику для улучшения приложения
</string>
<string
name=
"msg_not_applicable_since_it_is_a_foss_version"
>
Не применимо, так как это FOSS версия
</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>
<string
name=
"message_user_added_by"
>
Пользователь %1$s добавлен пользователем %2$s
</string>
<string
name=
"message_user_added_by"
>
Пользователь %1$s добавлен пользователем %2$s
</string>
...
...
app/src/main/res/values-tr/strings.xml
View file @
42c34407
...
@@ -70,6 +70,9 @@
...
@@ -70,6 +70,9 @@
<string
name=
"msg_app_version"
>
Version: %1$s (%2$d)
</string>
<!-- TODO Translate -->
<string
name=
"msg_app_version"
>
Version: %1$s (%2$d)
</string>
<!-- TODO Translate -->
<string
name=
"msg_server_version"
>
Server version: %1$s
</string>
<!-- TODO Translate -->
<string
name=
"msg_server_version"
>
Server version: %1$s
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics"
>
Send analytics
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics"
>
Send analytics
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics_tracking"
>
Uygulamanın gelişmesine katkıda bulunmak için anonim istatistik bilgisi gönder
</string>
<string
name=
"msg_do_not_send_analytics_tracking"
>
Uygulamanın gelişmesine katkıda bulunmak için anonim istatistik bilgisi gönderme
</string>
<string
name=
"msg_not_applicable_since_it_is_a_foss_version"
>
FOSS sürümü olduğundan uygulanabilir değil
</string>
<string
name=
"msg_logout_from_rocket_chat"
>
Logout from Rocket.Chat
</string>
<!-- TODO Translate -->
<string
name=
"msg_logout_from_rocket_chat"
>
Logout from Rocket.Chat
</string>
<!-- TODO Translate -->
<string
name=
"msg_delete_account"
>
Delete account
</string>
<!-- TODO Translate -->
<string
name=
"msg_delete_account"
>
Delete account
</string>
<!-- TODO Translate -->
<string
name=
"msg_change_status"
>
Change status
</string>
<!-- TODO Translate -->
<string
name=
"msg_change_status"
>
Change status
</string>
<!-- TODO Translate -->
...
@@ -220,12 +223,6 @@
...
@@ -220,12 +223,6 @@
<string
name=
"msg_add_new_server"
>
Add New Server
</string>
<!-- TODO Translate -->
<string
name=
"msg_add_new_server"
>
Add New Server
</string>
<!-- TODO Translate -->
<string
name=
"msg_directory"
>
Directory
</string>
<!-- TODO Translate -->
<string
name=
"msg_directory"
>
Directory
</string>
<!-- TODO Translate -->
<!-- Preferences messages -->
<string
name=
"msg_analytics_tracking"
>
İstatistik takibi
</string>
<string
name=
"msg_send_analytics_tracking"
>
Uygulamanın gelişmesine katkıda bulunmak için anonim istatistik bilgisi gönder
</string>
<string
name=
"msg_do_not_send_analytics_tracking"
>
Uygulamanın gelişmesine katkıda bulunmak için anonim istatistik bilgisi gönderme
</string>
<string
name=
"msg_not_applicable_since_it_is_a_foss_version"
>
FOSS sürümü olduğundan uygulanabilir değil
</string>
<!-- System messages -->
<!-- System messages -->
<string
name=
"message_room_name_changed"
>
Oda ismi %2$s\'dan %1$s\'a değiştirildi
</string>
<string
name=
"message_room_name_changed"
>
Oda ismi %2$s\'dan %1$s\'a değiştirildi
</string>
<string
name=
"message_user_added_by"
>
%1$s kullanıcısı %2$s tarafından eklendi
</string>
<string
name=
"message_user_added_by"
>
%1$s kullanıcısı %2$s tarafından eklendi
</string>
...
...
app/src/main/res/values-uk/strings.xml
View file @
42c34407
...
@@ -70,6 +70,9 @@
...
@@ -70,6 +70,9 @@
<string
name=
"msg_app_version"
>
Version: %1$s (%2$d)
</string>
<!-- TODO Translate -->
<string
name=
"msg_app_version"
>
Version: %1$s (%2$d)
</string>
<!-- TODO Translate -->
<string
name=
"msg_server_version"
>
Server version: %1$s
</string>
<!-- TODO Translate -->
<string
name=
"msg_server_version"
>
Server version: %1$s
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics"
>
Send analytics
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics"
>
Send analytics
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics_tracking"
>
Надсилати анонімну статистику для покращення роботи програми
</string>
<string
name=
"msg_do_not_send_analytics_tracking"
>
Не надсилати анонімну статистику для покращення роботи програми
</string>
<string
name=
"msg_not_applicable_since_it_is_a_foss_version"
>
Недоступно у FOSS версії
</string>
<string
name=
"msg_logout_from_rocket_chat"
>
Logout from Rocket.Chat
</string>
<!-- TODO Translate -->
<string
name=
"msg_logout_from_rocket_chat"
>
Logout from Rocket.Chat
</string>
<!-- TODO Translate -->
<string
name=
"msg_delete_account"
>
Delete account
</string>
<!-- TODO Translate -->
<string
name=
"msg_delete_account"
>
Delete account
</string>
<!-- TODO Translate -->
<string
name=
"msg_change_status"
>
Change status
</string>
<!-- TODO Translate -->
<string
name=
"msg_change_status"
>
Change status
</string>
<!-- TODO Translate -->
...
@@ -216,12 +219,6 @@
...
@@ -216,12 +219,6 @@
<string
name=
"msg_member_not_found"
>
"Користувача не знайдено "
</string>
<string
name=
"msg_member_not_found"
>
"Користувача не знайдено "
</string>
<string
name=
"msg_channel_created_successfully"
>
Канал був створений успішно
</string>
<string
name=
"msg_channel_created_successfully"
>
Канал був створений успішно
</string>
<!-- Preferences messages -->
<string
name=
"msg_analytics_tracking"
>
Збір аналітики
</string>
<string
name=
"msg_send_analytics_tracking"
>
Надсилати анонімну статистику для покращення роботи програми
</string>
<string
name=
"msg_do_not_send_analytics_tracking"
>
Не надсилати анонімну статистику для покращення роботи програми
</string>
<string
name=
"msg_not_applicable_since_it_is_a_foss_version"
>
Недоступно у FOSS версії
</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>
<string
name=
"message_user_added_by"
>
Користувач %2$s додав користувача %1$s
</string>
<string
name=
"message_user_added_by"
>
Користувач %2$s додав користувача %1$s
</string>
...
...
app/src/main/res/values-zh-rCN/strings.xml
View file @
42c34407
...
@@ -70,6 +70,9 @@
...
@@ -70,6 +70,9 @@
<string
name=
"msg_app_version"
>
Version: %1$s (%2$d)
</string>
<!-- TODO Translate -->
<string
name=
"msg_app_version"
>
Version: %1$s (%2$d)
</string>
<!-- TODO Translate -->
<string
name=
"msg_server_version"
>
Server version: %1$s
</string>
<!-- TODO Translate -->
<string
name=
"msg_server_version"
>
Server version: %1$s
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics"
>
Send analytics
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics"
>
Send analytics
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics_tracking"
>
发送匿名统计信息来帮助改善App
</string>
<string
name=
"msg_do_not_send_analytics_tracking"
>
不要发送匿名统计信息,我不想帮组改善App
</string>
<string
name=
"msg_not_applicable_since_it_is_a_foss_version"
>
不适用,因为这事开源软件
</string>
<string
name=
"msg_logout_from_rocket_chat"
>
Logout from Rocket.Chat
</string>
<!-- TODO Translate -->
<string
name=
"msg_logout_from_rocket_chat"
>
Logout from Rocket.Chat
</string>
<!-- TODO Translate -->
<string
name=
"msg_delete_account"
>
Delete account
</string>
<!-- TODO Translate -->
<string
name=
"msg_delete_account"
>
Delete account
</string>
<!-- TODO Translate -->
<string
name=
"msg_change_status"
>
Change status
</string>
<!-- TODO Translate -->
<string
name=
"msg_change_status"
>
Change status
</string>
<!-- TODO Translate -->
...
@@ -217,12 +220,6 @@
...
@@ -217,12 +220,6 @@
<string
name=
"msg_view_less"
>
显示更少
</string>
<string
name=
"msg_view_less"
>
显示更少
</string>
<string
name=
"msg_muted_on_this_channel"
>
您被禁言了
</string>
<string
name=
"msg_muted_on_this_channel"
>
您被禁言了
</string>
<!-- Preferences messages -->
<string
name=
"msg_analytics_tracking"
>
跟踪分析
</string>
<string
name=
"msg_send_analytics_tracking"
>
发送匿名统计信息来帮助改善App
</string>
<string
name=
"msg_do_not_send_analytics_tracking"
>
不要发送匿名统计信息,我不想帮组改善App
</string>
<string
name=
"msg_not_applicable_since_it_is_a_foss_version"
>
不适用,因为这事开源软件
</string>
<!-- System messages -->
<!-- System messages -->
<string
name=
"message_room_name_changed"
>
频道名改为: %1$s by %2$s
</string>
<string
name=
"message_room_name_changed"
>
频道名改为: %1$s by %2$s
</string>
<string
name=
"message_user_added_by"
>
%2$s增加了用户%1$s
</string>
<string
name=
"message_user_added_by"
>
%2$s增加了用户%1$s
</string>
...
...
app/src/main/res/values-zh-rTW/strings.xml
View file @
42c34407
...
@@ -70,6 +70,9 @@
...
@@ -70,6 +70,9 @@
<string
name=
"msg_app_version"
>
Version: %1$s (%2$d)
</string>
<!-- TODO Translate -->
<string
name=
"msg_app_version"
>
Version: %1$s (%2$d)
</string>
<!-- TODO Translate -->
<string
name=
"msg_server_version"
>
Server version: %1$s
</string>
<!-- TODO Translate -->
<string
name=
"msg_server_version"
>
Server version: %1$s
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics"
>
Send analytics
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics"
>
Send analytics
</string>
<!-- TODO Translate -->
<string
name=
"msg_send_analytics_tracking"
>
發送匿名訊息來改善App
</string>
<string
name=
"msg_do_not_send_analytics_tracking"
>
不要發送匿名訊息,我不想幫助這個App
</string>
<string
name=
"msg_not_applicable_since_it_is_a_foss_version"
>
不適用,因為這個軟體是Foss版本
</string>
<string
name=
"msg_logout_from_rocket_chat"
>
Logout from Rocket.Chat
</string>
<!-- TODO Translate -->
<string
name=
"msg_logout_from_rocket_chat"
>
Logout from Rocket.Chat
</string>
<!-- TODO Translate -->
<string
name=
"msg_delete_account"
>
Delete account
</string>
<!-- TODO Translate -->
<string
name=
"msg_delete_account"
>
Delete account
</string>
<!-- TODO Translate -->
<string
name=
"msg_change_status"
>
Change status
</string>
<!-- TODO Translate -->
<string
name=
"msg_change_status"
>
Change status
</string>
<!-- TODO Translate -->
...
@@ -198,12 +201,6 @@
...
@@ -198,12 +201,6 @@
<string
name=
"msg_view_less"
>
顯示更少
</string>
<string
name=
"msg_view_less"
>
顯示更少
</string>
<string
name=
"msg_muted_on_this_channel"
>
您被禁言了
</string>
<string
name=
"msg_muted_on_this_channel"
>
您被禁言了
</string>
<!-- Preferences messages -->
<string
name=
"msg_analytics_tracking"
>
追蹤分析
</string>
<string
name=
"msg_send_analytics_tracking"
>
發送匿名訊息來改善App
</string>
<string
name=
"msg_do_not_send_analytics_tracking"
>
不要發送匿名訊息,我不想幫助這個App
</string>
<string
name=
"msg_not_applicable_since_it_is_a_foss_version"
>
不適用,因為這個軟體是Foss版本
</string>
<!-- System messages -->
<!-- System messages -->
<string
name=
"message_room_name_changed"
>
頻道已經改名為: %1$s by %2$s
</string>
<string
name=
"message_room_name_changed"
>
頻道已經改名為: %1$s by %2$s
</string>
<string
name=
"message_user_added_by"
>
%2$s增加了新的成員%1$s
</string>
<string
name=
"message_user_added_by"
>
%2$s增加了新的成員%1$s
</string>
...
...
app/src/main/res/values/strings.xml
View file @
42c34407
...
@@ -82,6 +82,9 @@ https://github.com/RocketChat/java-code-styles/blob/master/CODING_STYLE.md#strin
...
@@ -82,6 +82,9 @@ https://github.com/RocketChat/java-code-styles/blob/master/CODING_STYLE.md#strin
<string
name=
"msg_app_version"
>
Version: %1$s (%2$d)
</string>
<string
name=
"msg_app_version"
>
Version: %1$s (%2$d)
</string>
<string
name=
"msg_server_version"
>
Server version: %1$s
</string>
<string
name=
"msg_server_version"
>
Server version: %1$s
</string>
<string
name=
"msg_send_analytics"
>
Send analytics
</string>
<string
name=
"msg_send_analytics"
>
Send analytics
</string>
<string
name=
"msg_send_analytics_tracking"
>
Send anonymous statistics to help improve this app
</string>
<string
name=
"msg_do_not_send_analytics_tracking"
>
Do not send anonymous statistics to help improve this app
</string>
<string
name=
"msg_not_applicable_since_it_is_a_foss_version"
>
Not applicable since it is a FOSS version
</string>
<string
name=
"msg_logout_from_rocket_chat"
>
Logout from Rocket.Chat
</string>
<string
name=
"msg_logout_from_rocket_chat"
>
Logout from Rocket.Chat
</string>
<string
name=
"msg_delete_account"
>
Delete account
</string>
<string
name=
"msg_delete_account"
>
Delete account
</string>
<string
name=
"msg_change_status"
>
Change status
</string>
<string
name=
"msg_change_status"
>
Change status
</string>
...
@@ -233,12 +236,6 @@ https://github.com/RocketChat/java-code-styles/blob/master/CODING_STYLE.md#strin
...
@@ -233,12 +236,6 @@ https://github.com/RocketChat/java-code-styles/blob/master/CODING_STYLE.md#strin
<string
name=
"msg_view_less"
>
view less
</string>
<string
name=
"msg_view_less"
>
view less
</string>
<string
name=
"msg_muted_on_this_channel"
>
You are muted on this channel
</string>
<string
name=
"msg_muted_on_this_channel"
>
You are muted on this channel
</string>
<!-- Preferences messages -->
<string
name=
"msg_analytics_tracking"
>
Analytics tracking
</string>
<string
name=
"msg_send_analytics_tracking"
>
Send anonymous statistics to help improve this app
</string>
<string
name=
"msg_do_not_send_analytics_tracking"
>
Do not send anonymous statistics to help improve this app
</string>
<string
name=
"msg_not_applicable_since_it_is_a_foss_version"
>
Not applicable since it is a FOSS version
</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>
<string
name=
"message_user_added_by"
>
User %1$s added by %2$s
</string>
<string
name=
"message_user_added_by"
>
User %1$s added by %2$s
</string>
...
...
draw/src/main/res/drawable/ic_send_black_24dp.xml
View file @
42c34407
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:width=
"24dp"
android:height=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24.0"
android:autoMirrored=
"true"
android:viewportHeight=
"24.0"
>
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
>
<path
<path
android:fillColor=
"#FF000000"
android:fillColor=
"#FF000000"
android:pathData=
"M2.01,21L23,12 2.01,3 2,10l15,2 -15,2z"
/>
android:pathData=
"M2.01,21L23,12 2.01,3 2,10l15,2 -15,2z"
/>
</vector>
</vector>
emoji/src/main/java/chat/rocket/android/emoji/EmojiKeyboardPopup.kt
View file @
42c34407
...
@@ -16,7 +16,6 @@ import androidx.appcompat.app.AppCompatActivity
...
@@ -16,7 +16,6 @@ import androidx.appcompat.app.AppCompatActivity
import
androidx.core.content.ContextCompat
import
androidx.core.content.ContextCompat
import
androidx.core.content.edit
import
androidx.core.content.edit
import
androidx.core.graphics.drawable.DrawableCompat
import
androidx.core.graphics.drawable.DrawableCompat
import
androidx.viewpager.widget.ViewPager
import
chat.rocket.android.emoji.internal.EmojiCategory
import
chat.rocket.android.emoji.internal.EmojiCategory
import
chat.rocket.android.emoji.internal.EmojiPagerAdapter
import
chat.rocket.android.emoji.internal.EmojiPagerAdapter
import
chat.rocket.android.emoji.internal.PREF_EMOJI_SKIN_TONE
import
chat.rocket.android.emoji.internal.PREF_EMOJI_SKIN_TONE
...
@@ -27,7 +26,7 @@ import kotlinx.coroutines.GlobalScope
...
@@ -27,7 +26,7 @@ import kotlinx.coroutines.GlobalScope
import
kotlinx.coroutines.launch
import
kotlinx.coroutines.launch
class
EmojiKeyboardPopup
(
context
:
Context
,
view
:
View
)
:
OverKeyboardPopupWindow
(
context
,
view
)
{
class
EmojiKeyboardPopup
(
context
:
Context
,
view
:
View
)
:
OverKeyboardPopupWindow
(
context
,
view
)
{
private
lateinit
var
viewPager
:
ViewPager
private
lateinit
var
viewPager
:
Emoji
ViewPager
private
lateinit
var
tabLayout
:
TabLayout
private
lateinit
var
tabLayout
:
TabLayout
private
lateinit
var
searchView
:
View
private
lateinit
var
searchView
:
View
private
lateinit
var
backspaceView
:
View
private
lateinit
var
backspaceView
:
View
...
@@ -155,7 +154,7 @@ class EmojiKeyboardPopup(context: Context, view: View) : OverKeyboardPopupWindow
...
@@ -155,7 +154,7 @@ class EmojiKeyboardPopup(context: Context, view: View) : OverKeyboardPopupWindow
val
fragments
=
(
it
as
AppCompatActivity
).
supportFragmentManager
.
fragments
val
fragments
=
(
it
as
AppCompatActivity
).
supportFragmentManager
.
fragments
if
(
fragments
.
size
==
0
||
fragments
[
0
]
!
is
EmojiKeyboardListener
)
{
if
(
fragments
.
size
==
0
||
fragments
[
0
]
!
is
EmojiKeyboardListener
)
{
// Since the app can arrive in an inconsistent state at this point, do not throw
// Since the app can arrive in an inconsistent state at this point, do not throw
//
throw IllegalStateException("activity/fragment should implement Listener interface")
//
throw IllegalStateException("activity/fragment should implement Listener interface")
null
null
}
else
{
}
else
{
fragments
[
0
]
as
EmojiKeyboardListener
fragments
[
0
]
as
EmojiKeyboardListener
...
@@ -177,8 +176,8 @@ class EmojiKeyboardPopup(context: Context, view: View) : OverKeyboardPopupWindow
...
@@ -177,8 +176,8 @@ class EmojiKeyboardPopup(context: Context, view: View) : OverKeyboardPopupWindow
val
tab
=
tabLayout
.
getTabAt
(
category
.
ordinal
)
val
tab
=
tabLayout
.
getTabAt
(
category
.
ordinal
)
val
tabView
=
LayoutInflater
.
from
(
context
).
inflate
(
R
.
layout
.
emoji_picker_tab
,
null
)
val
tabView
=
LayoutInflater
.
from
(
context
).
inflate
(
R
.
layout
.
emoji_picker_tab
,
null
)
tab
?.
customView
=
tabView
tab
?.
customView
=
tabView
val
text
View
=
tabView
.
findViewById
(
R
.
id
.
image_category
)
as
ImageView
val
image
View
=
tabView
.
findViewById
(
R
.
id
.
image_category
)
as
ImageView
text
View
.
setImageResource
(
category
.
resourceIcon
())
image
View
.
setImageResource
(
category
.
resourceIcon
())
}
}
val
currentTab
=
if
(
EmojiRepository
.
getRecents
().
isEmpty
())
{
val
currentTab
=
if
(
EmojiRepository
.
getRecents
().
isEmpty
())
{
...
@@ -186,7 +185,6 @@ class EmojiKeyboardPopup(context: Context, view: View) : OverKeyboardPopupWindow
...
@@ -186,7 +185,6 @@ class EmojiKeyboardPopup(context: Context, view: View) : OverKeyboardPopupWindow
}
else
{
}
else
{
EmojiCategory
.
RECENTS
.
ordinal
EmojiCategory
.
RECENTS
.
ordinal
}
}
viewPager
.
currentItem
=
currentTab
viewPager
.
currentItem
=
currentTab
}
}
}
}
...
@@ -203,7 +201,7 @@ class EmojiKeyboardPopup(context: Context, view: View) : OverKeyboardPopupWindow
...
@@ -203,7 +201,7 @@ class EmojiKeyboardPopup(context: Context, view: View) : OverKeyboardPopupWindow
val
start
=
message
.
getSpanStart
(
span
)
val
start
=
message
.
getSpanStart
(
span
)
val
end
=
message
.
getSpanEnd
(
span
)
val
end
=
message
.
getSpanEnd
(
span
)
// Remove the span
// Remove the span
.
message
.
removeSpan
(
span
)
message
.
removeSpan
(
span
)
// Remove the remaining emoticon text.
// Remove the remaining emoticon text.
...
...
emoji/src/main/java/chat/rocket/android/emoji/EmojiPickerPopup.kt
View file @
42c34407
...
@@ -7,9 +7,6 @@ import android.view.LayoutInflater
...
@@ -7,9 +7,6 @@ import android.view.LayoutInflater
import
android.view.Window
import
android.view.Window
import
android.view.WindowManager
import
android.view.WindowManager
import
android.widget.ImageView
import
android.widget.ImageView
import
androidx.annotation.ColorInt
import
androidx.core.content.ContextCompat
import
androidx.core.content.edit
import
chat.rocket.android.emoji.internal.EmojiCategory
import
chat.rocket.android.emoji.internal.EmojiCategory
import
chat.rocket.android.emoji.internal.EmojiPagerAdapter
import
chat.rocket.android.emoji.internal.EmojiPagerAdapter
import
chat.rocket.android.emoji.internal.PREF_EMOJI_SKIN_TONE
import
chat.rocket.android.emoji.internal.PREF_EMOJI_SKIN_TONE
...
@@ -18,7 +15,6 @@ import kotlinx.coroutines.Dispatchers
...
@@ -18,7 +15,6 @@ import kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.GlobalScope
import
kotlinx.coroutines.GlobalScope
import
kotlinx.coroutines.launch
import
kotlinx.coroutines.launch
class
EmojiPickerPopup
(
context
:
Context
)
:
Dialog
(
context
)
{
class
EmojiPickerPopup
(
context
:
Context
)
:
Dialog
(
context
)
{
var
listener
:
EmojiKeyboardListener
?
=
null
var
listener
:
EmojiKeyboardListener
?
=
null
...
@@ -60,15 +56,15 @@ class EmojiPickerPopup(context: Context) : Dialog(context) {
...
@@ -60,15 +56,15 @@ class EmojiPickerPopup(context: Context) : Dialog(context) {
changeSkinTone
(
Fitzpatrick
.
valueOf
(
it
))
changeSkinTone
(
Fitzpatrick
.
valueOf
(
it
))
}
}
pager_categories
.
adapter
=
adapter
pager_categories
.
offscreenPageLimit
=
EmojiCategory
.
values
().
size
pager_categories
.
offscreenPageLimit
=
EmojiCategory
.
values
().
size
pager_categories
.
adapter
=
adapter
for
(
category
in
EmojiCategory
.
values
())
{
for
(
category
in
EmojiCategory
.
values
())
{
val
tab
=
tabs
.
getTabAt
(
category
.
ordinal
)
val
tab
=
tabs
.
getTabAt
(
category
.
ordinal
)
val
tabView
=
LayoutInflater
.
from
(
context
).
inflate
(
R
.
layout
.
emoji_picker_tab
,
null
)
val
tabView
=
LayoutInflater
.
from
(
context
).
inflate
(
R
.
layout
.
emoji_picker_tab
,
null
)
tab
?.
customView
=
tabView
tab
?.
customView
=
tabView
val
text
View
=
tabView
.
findViewById
(
R
.
id
.
image_category
)
as
ImageView
val
image
View
=
tabView
.
findViewById
(
R
.
id
.
image_category
)
as
ImageView
text
View
.
setImageResource
(
category
.
resourceIcon
())
image
View
.
setImageResource
(
category
.
resourceIcon
())
}
}
val
currentTab
=
if
(
EmojiRepository
.
getRecents
().
isEmpty
())
{
val
currentTab
=
if
(
EmojiRepository
.
getRecents
().
isEmpty
())
{
...
...
emoji/src/main/java/chat/rocket/android/emoji/EmojiViewPager.kt
0 → 100644
View file @
42c34407
package
chat.rocket.android.emoji
import
android.content.Context
import
android.database.DataSetObserver
import
android.os.Parcelable
import
android.util.AttributeSet
import
android.view.View
import
android.view.ViewGroup
import
androidx.core.view.ViewCompat
import
androidx.viewpager.widget.PagerAdapter
import
androidx.viewpager.widget.ViewPager
class
EmojiViewPager
:
ViewPager
{
private
var
mLayoutDirection
=
ViewCompat
.
LAYOUT_DIRECTION_LTR
private
val
mPageChangeListeners
=
hashMapOf
<
OnPageChangeListener
,
ReversingOnPageChangeListener
>()
private
val
isRtl
:
Boolean
get
()
=
mLayoutDirection
==
ViewCompat
.
LAYOUT_DIRECTION_RTL
constructor
(
context
:
Context
)
:
super
(
context
)
constructor
(
context
:
Context
,
attrs
:
AttributeSet
)
:
super
(
context
,
attrs
)
override
fun
onRtlPropertiesChanged
(
layoutDirection
:
Int
)
{
super
.
onRtlPropertiesChanged
(
layoutDirection
)
val
viewCompatLayoutDirection
=
if
(
layoutDirection
==
View
.
LAYOUT_DIRECTION_RTL
)
{
ViewCompat
.
LAYOUT_DIRECTION_RTL
}
else
{
ViewCompat
.
LAYOUT_DIRECTION_LTR
}
if
(
viewCompatLayoutDirection
!=
mLayoutDirection
)
{
val
adapter
=
super
.
getAdapter
()
var
position
=
0
if
(
adapter
!=
null
)
{
position
=
currentItem
}
mLayoutDirection
=
viewCompatLayoutDirection
if
(
adapter
!=
null
)
{
adapter
.
notifyDataSetChanged
()
currentItem
=
position
}
}
}
override
fun
setAdapter
(
adapter
:
PagerAdapter
?)
{
val
adapter
=
if
(
adapter
!=
null
)
{
ReversingAdapter
(
adapter
)
}
else
{
adapter
}
super
.
setAdapter
(
adapter
)
currentItem
=
0
}
override
fun
getAdapter
():
PagerAdapter
?
{
return
super
.
getAdapter
()
as
ReversingAdapter
?
}
override
fun
getCurrentItem
():
Int
{
var
item
=
super
.
getCurrentItem
()
val
adapter
=
super
.
getAdapter
()
if
(
adapter
!=
null
&&
isRtl
)
{
item
=
adapter
.
count
-
item
-
1
}
return
item
}
override
fun
setCurrentItem
(
position
:
Int
,
smoothScroll
:
Boolean
)
{
val
adapter
=
super
.
getAdapter
()
val
position
=
if
(
adapter
!=
null
&&
isRtl
)
{
adapter
.
count
-
position
-
1
}
else
{
position
}
super
.
setCurrentItem
(
position
,
smoothScroll
)
}
override
fun
setCurrentItem
(
position
:
Int
)
{
val
adapter
=
super
.
getAdapter
()
val
position
=
if
(
adapter
!=
null
&&
isRtl
)
{
adapter
.
count
-
position
-
1
}
else
{
position
}
super
.
setCurrentItem
(
position
)
}
override
fun
setOnPageChangeListener
(
listener
:
OnPageChangeListener
)
{
super
.
setOnPageChangeListener
(
ReversingOnPageChangeListener
(
listener
))
}
override
fun
addOnPageChangeListener
(
listener
:
OnPageChangeListener
)
{
val
reversingListener
=
ReversingOnPageChangeListener
(
listener
)
mPageChangeListeners
.
put
(
listener
,
reversingListener
)
super
.
addOnPageChangeListener
(
reversingListener
)
}
override
fun
removeOnPageChangeListener
(
listener
:
OnPageChangeListener
)
{
val
reverseListener
=
mPageChangeListeners
.
remove
(
listener
)
if
(
reverseListener
!=
null
)
{
super
.
removeOnPageChangeListener
(
reverseListener
)
}
}
override
fun
clearOnPageChangeListeners
()
{
super
.
clearOnPageChangeListeners
()
mPageChangeListeners
.
clear
()
}
override
fun
onMeasure
(
widthMeasureSpec
:
Int
,
heightMeasureSpec
:
Int
)
{
val
heightMeasureSpec
=
if
(
MeasureSpec
.
getMode
(
heightMeasureSpec
)
==
MeasureSpec
.
UNSPECIFIED
)
{
var
height
=
0
for
(
i
in
0
until
childCount
)
{
val
child
=
getChildAt
(
i
)
child
.
measure
(
widthMeasureSpec
,
MeasureSpec
.
makeMeasureSpec
(
0
,
MeasureSpec
.
UNSPECIFIED
))
val
h
=
child
.
measuredHeight
if
(
h
>
height
)
{
height
=
h
}
}
MeasureSpec
.
makeMeasureSpec
(
height
,
MeasureSpec
.
EXACTLY
)
}
else
{
heightMeasureSpec
}
super
.
onMeasure
(
widthMeasureSpec
,
heightMeasureSpec
)
}
private
inner
class
ReversingOnPageChangeListener
(
private
val
mListener
:
OnPageChangeListener
)
:
OnPageChangeListener
{
override
fun
onPageScrolled
(
position
:
Int
,
positionOffset
:
Float
,
positionOffsetPixels
:
Int
)
{
var
position
=
position
var
positionOffset
=
positionOffset
var
positionOffsetPixels
=
positionOffsetPixels
val
width
=
width
val
adapter
=
super
@EmojiViewPager
.
getAdapter
()
if
(
adapter
!=
null
&&
isRtl
)
{
val
count
=
adapter
.
count
var
remainingWidth
=
(
width
*
(
1
-
adapter
.
getPageWidth
(
position
))).
toInt
()
+
positionOffsetPixels
while
(
position
<
count
&&
remainingWidth
>
0
)
{
position
+=
1
remainingWidth
-=
(
width
*
adapter
.
getPageWidth
(
position
)).
toInt
()
}
position
=
count
-
position
-
1
positionOffsetPixels
=
-
remainingWidth
positionOffset
=
positionOffsetPixels
/
(
width
*
adapter
.
getPageWidth
(
position
))
}
mListener
.
onPageScrolled
(
position
,
positionOffset
,
positionOffsetPixels
)
}
override
fun
onPageSelected
(
position
:
Int
)
{
val
adapter
=
super
@EmojiViewPager
.
getAdapter
()
val
position
=
if
(
adapter
!=
null
&&
isRtl
)
{
adapter
.
count
-
position
-
1
}
else
{
position
}
mListener
.
onPageSelected
(
position
)
}
override
fun
onPageScrollStateChanged
(
state
:
Int
)
{
mListener
.
onPageScrollStateChanged
(
state
)
}
}
private
inner
class
ReversingAdapter
(
private
val
adapter
:
PagerAdapter
)
:
PagerAdapter
()
{
override
fun
isViewFromObject
(
view
:
View
,
obj
:
Any
):
Boolean
{
return
adapter
.
isViewFromObject
(
view
,
obj
)
}
override
fun
getCount
():
Int
{
return
adapter
.
count
}
override
fun
getItemPosition
(
obj
:
Any
):
Int
{
var
position
=
adapter
.
getItemPosition
(
obj
)
if
(
isRtl
)
{
if
(
position
==
POSITION_UNCHANGED
||
position
==
POSITION_NONE
)
{
position
=
POSITION_NONE
}
else
{
position
=
getCount
()
-
position
-
1
}
}
return
position
}
override
fun
getPageTitle
(
position
:
Int
):
CharSequence
?
{
return
adapter
.
getPageTitle
(
position
)
}
override
fun
getPageWidth
(
position
:
Int
):
Float
{
return
adapter
.
getPageWidth
(
position
)
}
override
fun
instantiateItem
(
container
:
ViewGroup
,
position
:
Int
):
Any
{
val
position
=
if
(
isRtl
)
{
count
-
position
-
1
}
else
{
position
}
return
adapter
.
instantiateItem
(
container
,
position
)
}
override
fun
instantiateItem
(
container
:
View
,
position
:
Int
):
Any
{
val
position
=
if
(
isRtl
)
{
count
-
position
-
1
}
else
{
position
}
return
adapter
.
instantiateItem
(
container
,
position
)
}
override
fun
destroyItem
(
container
:
ViewGroup
,
position
:
Int
,
obj
:
Any
)
{
val
position
=
if
(
isRtl
)
{
count
-
position
-
1
}
else
{
position
}
adapter
.
destroyItem
(
container
,
position
,
obj
)
}
override
fun
destroyItem
(
container
:
View
,
position
:
Int
,
obj
:
Any
)
{
val
position
=
if
(
isRtl
)
{
count
-
position
-
1
}
else
{
position
}
adapter
.
destroyItem
(
container
,
position
,
obj
)
}
override
fun
setPrimaryItem
(
container
:
ViewGroup
,
position
:
Int
,
obj
:
Any
)
{
val
position
=
if
(
isRtl
)
{
count
-
position
-
1
}
else
{
position
}
adapter
.
setPrimaryItem
(
container
,
position
,
obj
)
}
override
fun
setPrimaryItem
(
container
:
View
,
position
:
Int
,
obj
:
Any
)
{
val
position
=
if
(
isRtl
)
{
count
-
position
-
1
}
else
{
position
}
adapter
.
setPrimaryItem
(
container
,
position
,
obj
)
}
override
fun
startUpdate
(
container
:
ViewGroup
)
{
adapter
.
startUpdate
(
container
)
}
override
fun
startUpdate
(
container
:
View
)
{
adapter
.
startUpdate
(
container
)
}
override
fun
finishUpdate
(
container
:
ViewGroup
)
{
adapter
.
finishUpdate
(
container
)
}
override
fun
finishUpdate
(
container
:
View
)
{
adapter
.
finishUpdate
(
container
)
}
override
fun
saveState
():
Parcelable
?
{
return
adapter
.
saveState
()
}
override
fun
restoreState
(
state
:
Parcelable
?,
loader
:
ClassLoader
?)
{
adapter
.
restoreState
(
state
,
loader
)
}
override
fun
notifyDataSetChanged
()
{
adapter
.
notifyDataSetChanged
()
}
override
fun
registerDataSetObserver
(
observer
:
DataSetObserver
)
{
adapter
.
registerDataSetObserver
(
observer
)
}
override
fun
unregisterDataSetObserver
(
observer
:
DataSetObserver
)
{
adapter
.
unregisterDataSetObserver
(
observer
)
}
}
}
emoji/src/main/res/drawable/ic_backspace_gray_24dp.xml
View file @
42c34407
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:width=
"24dp"
android:height=
"24dp"
android:height=
"24dp"
android:autoMirrored=
"true"
android:viewportHeight=
"24"
android:viewportHeight=
"24"
android:viewportWidth=
"24"
>
android:viewportWidth=
"24"
>
...
...
emoji/src/main/res/layout-land/emoji_picker.xml
View file @
42c34407
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
app:tabGravity=
"fill"
app:tabGravity=
"fill"
app:tabMode=
"scrollable"
/>
app:tabMode=
"scrollable"
/>
<
androidx.viewpager.widget.
ViewPager
<
chat.rocket.android.emoji.Emoji
ViewPager
android:id=
"@+id/pager_categories"
android:id=
"@+id/pager_categories"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
...
...
emoji/src/main/res/layout/emoji_picker.xml
View file @
42c34407
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
app:tabMaxWidth=
"48dp"
app:tabMaxWidth=
"48dp"
app:tabMode=
"scrollable"
/>
app:tabMode=
"scrollable"
/>
<
androidx.viewpager.widget.
ViewPager
<
chat.rocket.android.emoji.Emoji
ViewPager
android:id=
"@+id/pager_categories"
android:id=
"@+id/pager_categories"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
...
...
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