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
c4e10ff6
Unverified
Commit
c4e10ff6
authored
Dec 14, 2018
by
Rafael Kellermann Streit
Committed by
GitHub
Dec 14, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into develop
parents
58eb6d79
618b3cee
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
81 additions
and
72 deletions
+81
-72
ChatRoomsFragment.kt
...ava/chat/rocket/android/chatrooms/ui/ChatRoomsFragment.kt
+4
-2
AppModule.kt
.../main/java/chat/rocket/android/dagger/module/AppModule.kt
+2
-1
LocalModule.kt
...ain/java/chat/rocket/android/dagger/module/LocalModule.kt
+2
-3
MainPresenter.kt
...va/chat/rocket/android/main/presentation/MainPresenter.kt
+1
-0
RocketChatClientFactory.kt
...android/server/infraestructure/RocketChatClientFactory.kt
+1
-0
String.kt
...c/main/java/chat/rocket/android/util/extensions/String.kt
+7
-1
strings.xml
app/src/main/res/values-de/strings.xml
+64
-65
No files found.
app/src/main/java/chat/rocket/android/chatrooms/ui/ChatRoomsFragment.kt
View file @
c4e10ff6
...
...
@@ -36,6 +36,8 @@ import chat.rocket.android.helper.SharedPreferenceHelper
import
chat.rocket.android.util.extension.onQueryTextListener
import
chat.rocket.android.util.extensions.fadeIn
import
chat.rocket.android.util.extensions.fadeOut
import
chat.rocket.android.util.extensions.ifNotNullNorEmpty
import
chat.rocket.android.util.extensions.ifNotNullNotEmpty
import
chat.rocket.android.util.extensions.inflate
import
chat.rocket.android.util.extensions.showToast
import
chat.rocket.android.util.extensions.ui
...
...
@@ -83,8 +85,8 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
val
bundle
=
arguments
if
(
bundle
!=
null
)
{
chatRoomId
=
bundle
.
getString
(
BUNDLE_CHAT_ROOM_ID
)
chatRoomId
?.
let
{
presenter
.
loadChatRoom
(
it
)
chatRoomId
.
ifNotNullNotEmpty
{
roomId
->
presenter
.
loadChatRoom
(
roomId
)
chatRoomId
=
null
}
}
...
...
app/src/main/java/chat/rocket/android/dagger/module/AppModule.kt
View file @
c4e10ff6
...
...
@@ -64,6 +64,7 @@ import chat.rocket.common.internal.ISO8601Date
import
chat.rocket.common.model.TimestampAdapter
import
chat.rocket.common.util.CalendarISO8601Converter
import
chat.rocket.common.util.Logger
import
chat.rocket.common.util.NoOpLogger
import
chat.rocket.common.util.PlatformLogger
import
chat.rocket.core.internal.AttachmentAdapterFactory
import
chat.rocket.core.internal.ReactionsAdapter
...
...
@@ -231,7 +232,7 @@ class AppModule {
return
Moshi
.
Builder
()
.
add
(
FallbackSealedClassJsonAdapter
.
ADAPTER_FACTORY
)
.
add
(
AppJsonAdapterFactory
.
INSTANCE
)
.
add
(
AttachmentAdapterFactory
(
Logger
(
logger
,
url
)
))
.
add
(
AttachmentAdapterFactory
(
NoOpLogger
))
.
add
(
java
.
lang
.
Long
::
class
.
java
,
ISO8601Date
::
class
.
java
,
...
...
app/src/main/java/chat/rocket/android/dagger/module/LocalModule.kt
View file @
c4e10ff6
...
...
@@ -14,6 +14,7 @@ import chat.rocket.common.internal.ISO8601Date
import
chat.rocket.common.model.TimestampAdapter
import
chat.rocket.common.util.CalendarISO8601Converter
import
chat.rocket.common.util.Logger
import
chat.rocket.common.util.NoOpLogger
import
chat.rocket.common.util.PlatformLogger
import
chat.rocket.core.internal.AttachmentAdapterFactory
import
chat.rocket.core.internal.ReactionsAdapter
...
...
@@ -47,7 +48,7 @@ class LocalModule {
return
Moshi
.
Builder
()
.
add
(
FallbackSealedClassJsonAdapter
.
ADAPTER_FACTORY
)
.
add
(
AppJsonAdapterFactory
.
INSTANCE
)
.
add
(
AttachmentAdapterFactory
(
Logger
(
logger
,
url
)
))
.
add
(
AttachmentAdapterFactory
(
NoOpLogger
))
.
add
(
java
.
lang
.
Long
::
class
.
java
,
ISO8601Date
::
class
.
java
,
...
...
@@ -67,8 +68,6 @@ class LocalModule {
return
context
.
getSharedPreferences
(
"rocket.chat"
,
Context
.
MODE_PRIVATE
)
}
@Provides
@Singleton
fun
provideLocalRepository
(
sharedPreferences
:
SharedPreferences
,
moshi
:
Moshi
):
LocalRepository
{
...
...
app/src/main/java/chat/rocket/android/main/presentation/MainPresenter.kt
View file @
c4e10ff6
...
...
@@ -110,6 +110,7 @@ class MainPresenter @Inject constructor(
}
fun
loadCurrentInfo
()
{
setupConnectionInfo
(
currentServer
)
checkServerInfo
(
currentServer
)
launchUI
(
strategy
)
{
try
{
...
...
app/src/main/java/chat/rocket/android/server/infraestructure/RocketChatClientFactory.kt
View file @
c4e10ff6
...
...
@@ -30,6 +30,7 @@ class RocketChatClientFactory @Inject constructor(
userAgent
=
"RC Mobile; Android ${Build.VERSION.RELEASE}; v${BuildConfig.VERSION_NAME} (${BuildConfig.VERSION_CODE})"
tokenRepository
=
repository
platformLogger
=
logger
enableLogger
=
false
}
Timber
.
d
(
"Returning NEW client for: $url"
)
...
...
app/src/main/java/chat/rocket/android/util/extensions/String.kt
View file @
c4e10ff6
...
...
@@ -76,4 +76,10 @@ fun String.lowercaseUrl(): String? {
return
httpUrl
?.
newBuilder
()
?.
scheme
(
newScheme
)
?.
build
()
?.
toString
()
}
fun
String
?.
isNotNullNorEmpty
():
Boolean
=
this
!=
null
&&
this
.
isNotEmpty
()
\ No newline at end of file
fun
String
?.
isNotNullNorEmpty
():
Boolean
=
this
!=
null
&&
this
.
isNotEmpty
()
inline
fun
String
?.
ifNotNullNotEmpty
(
block
:
(
String
)
->
Unit
)
{
if
(
this
!=
null
&&
this
.
isNotEmpty
())
{
block
(
this
)
}
}
\ No newline at end of file
app/src/main/res/values-de/strings.xml
View file @
c4e10ff6
This diff is collapsed.
Click to expand it.
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