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
3414b6bb
Commit
3414b6bb
authored
Feb 14, 2018
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop-2.x' into improvement/svg-in-favor-of-text-drawable
parents
fcc37452
d31b9ea1
Changes
54
Hide whitespace changes
Inline
Side-by-side
Showing
54 changed files
with
772 additions
and
181 deletions
+772
-181
build.gradle
app/build.gradle
+6
-7
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+4
-5
RocketChatApplication.kt
...ain/java/chat/rocket/android/app/RocketChatApplication.kt
+0
-2
SharedPreferencesMultiServerTokenRepository.kt
...estructure/SharedPreferencesMultiServerTokenRepository.kt
+5
-3
AuthenticationNavigator.kt
...id/authentication/presentation/AuthenticationNavigator.kt
+2
-2
TwoFAFragment.kt
...cket/android/authentication/twofactor/ui/TwoFAFragment.kt
+1
-1
ChatRoomPresenter.kt
...rocket/android/chatroom/presentation/ChatRoomPresenter.kt
+1
-1
ChatRoomAdapter.kt
...n/java/chat/rocket/android/chatroom/ui/ChatRoomAdapter.kt
+1
-1
ChatRoomsModule.kt
.../java/chat/rocket/android/chatrooms/di/ChatRoomsModule.kt
+2
-2
ChatRoomsNavigator.kt
...cket/android/chatrooms/presentation/ChatRoomsNavigator.kt
+2
-2
ChatRoomsPresenter.kt
...cket/android/chatrooms/presentation/ChatRoomsPresenter.kt
+33
-0
ChatRoomsView.kt
...at/rocket/android/chatrooms/presentation/ChatRoomsView.kt
+10
-0
ChatRoomsActivity.kt
...ava/chat/rocket/android/chatrooms/ui/ChatRoomsActivity.kt
+0
-34
ChatRoomsFragment.kt
...ava/chat/rocket/android/chatrooms/ui/ChatRoomsFragment.kt
+44
-29
ActivityBuilder.kt
...java/chat/rocket/android/dagger/module/ActivityBuilder.kt
+4
-3
LocalRepository.kt
...ava/chat/rocket/android/infrastructure/LocalRepository.kt
+7
-1
SharedPrefsLocalRepository.kt
...cket/android/infrastructure/SharedPrefsLocalRepository.kt
+10
-0
MainActivity.kt
...src/main/java/chat/rocket/android/main/ui/MainActivity.kt
+81
-0
ProfileFragmentModule.kt
...a/chat/rocket/android/profile/di/ProfileFragmentModule.kt
+30
-0
ProfileFragmentProvider.kt
...chat/rocket/android/profile/di/ProfileFragmentProvider.kt
+12
-0
ProfilePresenter.kt
...t/rocket/android/profile/presentation/ProfilePresenter.kt
+61
-0
ProfileView.kt
...a/chat/rocket/android/profile/presentation/ProfileView.kt
+23
-0
ProfileFragment.kt
...in/java/chat/rocket/android/profile/ui/ProfileFragment.kt
+151
-0
PushManager.kt
app/src/main/java/chat/rocket/android/push/PushManager.kt
+2
-2
CurrentServerRepository.kt
...t/rocket/android/server/domain/CurrentServerRepository.kt
+1
-0
GetCurrentServerInteractor.kt
...ocket/android/server/domain/GetCurrentServerInteractor.kt
+4
-0
MultiServerTokenRepository.kt
...ocket/android/server/domain/MultiServerTokenRepository.kt
+2
-0
SharedPreferencesSettingsRepository.kt
...er/infraestructure/SharedPreferencesSettingsRepository.kt
+1
-4
SharedPrefsCurrentServerRepository.kt
...ver/infraestructure/SharedPrefsCurrentServerRepository.kt
+4
-0
ActivityExtensions.kt
.../main/java/chat/rocket/android/util/ActivityExtensions.kt
+8
-0
Extensions.kt
app/src/main/java/chat/rocket/android/util/Extensions.kt
+13
-1
ic_chat_bubble_black_24dp.xml
app/src/main/res/drawable/ic_chat_bubble_black_24dp.xml
+9
-0
ic_check_white_24dp.xml
app/src/main/res/drawable/ic_check_white_24dp.xml
+11
-0
ic_menu_white_24dp.xml
app/src/main/res/drawable/ic_menu_white_24dp.xml
+9
-0
splash_screen.xml
app/src/main/res/drawable/splash_screen.xml
+0
-14
style_edit_text_authentication.xml
app/src/main/res/drawable/style_edit_text_authentication.xml
+0
-0
style_edit_text_profile.xml
app/src/main/res/drawable/style_edit_text_profile.xml
+15
-0
activity_chat_rooms.xml
app/src/main/res/layout/activity_chat_rooms.xml
+0
-14
activity_main.xml
app/src/main/res/layout/activity_main.xml
+33
-0
avatar.xml
app/src/main/res/layout/avatar.xml
+1
-1
avatar_profile.xml
app/src/main/res/layout/avatar_profile.xml
+17
-0
fragment_authentication_log_in.xml
app/src/main/res/layout/fragment_authentication_log_in.xml
+2
-2
fragment_authentication_server.xml
app/src/main/res/layout/fragment_authentication_server.xml
+1
-1
fragment_authentication_sign_up.xml
app/src/main/res/layout/fragment_authentication_sign_up.xml
+5
-5
fragment_authentication_two_fa.xml
app/src/main/res/layout/fragment_authentication_two_fa.xml
+1
-1
fragment_chat_rooms.xml
app/src/main/res/layout/fragment_chat_rooms.xml
+13
-14
fragment_profile.xml
app/src/main/res/layout/fragment_profile.xml
+59
-0
chatrooms.xml
app/src/main/res/menu/chatrooms.xml
+9
-2
navigation.xml
app/src/main/res/menu/navigation.xml
+16
-0
profile.xml
app/src/main/res/menu/profile.xml
+9
-0
strings.xml
app/src/main/res/values-pt-rBR/strings.xml
+9
-2
strings.xml
app/src/main/res/values/strings.xml
+10
-3
styles.xml
app/src/main/res/values/styles.xml
+9
-12
dependencies.gradle
dependencies.gradle
+9
-10
No files found.
app/build.gradle
View file @
3414b6bb
...
@@ -72,8 +72,8 @@ dependencies {
...
@@ -72,8 +72,8 @@ dependencies {
kapt
libraries
.
roomProcessor
kapt
libraries
.
roomProcessor
implementation
libraries
.
roomRxjava
implementation
libraries
.
roomRxjava
implementation
libraries
.
rx
java
implementation
libraries
.
rx
Kotlin
implementation
libraries
.
rx
a
ndroid
implementation
libraries
.
rx
A
ndroid
implementation
libraries
.
moshi
implementation
libraries
.
moshi
implementation
libraries
.
okhttp
implementation
libraries
.
okhttp
...
@@ -81,6 +81,7 @@ dependencies {
...
@@ -81,6 +81,7 @@ dependencies {
implementation
libraries
.
timber
implementation
libraries
.
timber
implementation
libraries
.
threeTenABP
implementation
libraries
.
threeTenABP
implementation
libraries
.
rxBinding
implementation
libraries
.
fresco
implementation
libraries
.
fresco
api
libraries
.
frescoOkHttp
api
libraries
.
frescoOkHttp
...
@@ -88,14 +89,12 @@ dependencies {
...
@@ -88,14 +89,12 @@ dependencies {
implementation
libraries
.
frescoWebP
implementation
libraries
.
frescoWebP
implementation
libraries
.
frescoAnimatedWebP
implementation
libraries
.
frescoAnimatedWebP
implementation
libraries
.
frescoImageViewer
kapt
libraries
.
kotshiCompiler
kapt
libraries
.
kotshiCompiler
implementation
libraries
.
kotshiApi
implementation
libraries
.
kotshiApi
implementation
libraries
.
aVLoadingIndicatorView
implementation
libraries
.
frescoImageViewer
implementation
libraries
.
textDrawable
implementation
libraries
.
aVLoadingIndicatorView
implementation
(
'com.crashlytics.sdk.android:crashlytics:2.6.8@aar'
)
{
implementation
(
'com.crashlytics.sdk.android:crashlytics:2.6.8@aar'
)
{
transitive
=
true
transitive
=
true
...
@@ -120,4 +119,4 @@ task compileSdk(type:Exec) {
...
@@ -120,4 +119,4 @@ task compileSdk(type:Exec) {
}
}
preBuild
.
dependsOn
compileSdk
preBuild
.
dependsOn
compileSdk
apply
plugin:
'com.google.gms.google-services'
apply
plugin:
'com.google.gms.google-services'
\ No newline at end of file
app/src/main/AndroidManifest.xml
View file @
3414b6bb
...
@@ -19,14 +19,13 @@
...
@@ -19,14 +19,13 @@
android:icon=
"@mipmap/ic_launcher"
android:icon=
"@mipmap/ic_launcher"
android:label=
"@string/app_name"
android:label=
"@string/app_name"
android:roundIcon=
"@mipmap/ic_launcher_round"
android:roundIcon=
"@mipmap/ic_launcher_round"
android:supportsRtl=
"true"
android:supportsRtl=
"true"
>
android:theme=
"@style/AppTheme"
>
<activity
<activity
android:name=
".authentication.ui.AuthenticationActivity"
android:name=
".authentication.ui.AuthenticationActivity"
android:configChanges=
"orientation"
android:configChanges=
"orientation"
android:screenOrientation=
"portrait"
android:screenOrientation=
"portrait"
android:theme=
"@style/A
ppTheme.SplashScreen
"
android:theme=
"@style/A
uthenticationTheme
"
android:windowSoftInputMode=
"adjustResize"
>
android:windowSoftInputMode=
"adjustResize"
>
<intent-filter>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
<action
android:name=
"android.intent.action.MAIN"
/>
...
@@ -41,8 +40,8 @@
...
@@ -41,8 +40,8 @@
android:theme=
"@style/AppTheme"
/>
android:theme=
"@style/AppTheme"
/>
<activity
<activity
android:name=
".
chatrooms.ui.ChatRooms
Activity"
android:name=
".
main.ui.Main
Activity"
android:theme=
"@style/
ChatList
Theme"
/>
android:theme=
"@style/
App
Theme"
/>
<activity
<activity
android:name=
".chatroom.ui.ChatRoomActivity"
android:name=
".chatroom.ui.ChatRoomActivity"
...
...
app/src/main/java/chat/rocket/android/app/RocketChatApplication.kt
View file @
3414b6bb
...
@@ -25,8 +25,6 @@ import io.fabric.sdk.android.Fabric
...
@@ -25,8 +25,6 @@ import io.fabric.sdk.android.Fabric
import
timber.log.Timber
import
timber.log.Timber
import
javax.inject.Inject
import
javax.inject.Inject
class
RocketChatApplication
:
Application
(),
HasActivityInjector
,
HasServiceInjector
{
class
RocketChatApplication
:
Application
(),
HasActivityInjector
,
HasServiceInjector
{
@Inject
@Inject
...
...
app/src/main/java/chat/rocket/android/authentication/infraestructure/SharedPreferencesMultiServerTokenRepository.kt
View file @
3414b6bb
...
@@ -3,6 +3,7 @@ package chat.rocket.android.authentication.infraestructure
...
@@ -3,6 +3,7 @@ package chat.rocket.android.authentication.infraestructure
import
chat.rocket.android.authentication.domain.model.TokenModel
import
chat.rocket.android.authentication.domain.model.TokenModel
import
chat.rocket.android.dagger.scope.PerActivity
import
chat.rocket.android.dagger.scope.PerActivity
import
chat.rocket.android.infrastructure.LocalRepository
import
chat.rocket.android.infrastructure.LocalRepository
import
chat.rocket.android.infrastructure.LocalRepository.Companion.TOKEN_KEY
import
chat.rocket.android.server.domain.MultiServerTokenRepository
import
chat.rocket.android.server.domain.MultiServerTokenRepository
import
com.squareup.moshi.Moshi
import
com.squareup.moshi.Moshi
...
@@ -28,6 +29,7 @@ class SharedPreferencesMultiServerTokenRepository(private val repository: LocalR
...
@@ -28,6 +29,7 @@ class SharedPreferencesMultiServerTokenRepository(private val repository: LocalR
repository
.
save
(
"$TOKEN_KEY$server"
,
adapter
.
toJson
(
token
))
repository
.
save
(
"$TOKEN_KEY$server"
,
adapter
.
toJson
(
token
))
}
}
}
override
fun
clear
(
server
:
String
)
{
repository
.
clear
(
"$TOKEN_KEY$server"
)
const
val
TOKEN_KEY
=
"token_"
}
\ No newline at end of file
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/authentication/presentation/AuthenticationNavigator.kt
View file @
3414b6bb
...
@@ -7,7 +7,7 @@ import chat.rocket.android.authentication.login.ui.LoginFragment
...
@@ -7,7 +7,7 @@ import chat.rocket.android.authentication.login.ui.LoginFragment
import
chat.rocket.android.authentication.signup.ui.SignupFragment
import
chat.rocket.android.authentication.signup.ui.SignupFragment
import
chat.rocket.android.authentication.twofactor.ui.TwoFAFragment
import
chat.rocket.android.authentication.twofactor.ui.TwoFAFragment
import
chat.rocket.android.authentication.ui.AuthenticationActivity
import
chat.rocket.android.authentication.ui.AuthenticationActivity
import
chat.rocket.android.
chatrooms.ui.ChatRooms
Activity
import
chat.rocket.android.
main.ui.Main
Activity
import
chat.rocket.android.util.addFragmentBackStack
import
chat.rocket.android.util.addFragmentBackStack
import
chat.rocket.android.webview.webViewIntent
import
chat.rocket.android.webview.webViewIntent
...
@@ -36,7 +36,7 @@ class AuthenticationNavigator(internal val activity: AuthenticationActivity, int
...
@@ -36,7 +36,7 @@ class AuthenticationNavigator(internal val activity: AuthenticationActivity, int
}
}
fun
toChatList
()
{
fun
toChatList
()
{
val
chatList
=
Intent
(
activity
,
ChatRooms
Activity
::
class
.
java
).
apply
{
val
chatList
=
Intent
(
activity
,
Main
Activity
::
class
.
java
).
apply
{
//TODO any parameter to pass
//TODO any parameter to pass
}
}
activity
.
startActivity
(
chatList
)
activity
.
startActivity
(
chatList
)
...
...
app/src/main/java/chat/rocket/android/authentication/twofactor/ui/TwoFAFragment.kt
View file @
3414b6bb
...
@@ -55,7 +55,7 @@ class TwoFAFragment : Fragment(), TwoFAView {
...
@@ -55,7 +55,7 @@ class TwoFAFragment : Fragment(), TwoFAView {
activity
?.
apply
{
activity
?.
apply
{
text_two_factor_auth
.
requestFocus
()
text_two_factor_auth
.
requestFocus
()
val
imm
=
getSystemService
(
Context
.
INPUT_METHOD_SERVICE
)
as
InputMethodManager
val
imm
=
getSystemService
(
Context
.
INPUT_METHOD_SERVICE
)
as
InputMethodManager
imm
.
showSoftInput
(
text_two_factor_auth
,
InputMethodManager
.
SHOW_IMPLICIT
)
imm
.
showSoftInput
(
text_two_factor_auth
,
InputMethodManager
.
RESULT_UNCHANGED_SHOWN
)
}
}
if
(
Build
.
VERSION
.
SDK_INT
<=
Build
.
VERSION_CODES
.
M
)
{
if
(
Build
.
VERSION
.
SDK_INT
<=
Build
.
VERSION_CODES
.
M
)
{
...
...
app/src/main/java/chat/rocket/android/chatroom/presentation/ChatRoomPresenter.kt
View file @
3414b6bb
...
@@ -80,7 +80,7 @@ class ChatRoomPresenter @Inject constructor(private val view: ChatRoomView,
...
@@ -80,7 +80,7 @@ class ChatRoomPresenter @Inject constructor(private val view: ChatRoomView,
ex
.
message
?.
let
{
ex
.
message
?.
let
{
view
.
showMessage
(
it
)
view
.
showMessage
(
it
)
}.
ifNull
{
}.
ifNull
{
view
.
showGenericErrorMessage
()
view
.
showGenericErrorMessage
()
}
}
view
.
enableMessageInput
()
view
.
enableMessageInput
()
...
...
app/src/main/java/chat/rocket/android/chatroom/ui/ChatRoomAdapter.kt
View file @
3414b6bb
...
@@ -123,4 +123,4 @@ class ChatRoomAdapter(private val serverUrl: String) : RecyclerView.Adapter<Chat
...
@@ -123,4 +123,4 @@ class ChatRoomAdapter(private val serverUrl: String) : RecyclerView.Adapter<Chat
imageUnknownAvatar
.
setVisible
(
true
)
imageUnknownAvatar
.
setVisible
(
true
)
}
}
}
}
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/chatrooms/di/ChatRoomsModule.kt
View file @
3414b6bb
...
@@ -2,7 +2,7 @@ package chat.rocket.android.chatrooms.di
...
@@ -2,7 +2,7 @@ package chat.rocket.android.chatrooms.di
import
android.content.Context
import
android.content.Context
import
chat.rocket.android.chatrooms.presentation.ChatRoomsNavigator
import
chat.rocket.android.chatrooms.presentation.ChatRoomsNavigator
import
chat.rocket.android.
chatrooms.ui.ChatRooms
Activity
import
chat.rocket.android.
main.ui.Main
Activity
import
chat.rocket.android.dagger.scope.PerActivity
import
chat.rocket.android.dagger.scope.PerActivity
import
dagger.Module
import
dagger.Module
import
dagger.Provides
import
dagger.Provides
...
@@ -12,5 +12,5 @@ class ChatRoomsModule {
...
@@ -12,5 +12,5 @@ class ChatRoomsModule {
@Provides
@Provides
@PerActivity
@PerActivity
fun
provide
AuthenticationNavigator
(
activity
:
ChatRooms
Activity
,
context
:
Context
)
=
ChatRoomsNavigator
(
activity
,
context
)
fun
provide
ChatRoomsNavigator
(
activity
:
Main
Activity
,
context
:
Context
)
=
ChatRoomsNavigator
(
activity
,
context
)
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/chatrooms/presentation/ChatRoomsNavigator.kt
View file @
3414b6bb
...
@@ -3,9 +3,9 @@ package chat.rocket.android.chatrooms.presentation
...
@@ -3,9 +3,9 @@ package chat.rocket.android.chatrooms.presentation
import
android.content.Context
import
android.content.Context
import
chat.rocket.android.R
import
chat.rocket.android.R
import
chat.rocket.android.chatroom.ui.chatRoomIntent
import
chat.rocket.android.chatroom.ui.chatRoomIntent
import
chat.rocket.android.
chatrooms.ui.ChatRooms
Activity
import
chat.rocket.android.
main.ui.Main
Activity
class
ChatRoomsNavigator
(
private
val
activity
:
ChatRooms
Activity
,
private
val
context
:
Context
)
{
class
ChatRoomsNavigator
(
private
val
activity
:
Main
Activity
,
private
val
context
:
Context
)
{
fun
toChatRoom
(
chatRoomId
:
String
,
chatRoomName
:
String
,
chatRoomType
:
String
,
isChatRoomReadOnly
:
Boolean
)
{
fun
toChatRoom
(
chatRoomId
:
String
,
chatRoomName
:
String
,
chatRoomType
:
String
,
isChatRoomReadOnly
:
Boolean
)
{
activity
.
startActivity
(
context
.
chatRoomIntent
(
chatRoomId
,
chatRoomName
,
chatRoomType
,
isChatRoomReadOnly
))
activity
.
startActivity
(
context
.
chatRoomIntent
(
chatRoomId
,
chatRoomName
,
chatRoomType
,
isChatRoomReadOnly
))
...
...
app/src/main/java/chat/rocket/android/chatrooms/presentation/ChatRoomsPresenter.kt
View file @
3414b6bb
package
chat.rocket.android.chatrooms.presentation
package
chat.rocket.android.chatrooms.presentation
import
chat.rocket.android.core.lifecycle.CancelStrategy
import
chat.rocket.android.core.lifecycle.CancelStrategy
import
chat.rocket.android.infrastructure.LocalRepository
import
chat.rocket.android.server.domain.GetChatRoomsInteractor
import
chat.rocket.android.server.domain.GetChatRoomsInteractor
import
chat.rocket.android.server.domain.GetCurrentServerInteractor
import
chat.rocket.android.server.domain.GetCurrentServerInteractor
import
chat.rocket.android.server.domain.SaveChatRoomsInteractor
import
chat.rocket.android.server.domain.SaveChatRoomsInteractor
import
chat.rocket.android.server.infraestructure.RocketChatClientFactory
import
chat.rocket.android.server.infraestructure.RocketChatClientFactory
import
chat.rocket.android.util.launchUI
import
chat.rocket.android.util.launchUI
import
chat.rocket.common.RocketChatException
import
chat.rocket.core.RocketChatClient
import
chat.rocket.core.RocketChatClient
import
chat.rocket.core.internal.model.Subscription
import
chat.rocket.core.internal.model.Subscription
import
chat.rocket.core.internal.realtime.*
import
chat.rocket.core.internal.realtime.*
import
chat.rocket.core.internal.rest.chatRooms
import
chat.rocket.core.internal.rest.chatRooms
import
chat.rocket.core.internal.rest.logout
import
chat.rocket.core.internal.rest.unregisterPushToken
import
chat.rocket.core.model.ChatRoom
import
chat.rocket.core.model.ChatRoom
import
chat.rocket.core.model.Room
import
chat.rocket.core.model.Room
import
kotlinx.coroutines.experimental.*
import
kotlinx.coroutines.experimental.*
...
@@ -23,6 +27,7 @@ class ChatRoomsPresenter @Inject constructor(private val view: ChatRoomsView,
...
@@ -23,6 +27,7 @@ class ChatRoomsPresenter @Inject constructor(private val view: ChatRoomsView,
private
val
serverInteractor
:
GetCurrentServerInteractor
,
private
val
serverInteractor
:
GetCurrentServerInteractor
,
private
val
getChatRoomsInteractor
:
GetChatRoomsInteractor
,
private
val
getChatRoomsInteractor
:
GetChatRoomsInteractor
,
private
val
saveChatRoomsInteractor
:
SaveChatRoomsInteractor
,
private
val
saveChatRoomsInteractor
:
SaveChatRoomsInteractor
,
private
val
localRepository
:
LocalRepository
,
factory
:
RocketChatClientFactory
)
{
factory
:
RocketChatClientFactory
)
{
private
val
client
:
RocketChatClient
=
factory
.
create
(
serverInteractor
.
get
()
!!
)
private
val
client
:
RocketChatClient
=
factory
.
create
(
serverInteractor
.
get
()
!!
)
private
val
currentServer
=
serverInteractor
.
get
()
!!
private
val
currentServer
=
serverInteractor
.
get
()
!!
...
@@ -251,4 +256,32 @@ class ChatRoomsPresenter @Inject constructor(private val view: ChatRoomsView,
...
@@ -251,4 +256,32 @@ class ChatRoomsPresenter @Inject constructor(private val view: ChatRoomsView,
client
.
removeStateChannel
(
stateChannel
)
client
.
removeStateChannel
(
stateChannel
)
client
.
disconnect
()
client
.
disconnect
()
}
}
/**
* Logout from current server.
*/
fun
logout
()
{
launchUI
(
strategy
)
{
try
{
clearTokens
()
client
.
logout
()
//TODO: Add the code to unsubscribe to all subscriptions.
client
.
disconnect
()
view
.
onLogout
()
}
catch
(
e
:
RocketChatException
)
{
Timber
.
e
(
e
)
view
.
showMessage
(
e
.
message
!!
)
}
}
}
private
suspend
fun
clearTokens
()
{
serverInteractor
.
clear
()
val
pushToken
=
localRepository
.
get
(
LocalRepository
.
KEY_PUSH_TOKEN
)
if
(
pushToken
!=
null
)
{
client
.
unregisterPushToken
(
pushToken
)
localRepository
.
clear
(
LocalRepository
.
KEY_PUSH_TOKEN
)
}
localRepository
.
clearAllFromServer
(
currentServer
)
}
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/chatrooms/presentation/ChatRoomsView.kt
View file @
3414b6bb
...
@@ -12,4 +12,14 @@ interface ChatRoomsView : LoadingView, MessageView {
...
@@ -12,4 +12,14 @@ interface ChatRoomsView : LoadingView, MessageView {
* @param dataSet The data set to show.
* @param dataSet The data set to show.
*/
*/
suspend
fun
updateChatRooms
(
newDataSet
:
List
<
ChatRoom
>)
suspend
fun
updateChatRooms
(
newDataSet
:
List
<
ChatRoom
>)
/**
* Shows no chat rooms to display.
*/
fun
showNoChatRoomsToDisplay
()
/**
* User has successfully logged out from the current server.
**/
fun
onLogout
()
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/chatrooms/ui/ChatRoomsActivity.kt
deleted
100644 → 0
View file @
fcc37452
package
chat.rocket.android.chatrooms.ui
import
android.os.Bundle
import
android.support.v4.app.Fragment
import
android.support.v7.app.AppCompatActivity
import
chat.rocket.android.R
import
chat.rocket.android.util.addFragment
import
dagger.android.AndroidInjection
import
dagger.android.AndroidInjector
import
dagger.android.DispatchingAndroidInjector
import
dagger.android.support.HasSupportFragmentInjector
import
javax.inject.Inject
class
ChatRoomsActivity
:
AppCompatActivity
(),
HasSupportFragmentInjector
{
@Inject
lateinit
var
fragmentDispatchingAndroidInjector
:
DispatchingAndroidInjector
<
Fragment
>
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
AndroidInjection
.
inject
(
this
)
super
.
onCreate
(
savedInstanceState
)
setContentView
(
R
.
layout
.
activity_chat_rooms
)
addFragment
(
"ChatRoomsFragment"
,
R
.
id
.
fragment_container
)
{
ChatRoomsFragment
.
newInstance
()
}
}
override
fun
onDestroy
()
{
super
.
onDestroy
()
}
override
fun
supportFragmentInjector
():
AndroidInjector
<
Fragment
>
{
return
fragmentDispatchingAndroidInjector
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/chatrooms/ui/ChatRoomsFragment.kt
View file @
3414b6bb
package
chat.rocket.android.chatrooms.ui
package
chat.rocket.android.chatrooms.ui
import
android.content.Intent
import
android.os.Bundle
import
android.os.Bundle
import
android.support.v4.app.Fragment
import
android.support.v4.app.Fragment
import
android.support.v7.app.AppCompatActivity
import
android.support.v7.app.AppCompatActivity
...
@@ -10,23 +11,22 @@ import android.support.v7.widget.SearchView
...
@@ -10,23 +11,22 @@ import android.support.v7.widget.SearchView
import
android.view.*
import
android.view.*
import
android.widget.Toast
import
android.widget.Toast
import
chat.rocket.android.R
import
chat.rocket.android.R
import
chat.rocket.android.authentication.ui.AuthenticationActivity
import
chat.rocket.android.chatrooms.presentation.ChatRoomsPresenter
import
chat.rocket.android.chatrooms.presentation.ChatRoomsPresenter
import
chat.rocket.android.chatrooms.presentation.ChatRoomsView
import
chat.rocket.android.chatrooms.presentation.ChatRoomsView
import
chat.rocket.android.util.inflate
import
chat.rocket.android.util.setVisible
import
chat.rocket.android.util.setVisible
import
chat.rocket.android.widget.DividerItemDecoration
import
chat.rocket.android.widget.DividerItemDecoration
import
chat.rocket.core.model.ChatRoom
import
chat.rocket.core.model.ChatRoom
import
dagger.android.support.AndroidSupportInjection
import
dagger.android.support.AndroidSupportInjection
import
kotlinx.android.synthetic.main.app_bar.*
import
kotlinx.android.synthetic.main.fragment_chat_rooms.*
import
kotlinx.android.synthetic.main.fragment_chat_rooms.*
import
kotlinx.coroutines.experimental.CommonPool
import
kotlinx.coroutines.experimental.CommonPool
import
kotlinx.coroutines.experimental.android.UI
import
kotlinx.coroutines.experimental.android.UI
import
kotlinx.coroutines.experimental.async
import
kotlinx.coroutines.experimental.async
import
kotlinx.coroutines.experimental.launch
import
kotlinx.coroutines.experimental.launch
import
timber.log.Timber
import
javax.inject.Inject
import
javax.inject.Inject
class
ChatRoomsFragment
:
Fragment
(),
ChatRoomsView
{
class
ChatRoomsFragment
:
Fragment
(),
ChatRoomsView
{
@Inject
lateinit
var
presenter
:
ChatRoomsPresenter
@Inject
lateinit
var
presenter
:
ChatRoomsPresenter
private
var
searchView
:
SearchView
?
=
null
private
var
searchView
:
SearchView
?
=
null
...
@@ -41,45 +41,27 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
...
@@ -41,45 +41,27 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
}
}
override
fun
onDestroy
()
{
override
fun
onDestroy
()
{
Timber
.
d
(
"Called on destroy..."
)
presenter
.
disconnect
()
presenter
.
disconnect
()
super
.
onDestroy
()
super
.
onDestroy
()
}
}
override
fun
onCreateView
(
inflater
:
LayoutInflater
,
container
:
ViewGroup
?,
savedInstanceState
:
Bundle
?):
View
?
=
inflater
.
inflate
(
R
.
layout
.
fragment_chat_rooms
,
container
,
false
)
override
fun
onCreateView
(
inflater
:
LayoutInflater
,
container
:
ViewGroup
?,
savedInstanceState
:
Bundle
?):
View
?
=
container
?.
inflate
(
R
.
layout
.
fragment_chat_rooms
)
override
fun
onViewCreated
(
view
:
View
,
savedInstanceState
:
Bundle
?)
{
override
fun
onViewCreated
(
view
:
View
,
savedInstanceState
:
Bundle
?)
{
super
.
onViewCreated
(
view
,
savedInstanceState
)
super
.
onViewCreated
(
view
,
savedInstanceState
)
(
activity
as
AppCompatActivity
).
apply
{
setupToolbar
()
recycler_view
.
layoutManager
=
LinearLayoutManager
(
this
,
LinearLayoutManager
.
VERTICAL
,
false
)
setupRecyclerView
()
recycler_view
.
addItemDecoration
(
DividerItemDecoration
(
this
,
144
,
32
))
recycler_view
.
itemAnimator
=
DefaultItemAnimator
()
recycler_view
.
adapter
=
ChatRoomsAdapter
(
this
)
{
chatRoom
->
presenter
.
loadChatRoom
(
chatRoom
)
}
if
(
supportActionBar
==
null
)
{
setSupportActionBar
(
toolbar
)
supportActionBar
?.
setDisplayHomeAsUpEnabled
(
false
)
supportActionBar
?.
setDisplayShowHomeEnabled
(
true
)
//TODO: should display the current server "SiteName" setting?
supportActionBar
?.
setDisplayShowTitleEnabled
(
true
)
supportActionBar
?.
title
=
"Rocket.Chat"
}
}
presenter
.
loadChatRooms
()
presenter
.
loadChatRooms
()
}
}
override
fun
onCreateOptionsMenu
(
menu
:
Menu
?,
inflater
:
MenuInflater
?
)
{
override
fun
onCreateOptionsMenu
(
menu
:
Menu
,
inflater
:
MenuInflater
)
{
inflater
?.
inflate
(
R
.
menu
.
chatrooms_menu
,
menu
)
super
.
onCreateOptionsMenu
(
menu
,
inflater
)
val
searchItem
=
menu
?.
findItem
(
R
.
id
.
action_search
)
inflater
.
inflate
(
R
.
menu
.
chatrooms
,
menu
)
val
searchItem
=
menu
.
findItem
(
R
.
id
.
action_search
)
searchView
=
searchItem
?.
actionView
as
SearchView
searchView
=
searchItem
?.
actionView
as
SearchView
searchView
?.
setOnQueryTextListener
(
object
:
SearchView
.
OnQueryTextListener
{
val
sv
=
searchView
sv
?.
setOnQueryTextListener
(
object
:
SearchView
.
OnQueryTextListener
{
override
fun
onQueryTextSubmit
(
query
:
String
?):
Boolean
{
override
fun
onQueryTextSubmit
(
query
:
String
?):
Boolean
{
return
queryChatRoomsByName
(
query
)
return
queryChatRoomsByName
(
query
)
}
}
...
@@ -90,6 +72,13 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
...
@@ -90,6 +72,13 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
})
})
}
}
override
fun
onOptionsItemSelected
(
item
:
MenuItem
?):
Boolean
{
when
(
item
?.
itemId
)
{
R
.
id
.
action_logout
->
presenter
.
logout
()
}
return
true
}
override
suspend
fun
updateChatRooms
(
newDataSet
:
List
<
ChatRoom
>)
{
override
suspend
fun
updateChatRooms
(
newDataSet
:
List
<
ChatRoom
>)
{
activity
.
apply
{
activity
.
apply
{
launch
(
UI
)
{
launch
(
UI
)
{
...
@@ -104,6 +93,8 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
...
@@ -104,6 +93,8 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
}
}
}
}
override
fun
showNoChatRoomsToDisplay
()
=
text_no_data_to_display
.
setVisible
(
true
)
override
fun
showLoading
()
=
view_loading
.
setVisible
(
true
)
override
fun
showLoading
()
=
view_loading
.
setVisible
(
true
)
override
fun
hideLoading
()
=
view_loading
.
setVisible
(
false
)
override
fun
hideLoading
()
=
view_loading
.
setVisible
(
false
)
...
@@ -112,6 +103,30 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
...
@@ -112,6 +103,30 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
override
fun
showGenericErrorMessage
()
=
showMessage
(
getString
(
R
.
string
.
msg_generic_error
))
override
fun
showGenericErrorMessage
()
=
showMessage
(
getString
(
R
.
string
.
msg_generic_error
))
override
fun
onLogout
()
{
activity
?.
apply
{
finish
()
val
intent
=
Intent
(
this
,
AuthenticationActivity
::
class
.
java
)
intent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_CLEAR_TASK
or
Intent
.
FLAG_ACTIVITY_NEW_TASK
)
startActivity
(
intent
)
}
}
private
fun
setupToolbar
()
{
(
activity
as
AppCompatActivity
).
supportActionBar
?.
title
=
getString
(
R
.
string
.
title_chats
)
}
private
fun
setupRecyclerView
()
{
activity
?.
apply
{
recycler_view
.
layoutManager
=
LinearLayoutManager
(
this
,
LinearLayoutManager
.
VERTICAL
,
false
)
recycler_view
.
addItemDecoration
(
DividerItemDecoration
(
this
,
144
,
32
))
recycler_view
.
itemAnimator
=
DefaultItemAnimator
()
recycler_view
.
adapter
=
ChatRoomsAdapter
(
this
)
{
chatRoom
->
presenter
.
loadChatRoom
(
chatRoom
)
}
}
}
private
fun
queryChatRoomsByName
(
name
:
String
?):
Boolean
{
private
fun
queryChatRoomsByName
(
name
:
String
?):
Boolean
{
presenter
.
chatRoomsByName
(
name
?:
""
)
presenter
.
chatRoomsByName
(
name
?:
""
)
return
true
return
true
...
...
app/src/main/java/chat/rocket/android/dagger/module/ActivityBuilder.kt
View file @
3414b6bb
...
@@ -10,8 +10,9 @@ import chat.rocket.android.chatroom.di.ChatRoomFragmentProvider
...
@@ -10,8 +10,9 @@ import chat.rocket.android.chatroom.di.ChatRoomFragmentProvider
import
chat.rocket.android.chatroom.ui.ChatRoomActivity
import
chat.rocket.android.chatroom.ui.ChatRoomActivity
import
chat.rocket.android.chatrooms.di.ChatRoomsFragmentProvider
import
chat.rocket.android.chatrooms.di.ChatRoomsFragmentProvider
import
chat.rocket.android.chatrooms.di.ChatRoomsModule
import
chat.rocket.android.chatrooms.di.ChatRoomsModule
import
chat.rocket.android.
chatrooms.ui.ChatRooms
Activity
import
chat.rocket.android.
main.ui.Main
Activity
import
chat.rocket.android.dagger.scope.PerActivity
import
chat.rocket.android.dagger.scope.PerActivity
import
chat.rocket.android.profile.di.ProfileFragmentProvider
import
dagger.Module
import
dagger.Module
import
dagger.android.ContributesAndroidInjector
import
dagger.android.ContributesAndroidInjector
...
@@ -28,8 +29,8 @@ abstract class ActivityBuilder {
...
@@ -28,8 +29,8 @@ abstract class ActivityBuilder {
abstract
fun
bindAuthenticationActivity
():
AuthenticationActivity
abstract
fun
bindAuthenticationActivity
():
AuthenticationActivity
@PerActivity
@PerActivity
@ContributesAndroidInjector
(
modules
=
[
ChatRoomsModule
::
class
,
ChatRoomsFragmentProvider
::
class
])
@ContributesAndroidInjector
(
modules
=
[
ChatRoomsModule
::
class
,
ChatRoomsFragmentProvider
::
class
,
ProfileFragmentProvider
::
class
])
abstract
fun
bindMainActivity
():
ChatRooms
Activity
abstract
fun
bindMainActivity
():
Main
Activity
@PerActivity
@PerActivity
@ContributesAndroidInjector
(
modules
=
[
ChatRoomFragmentProvider
::
class
])
@ContributesAndroidInjector
(
modules
=
[
ChatRoomFragmentProvider
::
class
])
...
...
app/src/main/java/chat/rocket/android/infrastructure/LocalRepository.kt
View file @
3414b6bb
...
@@ -3,10 +3,16 @@ package chat.rocket.android.infrastructure
...
@@ -3,10 +3,16 @@ package chat.rocket.android.infrastructure
interface
LocalRepository
{
interface
LocalRepository
{
companion
object
{
companion
object
{
val
KEY_PUSH_TOKEN
=
"KEY_PUSH_TOKEN"
const
val
KEY_PUSH_TOKEN
=
"KEY_PUSH_TOKEN"
const
val
TOKEN_KEY
=
"token_"
const
val
SETTINGS_KEY
=
"settings_"
}
}
fun
save
(
key
:
String
,
value
:
String
?)
fun
save
(
key
:
String
,
value
:
String
?)
fun
get
(
key
:
String
):
String
?
fun
get
(
key
:
String
):
String
?
fun
clear
(
key
:
String
)
fun
clearAllFromServer
(
server
:
String
)
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/infrastructure/SharedPrefsLocalRepository.kt
View file @
3414b6bb
...
@@ -11,4 +11,14 @@ class SharedPrefsLocalRepository(private val preferences: SharedPreferences) : L
...
@@ -11,4 +11,14 @@ class SharedPrefsLocalRepository(private val preferences: SharedPreferences) : L
override
fun
get
(
key
:
String
):
String
?
{
override
fun
get
(
key
:
String
):
String
?
{
return
preferences
.
getString
(
key
,
null
)
return
preferences
.
getString
(
key
,
null
)
}
}
override
fun
clear
(
key
:
String
)
{
preferences
.
edit
().
remove
(
key
).
apply
()
}
override
fun
clearAllFromServer
(
server
:
String
)
{
clear
(
LocalRepository
.
KEY_PUSH_TOKEN
)
clear
(
LocalRepository
.
TOKEN_KEY
+
server
)
clear
(
LocalRepository
.
SETTINGS_KEY
+
server
)
}
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/main/ui/MainActivity.kt
0 → 100644
View file @
3414b6bb
package
chat.rocket.android.main.ui
import
android.os.Bundle
import
android.support.v4.app.Fragment
import
android.support.v7.app.AppCompatActivity
import
android.view.Gravity
import
android.view.MenuItem
import
chat.rocket.android.R
import
chat.rocket.android.chatrooms.ui.ChatRoomsFragment
import
chat.rocket.android.profile.ui.ProfileFragment
import
chat.rocket.android.util.addFragment
import
dagger.android.AndroidInjection
import
dagger.android.AndroidInjector
import
dagger.android.DispatchingAndroidInjector
import
dagger.android.support.HasSupportFragmentInjector
import
kotlinx.android.synthetic.main.activity_main.*
import
kotlinx.android.synthetic.main.app_bar.*
import
javax.inject.Inject
class
MainActivity
:
AppCompatActivity
(),
HasSupportFragmentInjector
{
@Inject
lateinit
var
fragmentDispatchingAndroidInjector
:
DispatchingAndroidInjector
<
Fragment
>
private
var
isFragmentAdded
:
Boolean
=
false
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
AndroidInjection
.
inject
(
this
)
super
.
onCreate
(
savedInstanceState
)
setContentView
(
R
.
layout
.
activity_main
)
setupToolbar
()
setupNavigationView
()
}
override
fun
onResume
()
{
super
.
onResume
()
if
(!
isFragmentAdded
)
{
// Adding the first fragment.
addFragment
(
"ChatRoomsFragment"
)
isFragmentAdded
=
true
}
}
override
fun
supportFragmentInjector
():
AndroidInjector
<
Fragment
>
=
fragmentDispatchingAndroidInjector
private
fun
setupToolbar
()
{
setSupportActionBar
(
toolbar
)
toolbar
.
setNavigationIcon
(
R
.
drawable
.
ic_menu_white_24dp
)
toolbar
.
setNavigationOnClickListener
{
drawer_layout
.
openDrawer
(
Gravity
.
START
)
}
}
private
fun
setupNavigationView
()
{
view_navigation
.
setNavigationItemSelectedListener
{
menuItem
->
menuItem
.
isChecked
=
true
drawer_layout
.
closeDrawer
(
Gravity
.
START
)
onNavDrawerItemSelected
(
menuItem
)
true
}
}
private
fun
onNavDrawerItemSelected
(
menuItem
:
MenuItem
)
{
when
(
menuItem
.
itemId
)
{
R
.
id
.
action_chat_rooms
->
{
addFragment
(
"ChatRoomsFragment"
,
R
.
id
.
fragment_container
)
{
ChatRoomsFragment
.
newInstance
()
}
}
R
.
id
.
action_profile
->
{
addFragment
(
"ProfileFragment"
,
R
.
id
.
fragment_container
)
{
ProfileFragment
.
newInstance
()
}
}
}
}
private
fun
addFragment
(
tag
:
String
)
{
addFragment
(
tag
,
R
.
id
.
fragment_container
)
{
ChatRoomsFragment
.
newInstance
()
}
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/profile/di/ProfileFragmentModule.kt
0 → 100644
View file @
3414b6bb
package
chat.rocket.android.profile.di
import
android.arch.lifecycle.LifecycleOwner
import
chat.rocket.android.core.lifecycle.CancelStrategy
import
chat.rocket.android.dagger.scope.PerFragment
import
chat.rocket.android.profile.presentation.ProfileView
import
chat.rocket.android.profile.ui.ProfileFragment
import
dagger.Module
import
dagger.Provides
import
kotlinx.coroutines.experimental.Job
@Module
@PerFragment
class
ProfileFragmentModule
{
@Provides
fun
profileView
(
frag
:
ProfileFragment
):
ProfileView
{
return
frag
}
@Provides
fun
provideLifecycleOwner
(
frag
:
ProfileFragment
):
LifecycleOwner
{
return
frag
}
@Provides
fun
provideCancelStrategy
(
owner
:
LifecycleOwner
,
jobs
:
Job
):
CancelStrategy
{
return
CancelStrategy
(
owner
,
jobs
)
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/profile/di/ProfileFragmentProvider.kt
0 → 100644
View file @
3414b6bb
package
chat.rocket.android.profile.di
import
chat.rocket.android.profile.ui.ProfileFragment
import
dagger.Module
import
dagger.android.ContributesAndroidInjector
@Module
abstract
class
ProfileFragmentProvider
{
@ContributesAndroidInjector
(
modules
=
[
ProfileFragmentModule
::
class
])
abstract
fun
provideProfileFragment
():
ProfileFragment
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/profile/presentation/ProfilePresenter.kt
0 → 100644
View file @
3414b6bb
package
chat.rocket.android.profile.presentation
import
chat.rocket.android.core.lifecycle.CancelStrategy
import
chat.rocket.android.helper.UrlHelper
import
chat.rocket.android.server.domain.GetCurrentServerInteractor
import
chat.rocket.android.server.infraestructure.RocketChatClientFactory
import
chat.rocket.android.util.launchUI
import
chat.rocket.common.RocketChatException
import
chat.rocket.common.util.ifNull
import
chat.rocket.core.RocketChatClient
import
chat.rocket.core.internal.rest.me
import
chat.rocket.core.internal.rest.updateProfile
import
javax.inject.Inject
class
ProfilePresenter
@Inject
constructor
(
private
val
view
:
ProfileView
,
private
val
strategy
:
CancelStrategy
,
serverInteractor
:
GetCurrentServerInteractor
,
factory
:
RocketChatClientFactory
)
{
private
val
serverUrl
=
serverInteractor
.
get
()
!!
private
val
client
:
RocketChatClient
=
factory
.
create
(
serverUrl
)
private
lateinit
var
myselfId
:
String
fun
loadUserProfile
()
{
launchUI
(
strategy
)
{
view
.
showLoading
()
try
{
val
myself
=
client
.
me
()
myselfId
=
myself
.
id
val
avatarUrl
=
UrlHelper
.
getAvatarUrl
(
serverUrl
,
myself
.
username
!!
)
view
.
showProfile
(
avatarUrl
,
myself
.
name
!!
,
myself
.
username
!!
,
myself
.
emails
?.
get
(
0
)
?.
address
!!
)
}
catch
(
exception
:
RocketChatException
)
{
exception
.
message
?.
let
{
view
.
showMessage
(
it
)
}.
ifNull
{
view
.
showGenericErrorMessage
()
}
}
finally
{
view
.
hideLoading
()
}
}
}
fun
updateUserProfile
(
email
:
String
,
name
:
String
,
username
:
String
)
{
launchUI
(
strategy
)
{
view
.
showLoading
()
try
{
val
user
=
client
.
updateProfile
(
myselfId
,
email
,
name
,
username
)
view
.
showProfileUpdateSuccessfullyMessage
()
loadUserProfile
()
}
catch
(
exception
:
RocketChatException
)
{
exception
.
message
?.
let
{
view
.
showMessage
(
it
)
}.
ifNull
{
view
.
showGenericErrorMessage
()
}
}
finally
{
view
.
hideLoading
()
}
}
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/profile/presentation/ProfileView.kt
0 → 100644
View file @
3414b6bb
package
chat.rocket.android.profile.presentation
import
chat.rocket.android.core.behaviours.LoadingView
import
chat.rocket.android.core.behaviours.MessageView
import
chat.rocket.core.model.Myself
interface
ProfileView
:
LoadingView
,
MessageView
{
/**
* Shows the user profile.
*
* @param avatarUrl The user avatar URL.
* @param name The user display name.
* @param username The user username.
* @param email The user email.
*/
fun
showProfile
(
avatarUrl
:
String
,
name
:
String
,
username
:
String
,
email
:
String
)
/**
* Shows a profile update successfully message
*/
fun
showProfileUpdateSuccessfullyMessage
()
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/profile/ui/ProfileFragment.kt
0 → 100644
View file @
3414b6bb
package
chat.rocket.android.profile.ui
import
DrawableHelper
import
android.os.Build
import
android.os.Bundle
import
android.support.v4.app.Fragment
import
android.support.v7.view.ActionMode
import
android.view.*
import
android.widget.Toast
import
chat.rocket.android.R
import
chat.rocket.android.main.ui.MainActivity
import
chat.rocket.android.profile.presentation.ProfilePresenter
import
chat.rocket.android.profile.presentation.ProfileView
import
chat.rocket.android.util.getObservable
import
chat.rocket.android.util.inflate
import
chat.rocket.android.util.setVisible
import
chat.rocket.android.util.textContent
import
dagger.android.support.AndroidSupportInjection
import
io.reactivex.rxkotlin.Observables
import
kotlinx.android.synthetic.main.app_bar.*
import
kotlinx.android.synthetic.main.avatar_profile.*
import
kotlinx.android.synthetic.main.fragment_profile.*
import
javax.inject.Inject
class
ProfileFragment
:
Fragment
(),
ProfileView
,
ActionMode
.
Callback
{
@Inject
lateinit
var
presenter
:
ProfilePresenter
private
lateinit
var
currentName
:
String
private
lateinit
var
currentUsername
:
String
private
lateinit
var
currentEmail
:
String
private
var
actionMode
:
ActionMode
?
=
null
companion
object
{
fun
newInstance
()
=
ProfileFragment
()
}
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
AndroidSupportInjection
.
inject
(
this
)
super
.
onCreate
(
savedInstanceState
)
}
override
fun
onCreateView
(
inflater
:
LayoutInflater
,
container
:
ViewGroup
?,
savedInstanceState
:
Bundle
?):
View
?
=
container
?.
inflate
(
R
.
layout
.
fragment_profile
)
override
fun
onViewCreated
(
view
:
View
,
savedInstanceState
:
Bundle
?)
{
super
.
onViewCreated
(
view
,
savedInstanceState
)
setupToolbar
()
if
(
Build
.
VERSION
.
SDK_INT
<=
Build
.
VERSION_CODES
.
M
)
{
tintEditTextDrawableStart
()
}
presenter
.
loadUserProfile
()
}
override
fun
showProfile
(
avatarUrl
:
String
,
name
:
String
,
username
:
String
,
email
:
String
)
{
image_avatar
.
setImageURI
(
avatarUrl
)
text_name
.
textContent
=
name
text_username
.
textContent
=
username
text_email
.
textContent
=
email
currentName
=
name
currentUsername
=
username
currentEmail
=
email
profile_container
.
setVisible
(
true
)
listenToChanges
()
}
override
fun
showProfileUpdateSuccessfullyMessage
()
=
showMessage
(
getString
(
R
.
string
.
msg_profile_update_successfully
))
override
fun
showLoading
()
{
enableUserInput
(
false
)
view_loading
.
setVisible
(
true
)
}
override
fun
hideLoading
()
{
view_loading
.
setVisible
(
false
)
enableUserInput
(
true
)
}
override
fun
showMessage
(
message
:
String
)
=
Toast
.
makeText
(
activity
,
message
,
Toast
.
LENGTH_SHORT
).
show
()
override
fun
showGenericErrorMessage
()
=
showMessage
(
getString
(
R
.
string
.
msg_generic_error
))
override
fun
onCreateActionMode
(
mode
:
ActionMode
,
menu
:
Menu
):
Boolean
{
mode
.
menuInflater
.
inflate
(
R
.
menu
.
profile
,
menu
)
mode
.
title
=
getString
(
R
.
string
.
title_update_profile
)
return
true
}
override
fun
onPrepareActionMode
(
mode
:
ActionMode
,
menu
:
Menu
):
Boolean
=
false
override
fun
onActionItemClicked
(
mode
:
ActionMode
,
menuItem
:
MenuItem
):
Boolean
{
return
when
(
menuItem
.
itemId
)
{
R
.
id
.
action_profile
->
{
presenter
.
updateUserProfile
(
text_email
.
textContent
,
text_name
.
textContent
,
text_username
.
textContent
)
mode
.
finish
()
true
}
else
->
{
false
}
}
}
override
fun
onDestroyActionMode
(
mode
:
ActionMode
)
{
actionMode
=
null
}
private
fun
setupToolbar
()
{
(
activity
as
MainActivity
).
toolbar
.
title
=
getString
(
R
.
string
.
title_profile
)
}
private
fun
tintEditTextDrawableStart
()
{
(
activity
as
MainActivity
).
apply
{
val
personDrawable
=
DrawableHelper
.
getDrawableFromId
(
R
.
drawable
.
ic_person_black_24dp
,
this
)
val
atDrawable
=
DrawableHelper
.
getDrawableFromId
(
R
.
drawable
.
ic_at_black_24dp
,
this
)
val
emailDrawable
=
DrawableHelper
.
getDrawableFromId
(
R
.
drawable
.
ic_email_black_24dp
,
this
)
val
drawables
=
arrayOf
(
personDrawable
,
atDrawable
,
emailDrawable
)
DrawableHelper
.
wrapDrawables
(
drawables
)
DrawableHelper
.
tintDrawables
(
drawables
,
this
,
R
.
color
.
colorDrawableTintGrey
)
DrawableHelper
.
compoundDrawables
(
arrayOf
(
text_name
,
text_username
,
text_email
),
drawables
)
}
}
private
fun
listenToChanges
()
{
Observables
.
combineLatest
(
text_name
.
getObservable
(),
text_username
.
getObservable
(),
text_email
.
getObservable
()).
subscribe
({
t
->
if
(
t
.
first
.
toString
()
!=
currentName
||
t
.
second
.
toString
()
!=
currentUsername
||
t
.
third
.
toString
()
!=
currentEmail
)
{
startActionMode
()
}
else
{
finishActionMode
()
}
})
}
private
fun
startActionMode
()
{
if
(
actionMode
==
null
)
{
actionMode
=
(
activity
as
MainActivity
).
startSupportActionMode
(
this
)
}
}
private
fun
finishActionMode
()
=
actionMode
?.
finish
()
private
fun
enableUserInput
(
value
:
Boolean
)
{
text_name
.
isEnabled
=
value
text_username
.
isEnabled
=
value
text_email
.
isEnabled
=
value
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/push/PushManager.kt
View file @
3414b6bb
...
@@ -20,7 +20,7 @@ import android.text.Spanned
...
@@ -20,7 +20,7 @@ import android.text.Spanned
import
android.util.Log
import
android.util.Log
import
chat.rocket.android.BuildConfig
import
chat.rocket.android.BuildConfig
import
chat.rocket.android.R
import
chat.rocket.android.R
import
chat.rocket.android.
chatrooms.ui.ChatRooms
Activity
import
chat.rocket.android.
main.ui.Main
Activity
import
org.json.JSONObject
import
org.json.JSONObject
import
java.io.Serializable
import
java.io.Serializable
import
java.util.*
import
java.util.*
...
@@ -455,7 +455,7 @@ object PushManager {
...
@@ -455,7 +455,7 @@ object PushManager {
}
}
private
fun
getContentIntent
(
context
:
Context
,
notificationId
:
Int
,
pushMessage
:
PushMessage
,
grouped
:
Boolean
=
false
):
PendingIntent
{
private
fun
getContentIntent
(
context
:
Context
,
notificationId
:
Int
,
pushMessage
:
PushMessage
,
grouped
:
Boolean
=
false
):
PendingIntent
{
val
notificationIntent
=
Intent
(
context
,
ChatRooms
Activity
::
class
.
java
)
val
notificationIntent
=
Intent
(
context
,
Main
Activity
::
class
.
java
)
.
addFlags
(
Intent
.
FLAG_ACTIVITY_SINGLE_TOP
or
Intent
.
FLAG_ACTIVITY_CLEAR_TOP
)
.
addFlags
(
Intent
.
FLAG_ACTIVITY_SINGLE_TOP
or
Intent
.
FLAG_ACTIVITY_CLEAR_TOP
)
.
putExtra
(
EXTRA_NOT_ID
,
notificationId
)
.
putExtra
(
EXTRA_NOT_ID
,
notificationId
)
.
putExtra
(
EXTRA_HOSTNAME
,
pushMessage
.
host
)
.
putExtra
(
EXTRA_HOSTNAME
,
pushMessage
.
host
)
...
...
app/src/main/java/chat/rocket/android/server/domain/CurrentServerRepository.kt
View file @
3414b6bb
...
@@ -3,4 +3,5 @@ package chat.rocket.android.server.domain
...
@@ -3,4 +3,5 @@ package chat.rocket.android.server.domain
interface
CurrentServerRepository
{
interface
CurrentServerRepository
{
fun
save
(
url
:
String
)
fun
save
(
url
:
String
)
fun
get
():
String
?
fun
get
():
String
?
fun
clear
()
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/server/domain/GetCurrentServerInteractor.kt
View file @
3414b6bb
...
@@ -4,4 +4,8 @@ import javax.inject.Inject
...
@@ -4,4 +4,8 @@ import javax.inject.Inject
class
GetCurrentServerInteractor
@Inject
constructor
(
private
val
repository
:
CurrentServerRepository
)
{
class
GetCurrentServerInteractor
@Inject
constructor
(
private
val
repository
:
CurrentServerRepository
)
{
fun
get
():
String
?
=
repository
.
get
()
fun
get
():
String
?
=
repository
.
get
()
fun
clear
()
{
repository
.
clear
()
}
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/server/domain/MultiServerTokenRepository.kt
View file @
3414b6bb
...
@@ -6,4 +6,6 @@ interface MultiServerTokenRepository {
...
@@ -6,4 +6,6 @@ interface MultiServerTokenRepository {
fun
get
(
server
:
String
):
TokenModel
?
fun
get
(
server
:
String
):
TokenModel
?
fun
save
(
server
:
String
,
token
:
TokenModel
)
fun
save
(
server
:
String
,
token
:
TokenModel
)
fun
clear
(
server
:
String
)
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/server/infraestructure/SharedPreferencesSettingsRepository.kt
View file @
3414b6bb
package
chat.rocket.android.server.infraestructure
package
chat.rocket.android.server.infraestructure
import
chat.rocket.android.infrastructure.LocalRepository
import
chat.rocket.android.infrastructure.LocalRepository
import
chat.rocket.android.infrastructure.LocalRepository.Companion.SETTINGS_KEY
import
chat.rocket.android.server.domain.SettingsRepository
import
chat.rocket.android.server.domain.SettingsRepository
import
chat.rocket.core.internal.SettingsAdapter
import
chat.rocket.core.internal.SettingsAdapter
import
chat.rocket.core.model.Value
import
chat.rocket.core.model.Value
...
@@ -21,8 +22,4 @@ class SharedPreferencesSettingsRepository(private val localRespository: LocalRep
...
@@ -21,8 +22,4 @@ class SharedPreferencesSettingsRepository(private val localRespository: LocalRep
return
null
return
null
}
}
companion
object
{
private
const
val
SETTINGS_KEY
=
"settings_"
}
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/server/infraestructure/SharedPrefsCurrentServerRepository.kt
View file @
3414b6bb
...
@@ -16,4 +16,8 @@ class SharedPrefsCurrentServerRepository(private val preferences: SharedPreferen
...
@@ -16,4 +16,8 @@ class SharedPrefsCurrentServerRepository(private val preferences: SharedPreferen
companion
object
{
companion
object
{
private
const
val
CURRENT_SERVER_KEY
=
"current_server"
private
const
val
CURRENT_SERVER_KEY
=
"current_server"
}
}
override
fun
clear
()
{
preferences
.
edit
().
remove
(
CURRENT_SERVER_KEY
).
apply
()
}
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/util/ActivityExtensions.kt
View file @
3414b6bb
package
chat.rocket.android.util
package
chat.rocket.android.util
import
android.app.Activity
import
android.content.Context
import
android.support.v4.app.Fragment
import
android.support.v4.app.Fragment
import
android.support.v7.app.AppCompatActivity
import
android.support.v7.app.AppCompatActivity
import
android.view.inputmethod.InputMethodManager
import
chat.rocket.android.R
import
chat.rocket.android.R
fun
AppCompatActivity
.
addFragment
(
tag
:
String
,
layoutId
:
Int
,
newInstance
:
()
->
Fragment
)
{
fun
AppCompatActivity
.
addFragment
(
tag
:
String
,
layoutId
:
Int
,
newInstance
:
()
->
Fragment
)
{
...
@@ -18,4 +21,9 @@ fun AppCompatActivity.addFragmentBackStack(tag: String, layoutId: Int, newInstan
...
@@ -18,4 +21,9 @@ fun AppCompatActivity.addFragmentBackStack(tag: String, layoutId: Int, newInstan
.
replace
(
layoutId
,
fragment
,
tag
)
.
replace
(
layoutId
,
fragment
,
tag
)
.
addToBackStack
(
tag
)
.
addToBackStack
(
tag
)
.
commit
()
.
commit
()
}
fun
Activity
.
hideKeyboard
()
{
val
imm
=
getSystemService
(
Context
.
INPUT_METHOD_SERVICE
)
as
InputMethodManager
imm
.
hideSoftInputFromWindow
(
currentFocus
.
windowToken
,
InputMethodManager
.
RESULT_UNCHANGED_SHOWN
)
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/util/Extensions.kt
View file @
3414b6bb
...
@@ -4,7 +4,12 @@ import android.support.annotation.LayoutRes
...
@@ -4,7 +4,12 @@ import android.support.annotation.LayoutRes
import
android.view.LayoutInflater
import
android.view.LayoutInflater
import
android.view.View
import
android.view.View
import
android.view.ViewGroup
import
android.view.ViewGroup
import
android.widget.EditText
import
android.widget.TextView
import
android.widget.TextView
import
com.jakewharton.rxbinding2.widget.RxTextView
import
io.reactivex.Observable
import
io.reactivex.android.schedulers.AndroidSchedulers
import
java.util.concurrent.TimeUnit
fun
String
.
ifEmpty
(
value
:
String
):
String
{
fun
String
.
ifEmpty
(
value
:
String
):
String
{
if
(
isEmpty
())
{
if
(
isEmpty
())
{
...
@@ -35,4 +40,11 @@ var TextView.hintContent: String
...
@@ -35,4 +40,11 @@ var TextView.hintContent: String
get
()
=
hint
.
toString
()
get
()
=
hint
.
toString
()
set
(
value
)
{
set
(
value
)
{
hint
=
value
hint
=
value
}
}
\ No newline at end of file
fun
EditText
.
getObservable
():
Observable
<
CharSequence
>
{
return
RxTextView
.
textChanges
(
this
)
.
debounce
(
100
,
TimeUnit
.
MILLISECONDS
)
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribeOn
(
AndroidSchedulers
.
mainThread
())
}
\ No newline at end of file
app/src/main/res/drawable/ic_chat_bubble_black_24dp.xml
0 → 100644
View file @
3414b6bb
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M20,2H4c-1.1,0 -2,0.9 -2,2v18l4,-4h14c1.1,0 2,-0.9 2,-2V4c0,-1.1 -0.9,-2 -2,-2z"
/>
</vector>
app/src/main/res/drawable/ic_check_white_24dp.xml
0 → 100644
View file @
3414b6bb
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportHeight=
"24.0"
android:viewportWidth=
"24.0"
>
<path
android:fillColor=
"#FFFFFFFF"
android:pathData=
"M9,16.17L4.83,12l-1.42,1.41L9,19 21,7l-1.41,-1.41z"
/>
</vector>
app/src/main/res/drawable/ic_menu_white_24dp.xml
0 → 100644
View file @
3414b6bb
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
>
<path
android:fillColor=
"#FFFFFFFF"
android:pathData=
"M3,18h18v-2L3,16v2zM3,13h18v-2L3,11v2zM3,6v2h18L21,6L3,6z"
/>
</vector>
app/src/main/res/drawable/splash_screen.xml
deleted
100644 → 0
View file @
fcc37452
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item>
<color
android:color=
"@color/colorPrimary"
/>
</item>
<!--<item>
<bitmap
android:gravity="center"
android:src="@mipmap/ic_launcher"/>
</item>-->
</layer-list>
\ No newline at end of file
app/src/main/res/drawable/style_edit_text.xml
→
app/src/main/res/drawable/style_edit_text
_authentication
.xml
View file @
3414b6bb
File moved
app/src/main/res/drawable/style_edit_text_profile.xml
0 → 100644
View file @
3414b6bb
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<stroke
android:width=
"1dp"
android:color=
"@color/colorPrimary"
/>
<solid
android:color=
"@android:color/transparent"
/>
<corners
android:radius=
"2dp"
/>
</shape>
\ No newline at end of file
app/src/main/res/layout/activity_chat_rooms.xml
deleted
100644 → 0
View file @
fcc37452
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:theme=
"@style/ChatListTheme"
tools:context=
".chatrooms.ui.ChatRoomsActivity"
>
<FrameLayout
android:id=
"@+id/fragment_container"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/activity_main.xml
0 → 100644
View file @
3414b6bb
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/drawer_layout"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:theme=
"@style/AppTheme"
tools:context=
".main.ui.MainActivity"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<include
android:id=
"@+id/layout_app_bar"
layout=
"@layout/app_bar"
/>
<FrameLayout
android:id=
"@+id/fragment_container"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
</LinearLayout>
<android.support.design.widget.NavigationView
android:id=
"@+id/view_navigation"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_gravity=
"start"
app:menu=
"@menu/navigation"
/>
</android.support.v4.widget.DrawerLayout>
\ No newline at end of file
app/src/main/res/layout/avatar.xml
View file @
3414b6bb
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
android:id=
"@+id/image_avatar"
android:id=
"@+id/image_avatar"
android:layout_width=
"40dp"
android:layout_width=
"40dp"
android:layout_height=
"40dp"
android:layout_height=
"40dp"
app:roundedCornerRadius=
"
2
dp"
/>
app:roundedCornerRadius=
"
3
dp"
/>
<!-- TODO define the correct bg color for this-->
<!-- TODO define the correct bg color for this-->
<ImageView
<ImageView
...
...
app/src/main/res/layout/avatar_profile.xml
0 → 100644
View file @
3414b6bb
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:elevation=
"6dp"
>
<com.facebook.drawee.view.SimpleDraweeView
android:id=
"@+id/image_avatar"
android:layout_width=
"120dp"
android:layout_height=
"120dp"
android:layout_centerHorizontal=
"true"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:roundedCornerRadius=
"2dp"
/>
</android.support.constraint.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/fragment_authentication_log_in.xml
View file @
3414b6bb
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<EditText
<EditText
android:id=
"@+id/text_username_or_email"
android:id=
"@+id/text_username_or_email"
style=
"@style/
AuthenticationEditText
"
style=
"@style/
EditText.Authentication
"
android:layout_marginTop=
"32dp"
android:layout_marginTop=
"32dp"
android:drawableStart=
"@drawable/ic_assignment_ind_black_24dp"
android:drawableStart=
"@drawable/ic_assignment_ind_black_24dp"
android:hint=
"@string/msg_username_or_email"
android:hint=
"@string/msg_username_or_email"
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
<EditText
<EditText
android:id=
"@+id/text_password"
android:id=
"@+id/text_password"
style=
"@style/
AuthenticationEditText
"
style=
"@style/
EditText.Authentication
"
android:layout_marginTop=
"16dp"
android:layout_marginTop=
"16dp"
android:drawableStart=
"@drawable/ic_lock_black_24dp"
android:drawableStart=
"@drawable/ic_lock_black_24dp"
android:hint=
"@string/msg_password"
android:hint=
"@string/msg_password"
...
...
app/src/main/res/layout/fragment_authentication_server.xml
View file @
3414b6bb
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
<EditText
<EditText
android:id=
"@+id/text_server_url"
android:id=
"@+id/text_server_url"
style=
"@style/
AuthenticationEditText
"
style=
"@style/
EditText.Authentication
"
android:layout_below=
"@id/text_headline"
android:layout_below=
"@id/text_headline"
android:layout_marginStart=
"0dp"
android:layout_marginStart=
"0dp"
android:layout_marginTop=
"32dp"
android:layout_marginTop=
"32dp"
...
...
app/src/main/res/layout/fragment_authentication_sign_up.xml
View file @
3414b6bb
...
@@ -17,10 +17,10 @@
...
@@ -17,10 +17,10 @@
<EditText
<EditText
android:id=
"@+id/text_name"
android:id=
"@+id/text_name"
style=
"@style/
AuthenticationEditText
"
style=
"@style/
EditText.Authentication
"
android:layout_marginTop=
"32dp"
android:layout_marginTop=
"32dp"
android:drawableStart=
"@drawable/ic_person_black_24dp"
android:drawableStart=
"@drawable/ic_person_black_24dp"
android:hint=
"@string/msg_name
_and_surname
"
android:hint=
"@string/msg_name"
android:imeOptions=
"actionNext"
android:imeOptions=
"actionNext"
android:inputType=
"textCapWords"
android:inputType=
"textCapWords"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
<EditText
<EditText
android:id=
"@+id/text_username"
android:id=
"@+id/text_username"
style=
"@style/
AuthenticationEditText
"
style=
"@style/
EditText.Authentication
"
android:layout_marginTop=
"16dp"
android:layout_marginTop=
"16dp"
android:drawableStart=
"@drawable/ic_at_black_24dp"
android:drawableStart=
"@drawable/ic_at_black_24dp"
android:hint=
"@string/msg_username"
android:hint=
"@string/msg_username"
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
<EditText
<EditText
android:id=
"@+id/text_password"
android:id=
"@+id/text_password"
style=
"@style/
AuthenticationEditText
"
style=
"@style/
EditText.Authentication
"
android:layout_marginTop=
"16dp"
android:layout_marginTop=
"16dp"
android:drawableStart=
"@drawable/ic_lock_black_24dp"
android:drawableStart=
"@drawable/ic_lock_black_24dp"
android:hint=
"@string/msg_password"
android:hint=
"@string/msg_password"
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
<EditText
<EditText
android:id=
"@+id/text_email"
android:id=
"@+id/text_email"
style=
"@style/
AuthenticationEditText
"
style=
"@style/
EditText.Authentication
"
android:layout_marginTop=
"16dp"
android:layout_marginTop=
"16dp"
android:drawableStart=
"@drawable/ic_email_black_24dp"
android:drawableStart=
"@drawable/ic_email_black_24dp"
android:hint=
"@string/msg_email"
android:hint=
"@string/msg_email"
...
...
app/src/main/res/layout/fragment_authentication_two_fa.xml
View file @
3414b6bb
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
<EditText
<EditText
android:id=
"@+id/text_two_factor_auth"
android:id=
"@+id/text_two_factor_auth"
style=
"@style/
AuthenticationEditText
"
style=
"@style/
EditText.Authentication
"
android:layout_below=
"@id/text_headline"
android:layout_below=
"@id/text_headline"
android:layout_marginTop=
"32dp"
android:layout_marginTop=
"32dp"
android:drawableStart=
"@drawable/ic_vpn_key_black_24dp"
android:drawableStart=
"@drawable/ic_vpn_key_black_24dp"
...
...
app/src/main/res/layout/fragment_chat_rooms.xml
View file @
3414b6bb
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<
android.support.design.widget.Coordinator
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<
Relative
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:fitsSystemWindows=
"true"
tools:context=
".chatrooms.ui.ChatRoomsFragment"
>
tools:context=
".chatrooms.ui.ChatRoomsFragment"
>
<include
android:id=
"@+id/layout_app_bar"
layout=
"@layout/app_bar"
android:background=
"@color/black"
/>
<android.support.v7.widget.RecyclerView
<android.support.v7.widget.RecyclerView
android:id=
"@+id/recycler_view"
android:id=
"@+id/recycler_view"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
/>
android:clipToPadding=
"false"
android:gravity=
"center_horizontal"
app:layout_behavior=
"@string/appbar_scrolling_view_behavior"
/>
<com.wang.avi.AVLoadingIndicatorView
<com.wang.avi.AVLoadingIndicatorView
android:id=
"@+id/view_loading"
android:id=
"@+id/view_loading"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerInParent=
"true"
android:layout_centerInParent=
"true"
android:visibility=
"gone"
app:indicatorColor=
"@color/black"
app:indicatorColor=
"@color/black"
app:indicatorName=
"BallPulseIndicator"
app:indicatorName=
"BallPulseIndicator"
/>
<TextView
android:id=
"@+id/text_no_data_to_display"
style=
"@style/TextAppearance.AppCompat.Subhead"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerInParent=
"true"
android:text=
"@string/msg_no_data_to_display"
android:visibility=
"gone"
tools:visibility=
"visible"
/>
tools:visibility=
"visible"
/>
</android.support.design.widget.CoordinatorLayout>
</RelativeLayout>
\ No newline at end of file
\ No newline at end of file
app/src/main/res/layout/fragment_profile.xml
0 → 100644
View file @
3414b6bb
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/relative_layout"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:focusableInTouchMode=
"true"
tools:context=
".profile.ui.ProfileFragment"
>
<LinearLayout
android:id=
"@+id/profile_container"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:orientation=
"vertical"
android:visibility=
"gone"
>
<include
android:id=
"@+id/layout_avatar_profile"
layout=
"@layout/avatar_profile"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"32dp"
/>
<EditText
android:id=
"@+id/text_name"
style=
"@style/EditText.Profile"
android:layout_marginTop=
"32dp"
android:drawableStart=
"@drawable/ic_person_black_24dp"
android:hint=
"@string/msg_name"
android:inputType=
"textCapWords"
/>
<EditText
android:id=
"@+id/text_username"
style=
"@style/EditText.Profile"
android:layout_marginTop=
"16dp"
android:drawableStart=
"@drawable/ic_at_black_24dp"
android:hint=
"@string/msg_username"
android:inputType=
"text"
/>
<EditText
android:id=
"@+id/text_email"
style=
"@style/EditText.Profile"
android:layout_marginTop=
"16dp"
android:drawableStart=
"@drawable/ic_email_black_24dp"
android:hint=
"@string/msg_email"
android:inputType=
"textEmailAddress"
/>
</LinearLayout>
<com.wang.avi.AVLoadingIndicatorView
android:id=
"@+id/view_loading"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerInParent=
"true"
app:indicatorColor=
"@color/black"
app:indicatorName=
"BallPulseIndicator"
/>
</RelativeLayout>
\ No newline at end of file
app/src/main/res/menu/chatrooms
_menu
.xml
→
app/src/main/res/menu/chatrooms.xml
View file @
3414b6bb
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<menu
xmlns:android=
"http://schemas.android.com/apk/res/android"
<menu
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<item
<item
android:id=
"@+id/action_search"
android:id=
"@+id/action_search"
android:icon=
"@drawable/ic_search_white_24px"
android:icon=
"@drawable/ic_search_white_24px"
android:title=
"@string/search"
android:title=
"@string/
action_
search"
app:actionViewClass=
"android.support.v7.widget.SearchView"
app:actionViewClass=
"android.support.v7.widget.SearchView"
app:showAsAction=
"always|collapseActionView"
/>
app:showAsAction=
"ifRoom|collapseActionView"
/>
<item
android:id=
"@+id/action_logout"
android:title=
"@string/action_logout"
app:showAsAction=
"never"
/>
</menu>
</menu>
\ No newline at end of file
app/src/main/res/menu/navigation.xml
0 → 100644
View file @
3414b6bb
<?xml version="1.0" encoding="utf-8"?>
<menu
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<group
android:checkableBehavior=
"single"
>
<item
android:id=
"@+id/action_chat_rooms"
android:checked=
"true"
android:icon=
"@drawable/ic_chat_bubble_black_24dp"
android:title=
"@string/title_chats"
/>
<item
android:id=
"@+id/action_profile"
android:icon=
"@drawable/ic_person_black_24dp"
android:title=
"@string/title_profile"
/>
</group>
</menu>
\ No newline at end of file
app/src/main/res/menu/profile.xml
0 → 100644
View file @
3414b6bb
<?xml version="1.0" encoding="utf-8"?>
<menu
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:id=
"@+id/action_profile"
android:icon=
"@drawable/ic_check_white_24dp"
android:title=
"@string/action_update"
/>
</menu>
\ No newline at end of file
app/src/main/res/values-pt-rBR/strings.xml
View file @
3414b6bb
...
@@ -5,22 +5,29 @@
...
@@ -5,22 +5,29 @@
<string
name=
"title_log_in"
>
Entrar
</string>
<string
name=
"title_log_in"
>
Entrar
</string>
<string
name=
"title_sign_up"
>
Inscreva-se
</string>
<string
name=
"title_sign_up"
>
Inscreva-se
</string>
<string
name=
"title_legal_terms"
>
Termos Legais
</string>
<string
name=
"title_legal_terms"
>
Termos Legais
</string>
<string
name=
"title_chats"
>
Chats
</string>
<string
name=
"title_profile"
>
Perfil
</string>
<string
name=
"title_update_profile"
>
Editar perfil
</string>
<!-- Actions -->
<!-- Actions -->
<string
name=
"action_connect"
>
Conectar
</string>
<string
name=
"action_connect"
>
Conectar
</string>
<string
name=
"action_send"
>
Enviar
</string>
<string
name=
"action_send"
>
Enviar
</string>
<string
name=
"action_terms_of_service"
>
Termos de Serviço
</string>
<string
name=
"action_terms_of_service"
>
Termos de Serviço
</string>
<string
name=
"action_privacy_policy"
>
Política de Privacidade
</string>
<string
name=
"action_privacy_policy"
>
Política de Privacidade
</string>
<string
name=
"search"
>
Pesquisar
</string>
<string
name=
"action_search"
>
Pesquisar
</string>
<string
name=
"action_update"
>
Atualizar
</string>
<string
name=
"action_logout"
>
Sair
</string>
<!-- Regular information messages -->
<!-- Regular information messages -->
<string
name=
"msg_no_internet_connection"
>
Sem conexão à internet
</string>
<string
name=
"msg_no_internet_connection"
>
Sem conexão à internet
</string>
<string
name=
"msg_invalid_server_url"
>
URL de servidor inválida
</string>
<string
name=
"msg_invalid_server_url"
>
URL de servidor inválida
</string>
<string
name=
"msg_generic_error"
>
Desculpe, ocorreu um erro, tente novamente
</string>
<string
name=
"msg_generic_error"
>
Desculpe, ocorreu um erro, tente novamente
</string>
<string
name=
"msg_no_data_to_display"
>
Nenhum dado para exibir
</string>
<string
name=
"msg_profile_update_successfully"
>
Perfil atualizado com sucesso
</string>
<string
name=
"msg_username"
>
nome de usuário
</string>
<string
name=
"msg_username"
>
nome de usuário
</string>
<string
name=
"msg_username_or_email"
>
nome de usuário ou email
</string>
<string
name=
"msg_username_or_email"
>
nome de usuário ou email
</string>
<string
name=
"msg_password"
>
senha
</string>
<string
name=
"msg_password"
>
senha
</string>
<string
name=
"msg_name
_and_surname"
>
nome e sobre
nome
</string>
<string
name=
"msg_name
"
>
nome
</string>
<string
name=
"msg_email"
>
email
</string>
<string
name=
"msg_email"
>
email
</string>
<string
name=
"msg_or_continue_using_social_accounts"
>
Ou continue através de contas sociais
</string>
<string
name=
"msg_or_continue_using_social_accounts"
>
Ou continue através de contas sociais
</string>
<string
name=
"msg_new_user"
>
Novo usuário? %1$s
</string>
<string
name=
"msg_new_user"
>
Novo usuário? %1$s
</string>
...
...
app/src/main/res/values/strings.xml
View file @
3414b6bb
<resources>
<resources>
<string
name=
"app_name"
translatable=
"false"
>
Rocket
Chat
</string>
<string
name=
"app_name"
translatable=
"false"
>
Rocket
.
Chat
</string>
<!-- Titles -->
<!-- Titles -->
<string
name=
"title_sign_in_your_server"
>
Sign in your server
</string>
<string
name=
"title_sign_in_your_server"
>
Sign in your server
</string>
<string
name=
"title_log_in"
>
Log in
</string>
<string
name=
"title_log_in"
>
Log in
</string>
<string
name=
"title_sign_up"
>
Sign up
</string>
<string
name=
"title_sign_up"
>
Sign up
</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_profile"
>
Profile
</string>
<string
name=
"title_update_profile"
>
Update profile
</string>
<!-- Actions -->
<!-- Actions -->
<string
name=
"action_connect"
>
Connect
</string>
<string
name=
"action_connect"
>
Connect
</string>
<string
name=
"action_send"
>
Send
</string>
<string
name=
"action_send"
>
Send
</string>
<string
name=
"action_terms_of_service"
>
Terms of Service
</string>
<string
name=
"action_terms_of_service"
>
Terms of Service
</string>
<string
name=
"action_privacy_policy"
>
Privacy Policy
</string>
<string
name=
"action_privacy_policy"
>
Privacy Policy
</string>
<string
name=
"search"
>
Search
</string>
<string
name=
"action_search"
>
Search
</string>
<string
name=
"action_update"
>
Update
</string>
<string
name=
"action_logout"
>
Log Out
</string>
<!-- Regular information messages -->
<!-- Regular information messages -->
<string
name=
"msg_no_internet_connection"
>
No internet connection
</string>
<string
name=
"msg_no_internet_connection"
>
No internet connection
</string>
<string
name=
"msg_invalid_server_url"
>
Invalid server URL
</string>
<string
name=
"msg_invalid_server_url"
>
Invalid server URL
</string>
<string
name=
"msg_generic_error"
>
Sorry, an error has occurred, please try again
</string>
<string
name=
"msg_generic_error"
>
Sorry, an error has occurred, please try again
</string>
<string
name=
"msg_no_data_to_display"
>
No data to display
</string>
<string
name=
"msg_profile_update_successfully"
>
Profile update successfully
</string>
<string
name=
"msg_username"
>
username
</string>
<string
name=
"msg_username"
>
username
</string>
<string
name=
"msg_username_or_email"
>
username or email
</string>
<string
name=
"msg_username_or_email"
>
username or email
</string>
<string
name=
"msg_password"
>
password
</string>
<string
name=
"msg_password"
>
password
</string>
<string
name=
"msg_name
_and_surname"
>
name and sur
name
</string>
<string
name=
"msg_name
"
>
name
</string>
<string
name=
"msg_email"
>
email
</string>
<string
name=
"msg_email"
>
email
</string>
<string
name=
"msg_or_continue_using_social_accounts"
>
Or continue using social accounts
</string>
<string
name=
"msg_or_continue_using_social_accounts"
>
Or continue using social accounts
</string>
<string
name=
"msg_new_user"
>
New user? %1$s
</string>
<string
name=
"msg_new_user"
>
New user? %1$s
</string>
...
...
app/src/main/res/values/styles.xml
View file @
3414b6bb
...
@@ -6,11 +6,9 @@
...
@@ -6,11 +6,9 @@
<item
name=
"colorPrimary"
>
@color/colorPrimary
</item>
<item
name=
"colorPrimary"
>
@color/colorPrimary
</item>
<item
name=
"colorPrimaryDark"
>
@color/colorPrimaryDark
</item>
<item
name=
"colorPrimaryDark"
>
@color/colorPrimaryDark
</item>
<item
name=
"colorAccent"
>
@color/colorAccent
</item>
<item
name=
"colorAccent"
>
@color/colorAccent
</item>
<item
name=
"android:statusBarColor"
>
@color/colorPrimaryDark
</item>
</style>
<style
name=
"AppTheme.SplashScreen"
parent=
"AppTheme"
>
<item
name=
"android:statusBarColor"
>
@color/colorPrimaryDark
</item
>
<item
name=
"
android:windowBackground"
>
@drawable/splash_screen
</item>
<item
name=
"
windowActionModeOverlay"
>
true
</item>
</style>
</style>
<style
name=
"AuthenticationTheme"
parent=
"Theme.AppCompat.NoActionBar"
>
<style
name=
"AuthenticationTheme"
parent=
"Theme.AppCompat.NoActionBar"
>
...
@@ -18,11 +16,6 @@
...
@@ -18,11 +16,6 @@
<item
name=
"android:windowBackground"
>
@color/colorPrimary
</item>
<item
name=
"android:windowBackground"
>
@color/colorPrimary
</item>
</style>
</style>
<style
name=
"ChatListTheme"
parent=
"AppTheme"
>
<item
name=
"android:windowTranslucentStatus"
>
true
</item>
<item
name=
"colorControlHighlight"
>
@color/colorPrimary
</item>
<!-- We need this item because of this FloatingSearchView's issue: https://github.com/arimorty/floatingsearchview/issues/222 -->
</style>
<!-- Widget styles. -->
<!-- Widget styles. -->
<style
name=
"HeadlineTextView"
parent=
"TextAppearance.AppCompat.Headline"
>
<style
name=
"HeadlineTextView"
parent=
"TextAppearance.AppCompat.Headline"
>
<item
name=
"android:layout_width"
>
wrap_content
</item>
<item
name=
"android:layout_width"
>
wrap_content
</item>
...
@@ -32,7 +25,7 @@
...
@@ -32,7 +25,7 @@
<item
name=
"android:layout_marginEnd"
>
@dimen/screen_edge_left_and_right_margins
</item>
<item
name=
"android:layout_marginEnd"
>
@dimen/screen_edge_left_and_right_margins
</item>
</style>
</style>
<style
name=
"
AuthenticationEditText
"
parent=
"Widget.AppCompat.EditText"
>
<style
name=
"
EditText.Authentication
"
parent=
"Widget.AppCompat.EditText"
>
<item
name=
"android:layout_width"
>
match_parent
</item>
<item
name=
"android:layout_width"
>
match_parent
</item>
<item
name=
"android:layout_height"
>
50dp
</item>
<item
name=
"android:layout_height"
>
50dp
</item>
<item
name=
"android:layout_marginStart"
>
@dimen/screen_edge_left_and_right_margins
</item>
<item
name=
"android:layout_marginStart"
>
@dimen/screen_edge_left_and_right_margins
</item>
...
@@ -43,7 +36,11 @@
...
@@ -43,7 +36,11 @@
<item
name=
"android:drawablePadding"
>
@dimen/edit_text_drawable_padding
</item>
<item
name=
"android:drawablePadding"
>
@dimen/edit_text_drawable_padding
</item>
<item
name=
"android:drawableTint"
tools:ignore=
"NewApi"
>
@color/colorDrawableTintGrey
</item>
<item
name=
"android:drawableTint"
tools:ignore=
"NewApi"
>
@color/colorDrawableTintGrey
</item>
<item
name=
"android:fontFamily"
>
sans-serif
</item>
<item
name=
"android:fontFamily"
>
sans-serif
</item>
<item
name=
"android:background"
>
@drawable/style_edit_text
</item>
<item
name=
"android:background"
>
@drawable/style_edit_text_authentication
</item>
</style>
<style
name=
"EditText.Profile"
parent=
"EditText.Authentication"
>
<item
name=
"android:background"
>
@drawable/style_edit_text_profile
</item>
</style>
</style>
<style
name=
"AuthenticationLabel"
parent=
"TextAppearance.AppCompat.Medium"
>
<style
name=
"AuthenticationLabel"
parent=
"TextAppearance.AppCompat.Medium"
>
...
@@ -54,7 +51,7 @@
...
@@ -54,7 +51,7 @@
<item
name=
"android:maxLines"
>
1
</item>
<item
name=
"android:maxLines"
>
1
</item>
<item
name=
"android:drawablePadding"
>
@dimen/edit_text_drawable_padding
</item>
<item
name=
"android:drawablePadding"
>
@dimen/edit_text_drawable_padding
</item>
<item
name=
"android:fontFamily"
>
sans-serif
</item>
<item
name=
"android:fontFamily"
>
sans-serif
</item>
<item
name=
"android:background"
>
@drawable/style_edit_text
</item>
<item
name=
"android:background"
>
@drawable/style_edit_text
_authentication
</item>
</style>
</style>
<style
name=
"AuthenticationButton"
parent=
"Widget.AppCompat.Button"
>
<style
name=
"AuthenticationButton"
parent=
"Widget.AppCompat.Button"
>
...
...
dependencies.gradle
View file @
3414b6bb
...
@@ -15,17 +15,17 @@ ext {
...
@@ -15,17 +15,17 @@ ext {
exoPlayer
:
'2.6.0'
,
exoPlayer
:
'2.6.0'
,
playServices
:
'11.8.0'
,
playServices
:
'11.8.0'
,
room
:
'1.0.0'
,
room
:
'1.0.0'
,
rx
java
:
'2.1.4
'
,
rx
Kotlin
:
'2.2.0
'
,
rx
a
ndroid
:
'2.0.1'
,
rx
A
ndroid
:
'2.0.1'
,
moshi
:
'1.6.0-SNAPSHOT'
,
moshi
:
'1.6.0-SNAPSHOT'
,
okhttp
:
'3.9.0'
,
okhttp
:
'3.9.0'
,
timber
:
'4.5.1'
,
timber
:
'4.5.1'
,
threeTenABP
:
'1.0.5'
,
threeTenABP
:
'1.0.5'
,
rxBinding
:
'2.0.0'
,
fresco
:
'1.7.1'
,
fresco
:
'1.7.1'
,
frescoImageViewer
:
'0.5.0'
,
kotshi
:
'0.3.0'
,
kotshi
:
'0.3.0'
,
frescoImageViewer
:
'0.5.0'
,
aVLoadingIndicatorView
:
'2.1.3'
,
aVLoadingIndicatorView
:
'2.1.3'
,
textDrawable
:
'1.0.2'
,
// For testing
// For testing
junit
:
'4.12'
,
junit
:
'4.12'
,
...
@@ -57,8 +57,8 @@ ext {
...
@@ -57,8 +57,8 @@ ext {
roomProcessor
:
"android.arch.persistence.room:compiler:${versions.room}"
,
roomProcessor
:
"android.arch.persistence.room:compiler:${versions.room}"
,
roomRxjava
:
"android.arch.persistence.room:rxjava2:${versions.room}"
,
roomRxjava
:
"android.arch.persistence.room:rxjava2:${versions.room}"
,
rx
java
:
"io.reactivex.rxjava2:rxjava:${versions.rxjava
}"
,
rx
Kotlin
:
"io.reactivex.rxjava2:rxkotlin:${versions.rxKotlin
}"
,
rx
android
:
"io.reactivex.rxjava2:rxandroid:${versions.rxa
ndroid}"
,
rx
Android
:
"io.reactivex.rxjava2:rxandroid:${versions.rxA
ndroid}"
,
moshi
:
"com.squareup.moshi:moshi:${versions.moshi}"
,
moshi
:
"com.squareup.moshi:moshi:${versions.moshi}"
,
moshiKotlin
:
"com.squareup.moshi:moshi-kotlin:${versions.moshi}"
,
moshiKotlin
:
"com.squareup.moshi:moshi-kotlin:${versions.moshi}"
,
...
@@ -67,6 +67,7 @@ ext {
...
@@ -67,6 +67,7 @@ ext {
timber
:
"com.jakewharton.timber:timber:${versions.timber}"
,
timber
:
"com.jakewharton.timber:timber:${versions.timber}"
,
threeTenABP
:
"com.jakewharton.threetenabp:threetenabp:${versions.threeTenABP}"
,
threeTenABP
:
"com.jakewharton.threetenabp:threetenabp:${versions.threeTenABP}"
,
rxBinding
:
"com.jakewharton.rxbinding2:rxbinding-kotlin:${versions.rxBinding}"
,
fresco
:
"com.facebook.fresco:fresco:${versions.fresco}"
,
fresco
:
"com.facebook.fresco:fresco:${versions.fresco}"
,
frescoOkHttp
:
"com.facebook.fresco:imagepipeline-okhttp3:${versions.fresco}"
,
frescoOkHttp
:
"com.facebook.fresco:imagepipeline-okhttp3:${versions.fresco}"
,
...
@@ -74,14 +75,12 @@ ext {
...
@@ -74,14 +75,12 @@ ext {
frescoWebP
:
"com.facebook.fresco:webpsupport:${versions.fresco}"
,
frescoWebP
:
"com.facebook.fresco:webpsupport:${versions.fresco}"
,
frescoAnimatedWebP
:
"com.facebook.fresco:animated-webp:${versions.fresco}"
,
frescoAnimatedWebP
:
"com.facebook.fresco:animated-webp:${versions.fresco}"
,
frescoImageViewer
:
"com.github.stfalcon:frescoimageviewer:${versions.frescoImageViewer}"
,
kotshiApi
:
"se.ansman.kotshi:api:${versions.kotshi}"
,
kotshiApi
:
"se.ansman.kotshi:api:${versions.kotshi}"
,
kotshiCompiler
:
"se.ansman.kotshi:compiler:${versions.kotshi}"
,
kotshiCompiler
:
"se.ansman.kotshi:compiler:${versions.kotshi}"
,
aVLoadingIndicatorView
:
"com.wang.avi:library:${versions.aVLoadingIndicatorView
}"
,
frescoImageViewer
:
"com.github.stfalcon:frescoimageviewer:${versions.frescoImageViewer
}"
,
textDrawable
:
"com.github.rocketchat:textdrawable:${versions.textDrawable
}"
,
aVLoadingIndicatorView
:
"com.wang.avi:library:${versions.aVLoadingIndicatorView
}"
,
// For testing
// For testing
junit
:
"junit:junit:$versions.junit"
,
junit
:
"junit:junit:$versions.junit"
,
...
...
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