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
54918bf1
Commit
54918bf1
authored
May 28, 2018
by
Lucio Maciel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update dagger
parent
cf9c9165
Changes
25
Show whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
66 additions
and
12 deletions
+66
-12
LoginFragmentModule.kt
...et/android/authentication/login/di/LoginFragmentModule.kt
+3
-1
LoginFragmentProvider.kt
.../android/authentication/login/di/LoginFragmentProvider.kt
+2
-0
RegisterUsernameFragmentModule.kt
...ion/registerusername/di/RegisterUsernameFragmentModule.kt
+3
-1
RegisterUsernameFragmentProvider.kt
...n/registerusername/di/RegisterUsernameFragmentProvider.kt
+2
-0
ResetPasswordFragmentModule.kt
...ntication/resetpassword/di/ResetPasswordFragmentModule.kt
+3
-1
ResetPasswordFragmentProvider.kt
...ication/resetpassword/di/ResetPasswordFragmentProvider.kt
+2
-0
SignupFragmentModule.kt
.../android/authentication/signup/di/SignupFragmentModule.kt
+3
-1
SignupFragmentProvider.kt
...ndroid/authentication/signup/di/SignupFragmentProvider.kt
+2
-0
TwoFAFragmentModule.kt
...ndroid/authentication/twofactor/di/TwoFAFragmentModule.kt
+3
-1
TwoFAFragmentProvider.kt
...roid/authentication/twofactor/di/TwoFAFragmentProvider.kt
+2
-0
ChatRoomFragmentModule.kt
...chat/rocket/android/chatroom/di/ChatRoomFragmentModule.kt
+3
-1
ChatRoomFragmentProvider.kt
...at/rocket/android/chatroom/di/ChatRoomFragmentProvider.kt
+2
-0
ChatRoomModule.kt
...in/java/chat/rocket/android/chatroom/di/ChatRoomModule.kt
+1
-1
ChatRoomsFragmentProvider.kt
.../rocket/android/chatrooms/di/ChatRoomsFragmentProvider.kt
+2
-0
MembersFragmentModule.kt
...a/chat/rocket/android/members/di/MembersFragmentModule.kt
+4
-1
MembersFragmentProvider.kt
...chat/rocket/android/members/di/MembersFragmentProvider.kt
+2
-0
PinnedMessagesFragmentModule.kt
...android/pinnedmessages/di/PinnedMessagesFragmentModule.kt
+3
-1
PinnedMessagesFragmentProvider.kt
...droid/pinnedmessages/di/PinnedMessagesFragmentProvider.kt
+2
-0
ProfileFragmentModule.kt
...a/chat/rocket/android/profile/di/ProfileFragmentModule.kt
+2
-1
ProfileFragmentProvider.kt
...chat/rocket/android/profile/di/ProfileFragmentProvider.kt
+2
-0
SettingsFragmentModule.kt
...chat/rocket/android/settings/di/SettingsFragmentModule.kt
+3
-1
PasswordFragmentModule.kt
...et/android/settings/password/di/PasswordFragmentModule.kt
+3
-1
PasswordFragmentProvider.kt
.../android/settings/password/di/PasswordFragmentProvider.kt
+2
-0
String.kt
...c/main/java/chat/rocket/android/util/extensions/String.kt
+4
-0
Text.kt
...src/main/java/chat/rocket/android/util/extensions/Text.kt
+6
-0
No files found.
app/src/main/java/chat/rocket/android/authentication/login/di/LoginFragmentModule.kt
View file @
54918bf1
...
@@ -10,20 +10,22 @@ import dagger.Provides
...
@@ -10,20 +10,22 @@ import dagger.Provides
import
kotlinx.coroutines.experimental.Job
import
kotlinx.coroutines.experimental.Job
@Module
@Module
@PerFragment
class
LoginFragmentModule
{
class
LoginFragmentModule
{
@Provides
@Provides
@PerFragment
fun
loginView
(
frag
:
LoginFragment
):
LoginView
{
fun
loginView
(
frag
:
LoginFragment
):
LoginView
{
return
frag
return
frag
}
}
@Provides
@Provides
@PerFragment
fun
provideLifecycleOwner
(
frag
:
LoginFragment
):
LifecycleOwner
{
fun
provideLifecycleOwner
(
frag
:
LoginFragment
):
LifecycleOwner
{
return
frag
return
frag
}
}
@Provides
@Provides
@PerFragment
fun
provideCancelStrategy
(
owner
:
LifecycleOwner
,
jobs
:
Job
):
CancelStrategy
{
fun
provideCancelStrategy
(
owner
:
LifecycleOwner
,
jobs
:
Job
):
CancelStrategy
{
return
CancelStrategy
(
owner
,
jobs
)
return
CancelStrategy
(
owner
,
jobs
)
}
}
...
...
app/src/main/java/chat/rocket/android/authentication/login/di/LoginFragmentProvider.kt
View file @
54918bf1
package
chat.rocket.android.authentication.login.di
package
chat.rocket.android.authentication.login.di
import
chat.rocket.android.authentication.login.ui.LoginFragment
import
chat.rocket.android.authentication.login.ui.LoginFragment
import
chat.rocket.android.dagger.scope.PerFragment
import
dagger.Module
import
dagger.Module
import
dagger.android.ContributesAndroidInjector
import
dagger.android.ContributesAndroidInjector
@Module
abstract
class
LoginFragmentProvider
{
@Module
abstract
class
LoginFragmentProvider
{
@ContributesAndroidInjector
(
modules
=
[
LoginFragmentModule
::
class
])
@ContributesAndroidInjector
(
modules
=
[
LoginFragmentModule
::
class
])
@PerFragment
abstract
fun
provideLoginFragment
():
LoginFragment
abstract
fun
provideLoginFragment
():
LoginFragment
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/authentication/registerusername/di/RegisterUsernameFragmentModule.kt
View file @
54918bf1
...
@@ -10,20 +10,22 @@ import dagger.Provides
...
@@ -10,20 +10,22 @@ import dagger.Provides
import
kotlinx.coroutines.experimental.Job
import
kotlinx.coroutines.experimental.Job
@Module
@Module
@PerFragment
class
RegisterUsernameFragmentModule
{
class
RegisterUsernameFragmentModule
{
@Provides
@Provides
@PerFragment
fun
registerUsernameView
(
frag
:
RegisterUsernameFragment
):
RegisterUsernameView
{
fun
registerUsernameView
(
frag
:
RegisterUsernameFragment
):
RegisterUsernameView
{
return
frag
return
frag
}
}
@Provides
@Provides
@PerFragment
fun
provideLifecycleOwner
(
frag
:
RegisterUsernameFragment
):
LifecycleOwner
{
fun
provideLifecycleOwner
(
frag
:
RegisterUsernameFragment
):
LifecycleOwner
{
return
frag
return
frag
}
}
@Provides
@Provides
@PerFragment
fun
provideCancelStrategy
(
owner
:
LifecycleOwner
,
jobs
:
Job
):
CancelStrategy
{
fun
provideCancelStrategy
(
owner
:
LifecycleOwner
,
jobs
:
Job
):
CancelStrategy
{
return
CancelStrategy
(
owner
,
jobs
)
return
CancelStrategy
(
owner
,
jobs
)
}
}
...
...
app/src/main/java/chat/rocket/android/authentication/registerusername/di/RegisterUsernameFragmentProvider.kt
View file @
54918bf1
package
chat.rocket.android.authentication.registerusername.di
package
chat.rocket.android.authentication.registerusername.di
import
chat.rocket.android.authentication.registerusername.ui.RegisterUsernameFragment
import
chat.rocket.android.authentication.registerusername.ui.RegisterUsernameFragment
import
chat.rocket.android.dagger.scope.PerFragment
import
dagger.Module
import
dagger.Module
import
dagger.android.ContributesAndroidInjector
import
dagger.android.ContributesAndroidInjector
...
@@ -8,5 +9,6 @@ import dagger.android.ContributesAndroidInjector
...
@@ -8,5 +9,6 @@ import dagger.android.ContributesAndroidInjector
abstract
class
RegisterUsernameFragmentProvider
{
abstract
class
RegisterUsernameFragmentProvider
{
@ContributesAndroidInjector
(
modules
=
[
RegisterUsernameFragmentModule
::
class
])
@ContributesAndroidInjector
(
modules
=
[
RegisterUsernameFragmentModule
::
class
])
@PerFragment
abstract
fun
provideRegisterUsernameFragment
():
RegisterUsernameFragment
abstract
fun
provideRegisterUsernameFragment
():
RegisterUsernameFragment
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/authentication/resetpassword/di/ResetPasswordFragmentModule.kt
View file @
54918bf1
...
@@ -10,20 +10,22 @@ import dagger.Provides
...
@@ -10,20 +10,22 @@ import dagger.Provides
import
kotlinx.coroutines.experimental.Job
import
kotlinx.coroutines.experimental.Job
@Module
@Module
@PerFragment
class
ResetPasswordFragmentModule
{
class
ResetPasswordFragmentModule
{
@Provides
@Provides
@PerFragment
fun
resetPasswordView
(
frag
:
ResetPasswordFragment
):
ResetPasswordView
{
fun
resetPasswordView
(
frag
:
ResetPasswordFragment
):
ResetPasswordView
{
return
frag
return
frag
}
}
@Provides
@Provides
@PerFragment
fun
provideLifecycleOwner
(
frag
:
ResetPasswordFragment
):
LifecycleOwner
{
fun
provideLifecycleOwner
(
frag
:
ResetPasswordFragment
):
LifecycleOwner
{
return
frag
return
frag
}
}
@Provides
@Provides
@PerFragment
fun
provideCancelStrategy
(
owner
:
LifecycleOwner
,
jobs
:
Job
):
CancelStrategy
{
fun
provideCancelStrategy
(
owner
:
LifecycleOwner
,
jobs
:
Job
):
CancelStrategy
{
return
CancelStrategy
(
owner
,
jobs
)
return
CancelStrategy
(
owner
,
jobs
)
}
}
...
...
app/src/main/java/chat/rocket/android/authentication/resetpassword/di/ResetPasswordFragmentProvider.kt
View file @
54918bf1
package
chat.rocket.android.authentication.resetpassword.di
package
chat.rocket.android.authentication.resetpassword.di
import
chat.rocket.android.authentication.resetpassword.ui.ResetPasswordFragment
import
chat.rocket.android.authentication.resetpassword.ui.ResetPasswordFragment
import
chat.rocket.android.dagger.scope.PerFragment
import
dagger.Module
import
dagger.Module
import
dagger.android.ContributesAndroidInjector
import
dagger.android.ContributesAndroidInjector
...
@@ -8,5 +9,6 @@ import dagger.android.ContributesAndroidInjector
...
@@ -8,5 +9,6 @@ import dagger.android.ContributesAndroidInjector
abstract
class
ResetPasswordFragmentProvider
{
abstract
class
ResetPasswordFragmentProvider
{
@ContributesAndroidInjector
(
modules
=
[
ResetPasswordFragmentModule
::
class
])
@ContributesAndroidInjector
(
modules
=
[
ResetPasswordFragmentModule
::
class
])
@PerFragment
abstract
fun
provideResetPasswordFragment
():
ResetPasswordFragment
abstract
fun
provideResetPasswordFragment
():
ResetPasswordFragment
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/authentication/signup/di/SignupFragmentModule.kt
View file @
54918bf1
...
@@ -10,20 +10,22 @@ import dagger.Provides
...
@@ -10,20 +10,22 @@ import dagger.Provides
import
kotlinx.coroutines.experimental.Job
import
kotlinx.coroutines.experimental.Job
@Module
@Module
@PerFragment
class
SignupFragmentModule
{
class
SignupFragmentModule
{
@Provides
@Provides
@PerFragment
fun
signupView
(
frag
:
SignupFragment
):
SignupView
{
fun
signupView
(
frag
:
SignupFragment
):
SignupView
{
return
frag
return
frag
}
}
@Provides
@Provides
@PerFragment
fun
provideLifecycleOwner
(
frag
:
SignupFragment
):
LifecycleOwner
{
fun
provideLifecycleOwner
(
frag
:
SignupFragment
):
LifecycleOwner
{
return
frag
return
frag
}
}
@Provides
@Provides
@PerFragment
fun
provideCancelStrategy
(
owner
:
LifecycleOwner
,
jobs
:
Job
):
CancelStrategy
{
fun
provideCancelStrategy
(
owner
:
LifecycleOwner
,
jobs
:
Job
):
CancelStrategy
{
return
CancelStrategy
(
owner
,
jobs
)
return
CancelStrategy
(
owner
,
jobs
)
}
}
...
...
app/src/main/java/chat/rocket/android/authentication/signup/di/SignupFragmentProvider.kt
View file @
54918bf1
package
chat.rocket.android.authentication.signup.di
package
chat.rocket.android.authentication.signup.di
import
chat.rocket.android.authentication.signup.ui.SignupFragment
import
chat.rocket.android.authentication.signup.ui.SignupFragment
import
chat.rocket.android.dagger.scope.PerFragment
import
dagger.Module
import
dagger.Module
import
dagger.android.ContributesAndroidInjector
import
dagger.android.ContributesAndroidInjector
...
@@ -8,5 +9,6 @@ import dagger.android.ContributesAndroidInjector
...
@@ -8,5 +9,6 @@ import dagger.android.ContributesAndroidInjector
abstract
class
SignupFragmentProvider
{
abstract
class
SignupFragmentProvider
{
@ContributesAndroidInjector
(
modules
=
[
SignupFragmentModule
::
class
])
@ContributesAndroidInjector
(
modules
=
[
SignupFragmentModule
::
class
])
@PerFragment
abstract
fun
provideSignupFragment
():
SignupFragment
abstract
fun
provideSignupFragment
():
SignupFragment
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/authentication/twofactor/di/TwoFAFragmentModule.kt
View file @
54918bf1
...
@@ -10,20 +10,22 @@ import dagger.Provides
...
@@ -10,20 +10,22 @@ import dagger.Provides
import
kotlinx.coroutines.experimental.Job
import
kotlinx.coroutines.experimental.Job
@Module
@Module
@PerFragment
class
TwoFAFragmentModule
{
class
TwoFAFragmentModule
{
@Provides
@Provides
@PerFragment
fun
loginView
(
frag
:
TwoFAFragment
):
TwoFAView
{
fun
loginView
(
frag
:
TwoFAFragment
):
TwoFAView
{
return
frag
return
frag
}
}
@Provides
@Provides
@PerFragment
fun
provideLifecycleOwner
(
frag
:
TwoFAFragment
):
LifecycleOwner
{
fun
provideLifecycleOwner
(
frag
:
TwoFAFragment
):
LifecycleOwner
{
return
frag
return
frag
}
}
@Provides
@Provides
@PerFragment
fun
provideCancelStrategy
(
owner
:
LifecycleOwner
,
jobs
:
Job
):
CancelStrategy
{
fun
provideCancelStrategy
(
owner
:
LifecycleOwner
,
jobs
:
Job
):
CancelStrategy
{
return
CancelStrategy
(
owner
,
jobs
)
return
CancelStrategy
(
owner
,
jobs
)
}
}
...
...
app/src/main/java/chat/rocket/android/authentication/twofactor/di/TwoFAFragmentProvider.kt
View file @
54918bf1
package
chat.rocket.android.authentication.twofactor.di
package
chat.rocket.android.authentication.twofactor.di
import
chat.rocket.android.authentication.twofactor.ui.TwoFAFragment
import
chat.rocket.android.authentication.twofactor.ui.TwoFAFragment
import
chat.rocket.android.dagger.scope.PerFragment
import
dagger.Module
import
dagger.Module
import
dagger.android.ContributesAndroidInjector
import
dagger.android.ContributesAndroidInjector
@Module
abstract
class
TwoFAFragmentProvider
{
@Module
abstract
class
TwoFAFragmentProvider
{
@ContributesAndroidInjector
(
modules
=
[
TwoFAFragmentModule
::
class
])
@ContributesAndroidInjector
(
modules
=
[
TwoFAFragmentModule
::
class
])
@PerFragment
abstract
fun
provideTwoFAFragment
():
TwoFAFragment
abstract
fun
provideTwoFAFragment
():
TwoFAFragment
}
}
app/src/main/java/chat/rocket/android/chatroom/di/ChatRoomFragmentModule.kt
View file @
54918bf1
...
@@ -12,20 +12,22 @@ import dagger.Provides
...
@@ -12,20 +12,22 @@ import dagger.Provides
import
kotlinx.coroutines.experimental.Job
import
kotlinx.coroutines.experimental.Job
@Module
@Module
@PerFragment
class
ChatRoomFragmentModule
{
class
ChatRoomFragmentModule
{
@Provides
@Provides
@PerFragment
fun
chatRoomView
(
frag
:
ChatRoomFragment
):
ChatRoomView
{
fun
chatRoomView
(
frag
:
ChatRoomFragment
):
ChatRoomView
{
return
frag
return
frag
}
}
@Provides
@Provides
@PerFragment
fun
provideLifecycleOwner
(
frag
:
ChatRoomFragment
):
LifecycleOwner
{
fun
provideLifecycleOwner
(
frag
:
ChatRoomFragment
):
LifecycleOwner
{
return
frag
return
frag
}
}
@Provides
@Provides
@PerFragment
fun
provideCancelStrategy
(
owner
:
LifecycleOwner
,
jobs
:
Job
):
CancelStrategy
{
fun
provideCancelStrategy
(
owner
:
LifecycleOwner
,
jobs
:
Job
):
CancelStrategy
{
return
CancelStrategy
(
owner
,
jobs
)
return
CancelStrategy
(
owner
,
jobs
)
}
}
...
...
app/src/main/java/chat/rocket/android/chatroom/di/ChatRoomFragmentProvider.kt
View file @
54918bf1
package
chat.rocket.android.chatroom.di
package
chat.rocket.android.chatroom.di
import
chat.rocket.android.chatroom.ui.ChatRoomFragment
import
chat.rocket.android.chatroom.ui.ChatRoomFragment
import
chat.rocket.android.dagger.scope.PerFragment
import
dagger.Module
import
dagger.Module
import
dagger.android.ContributesAndroidInjector
import
dagger.android.ContributesAndroidInjector
...
@@ -8,5 +9,6 @@ import dagger.android.ContributesAndroidInjector
...
@@ -8,5 +9,6 @@ import dagger.android.ContributesAndroidInjector
abstract
class
ChatRoomFragmentProvider
{
abstract
class
ChatRoomFragmentProvider
{
@ContributesAndroidInjector
(
modules
=
[
ChatRoomFragmentModule
::
class
])
@ContributesAndroidInjector
(
modules
=
[
ChatRoomFragmentModule
::
class
])
@PerFragment
abstract
fun
provideChatRoomFragment
():
ChatRoomFragment
abstract
fun
provideChatRoomFragment
():
ChatRoomFragment
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/chatroom/di/ChatRoomModule.kt
View file @
54918bf1
...
@@ -7,8 +7,8 @@ import dagger.Module
...
@@ -7,8 +7,8 @@ import dagger.Module
import
dagger.Provides
import
dagger.Provides
@Module
@Module
@PerActivity
class
ChatRoomModule
{
class
ChatRoomModule
{
@Provides
@Provides
@PerActivity
fun
provideChatRoomNavigator
(
activity
:
ChatRoomActivity
)
=
ChatRoomNavigator
(
activity
)
fun
provideChatRoomNavigator
(
activity
:
ChatRoomActivity
)
=
ChatRoomNavigator
(
activity
)
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/chatrooms/di/ChatRoomsFragmentProvider.kt
View file @
54918bf1
package
chat.rocket.android.chatrooms.di
package
chat.rocket.android.chatrooms.di
import
chat.rocket.android.chatrooms.ui.ChatRoomsFragment
import
chat.rocket.android.chatrooms.ui.ChatRoomsFragment
import
chat.rocket.android.dagger.scope.PerFragment
import
dagger.Module
import
dagger.Module
import
dagger.android.ContributesAndroidInjector
import
dagger.android.ContributesAndroidInjector
...
@@ -8,5 +9,6 @@ import dagger.android.ContributesAndroidInjector
...
@@ -8,5 +9,6 @@ import dagger.android.ContributesAndroidInjector
abstract
class
ChatRoomsFragmentProvider
{
abstract
class
ChatRoomsFragmentProvider
{
@ContributesAndroidInjector
(
modules
=
[
ChatRoomsFragmentModule
::
class
])
@ContributesAndroidInjector
(
modules
=
[
ChatRoomsFragmentModule
::
class
])
@PerFragment
abstract
fun
provideChatRoomsFragment
():
ChatRoomsFragment
abstract
fun
provideChatRoomsFragment
():
ChatRoomsFragment
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/members/di/MembersFragmentModule.kt
View file @
54918bf1
...
@@ -12,23 +12,26 @@ import dagger.Provides
...
@@ -12,23 +12,26 @@ import dagger.Provides
import
kotlinx.coroutines.experimental.Job
import
kotlinx.coroutines.experimental.Job
@Module
@Module
@PerFragment
class
MembersFragmentModule
{
class
MembersFragmentModule
{
@Provides
@Provides
@PerFragment
fun
provideChatRoomNavigator
(
activity
:
ChatRoomActivity
)
=
MembersNavigator
(
activity
)
fun
provideChatRoomNavigator
(
activity
:
ChatRoomActivity
)
=
MembersNavigator
(
activity
)
@Provides
@Provides
@PerFragment
fun
membersView
(
frag
:
MembersFragment
):
MembersView
{
fun
membersView
(
frag
:
MembersFragment
):
MembersView
{
return
frag
return
frag
}
}
@Provides
@Provides
@PerFragment
fun
provideLifecycleOwner
(
frag
:
MembersFragment
):
LifecycleOwner
{
fun
provideLifecycleOwner
(
frag
:
MembersFragment
):
LifecycleOwner
{
return
frag
return
frag
}
}
@Provides
@Provides
@PerFragment
fun
provideCancelStrategy
(
owner
:
LifecycleOwner
,
jobs
:
Job
):
CancelStrategy
{
fun
provideCancelStrategy
(
owner
:
LifecycleOwner
,
jobs
:
Job
):
CancelStrategy
{
return
CancelStrategy
(
owner
,
jobs
)
return
CancelStrategy
(
owner
,
jobs
)
}
}
...
...
app/src/main/java/chat/rocket/android/members/di/MembersFragmentProvider.kt
View file @
54918bf1
package
chat.rocket.android.members.di
package
chat.rocket.android.members.di
import
chat.rocket.android.dagger.scope.PerFragment
import
chat.rocket.android.members.ui.MembersFragment
import
chat.rocket.android.members.ui.MembersFragment
import
dagger.Module
import
dagger.Module
import
dagger.android.ContributesAndroidInjector
import
dagger.android.ContributesAndroidInjector
...
@@ -8,5 +9,6 @@ import dagger.android.ContributesAndroidInjector
...
@@ -8,5 +9,6 @@ import dagger.android.ContributesAndroidInjector
abstract
class
MembersFragmentProvider
{
abstract
class
MembersFragmentProvider
{
@ContributesAndroidInjector
(
modules
=
[
MembersFragmentModule
::
class
])
@ContributesAndroidInjector
(
modules
=
[
MembersFragmentModule
::
class
])
@PerFragment
abstract
fun
provideMembersFragment
():
MembersFragment
abstract
fun
provideMembersFragment
():
MembersFragment
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/pinnedmessages/di/PinnedMessagesFragmentModule.kt
View file @
54918bf1
...
@@ -10,20 +10,22 @@ import dagger.Provides
...
@@ -10,20 +10,22 @@ import dagger.Provides
import
kotlinx.coroutines.experimental.Job
import
kotlinx.coroutines.experimental.Job
@Module
@Module
@PerFragment
class
PinnedMessagesFragmentModule
{
class
PinnedMessagesFragmentModule
{
@Provides
@Provides
@PerFragment
fun
provideLifecycleOwner
(
frag
:
PinnedMessagesFragment
):
LifecycleOwner
{
fun
provideLifecycleOwner
(
frag
:
PinnedMessagesFragment
):
LifecycleOwner
{
return
frag
return
frag
}
}
@Provides
@Provides
@PerFragment
fun
provideCancelStrategy
(
owner
:
LifecycleOwner
,
jobs
:
Job
):
CancelStrategy
{
fun
provideCancelStrategy
(
owner
:
LifecycleOwner
,
jobs
:
Job
):
CancelStrategy
{
return
CancelStrategy
(
owner
,
jobs
)
return
CancelStrategy
(
owner
,
jobs
)
}
}
@Provides
@Provides
@PerFragment
fun
providePinnedMessagesView
(
frag
:
PinnedMessagesFragment
):
PinnedMessagesView
{
fun
providePinnedMessagesView
(
frag
:
PinnedMessagesFragment
):
PinnedMessagesView
{
return
frag
return
frag
}
}
...
...
app/src/main/java/chat/rocket/android/pinnedmessages/di/PinnedMessagesFragmentProvider.kt
View file @
54918bf1
package
chat.rocket.android.chatroom.di
package
chat.rocket.android.chatroom.di
import
chat.rocket.android.dagger.scope.PerFragment
import
chat.rocket.android.pinnedmessages.ui.PinnedMessagesFragment
import
chat.rocket.android.pinnedmessages.ui.PinnedMessagesFragment
import
dagger.Module
import
dagger.Module
import
dagger.android.ContributesAndroidInjector
import
dagger.android.ContributesAndroidInjector
...
@@ -8,5 +9,6 @@ import dagger.android.ContributesAndroidInjector
...
@@ -8,5 +9,6 @@ import dagger.android.ContributesAndroidInjector
abstract
class
PinnedMessagesFragmentProvider
{
abstract
class
PinnedMessagesFragmentProvider
{
@ContributesAndroidInjector
(
modules
=
[
PinnedMessagesFragmentModule
::
class
])
@ContributesAndroidInjector
(
modules
=
[
PinnedMessagesFragmentModule
::
class
])
@PerFragment
abstract
fun
providePinnedMessageFragment
():
PinnedMessagesFragment
abstract
fun
providePinnedMessageFragment
():
PinnedMessagesFragment
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/profile/di/ProfileFragmentModule.kt
View file @
54918bf1
...
@@ -8,15 +8,16 @@ import dagger.Module
...
@@ -8,15 +8,16 @@ import dagger.Module
import
dagger.Provides
import
dagger.Provides
@Module
@Module
@PerFragment
class
ProfileFragmentModule
{
class
ProfileFragmentModule
{
@Provides
@Provides
@PerFragment
fun
profileView
(
frag
:
ProfileFragment
):
ProfileView
{
fun
profileView
(
frag
:
ProfileFragment
):
ProfileView
{
return
frag
return
frag
}
}
@Provides
@Provides
@PerFragment
fun
provideLifecycleOwner
(
frag
:
ProfileFragment
):
LifecycleOwner
{
fun
provideLifecycleOwner
(
frag
:
ProfileFragment
):
LifecycleOwner
{
return
frag
return
frag
}
}
...
...
app/src/main/java/chat/rocket/android/profile/di/ProfileFragmentProvider.kt
View file @
54918bf1
package
chat.rocket.android.profile.di
package
chat.rocket.android.profile.di
import
chat.rocket.android.dagger.scope.PerFragment
import
chat.rocket.android.profile.ui.ProfileFragment
import
chat.rocket.android.profile.ui.ProfileFragment
import
dagger.Module
import
dagger.Module
import
dagger.android.ContributesAndroidInjector
import
dagger.android.ContributesAndroidInjector
...
@@ -8,5 +9,6 @@ import dagger.android.ContributesAndroidInjector
...
@@ -8,5 +9,6 @@ import dagger.android.ContributesAndroidInjector
abstract
class
ProfileFragmentProvider
{
abstract
class
ProfileFragmentProvider
{
@ContributesAndroidInjector
(
modules
=
[
ProfileFragmentModule
::
class
])
@ContributesAndroidInjector
(
modules
=
[
ProfileFragmentModule
::
class
])
@PerFragment
abstract
fun
provideProfileFragment
():
ProfileFragment
abstract
fun
provideProfileFragment
():
ProfileFragment
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/settings/di/SettingsFragmentModule.kt
View file @
54918bf1
...
@@ -10,19 +10,21 @@ import dagger.Provides
...
@@ -10,19 +10,21 @@ import dagger.Provides
import
kotlinx.coroutines.experimental.Job
import
kotlinx.coroutines.experimental.Job
@Module
@Module
@PerFragment
class
SettingsFragmentModule
{
class
SettingsFragmentModule
{
@Provides
@Provides
@PerFragment
fun
settingsView
(
frag
:
SettingsFragment
):
SettingsView
{
fun
settingsView
(
frag
:
SettingsFragment
):
SettingsView
{
return
frag
return
frag
}
}
@Provides
@Provides
@PerFragment
fun
settingsLifecycleOwner
(
frag
:
SettingsFragment
):
LifecycleOwner
{
fun
settingsLifecycleOwner
(
frag
:
SettingsFragment
):
LifecycleOwner
{
return
frag
return
frag
}
}
@Provides
@Provides
@PerFragment
fun
provideCancelStrategy
(
owner
:
LifecycleOwner
,
jobs
:
Job
):
CancelStrategy
{
fun
provideCancelStrategy
(
owner
:
LifecycleOwner
,
jobs
:
Job
):
CancelStrategy
{
return
CancelStrategy
(
owner
,
jobs
)
return
CancelStrategy
(
owner
,
jobs
)
}
}
...
...
app/src/main/java/chat/rocket/android/settings/password/di/PasswordFragmentModule.kt
View file @
54918bf1
...
@@ -10,19 +10,21 @@ import dagger.Provides
...
@@ -10,19 +10,21 @@ import dagger.Provides
import
kotlinx.coroutines.experimental.Job
import
kotlinx.coroutines.experimental.Job
@Module
@Module
@PerFragment
class
PasswordFragmentModule
{
class
PasswordFragmentModule
{
@Provides
@Provides
@PerFragment
fun
passwordView
(
frag
:
PasswordFragment
):
PasswordView
{
fun
passwordView
(
frag
:
PasswordFragment
):
PasswordView
{
return
frag
return
frag
}
}
@Provides
@Provides
@PerFragment
fun
settingsLifecycleOwner
(
frag
:
PasswordFragment
):
LifecycleOwner
{
fun
settingsLifecycleOwner
(
frag
:
PasswordFragment
):
LifecycleOwner
{
return
frag
return
frag
}
}
@Provides
@Provides
@PerFragment
fun
provideCancelStrategy
(
owner
:
LifecycleOwner
,
jobs
:
Job
):
CancelStrategy
{
fun
provideCancelStrategy
(
owner
:
LifecycleOwner
,
jobs
:
Job
):
CancelStrategy
{
return
CancelStrategy
(
owner
,
jobs
)
return
CancelStrategy
(
owner
,
jobs
)
}
}
...
...
app/src/main/java/chat/rocket/android/settings/password/di/PasswordFragmentProvider.kt
View file @
54918bf1
package
chat.rocket.android.settings.password.di
package
chat.rocket.android.settings.password.di
import
chat.rocket.android.dagger.scope.PerFragment
import
chat.rocket.android.settings.password.ui.PasswordFragment
import
chat.rocket.android.settings.password.ui.PasswordFragment
import
dagger.Module
import
dagger.Module
import
dagger.android.ContributesAndroidInjector
import
dagger.android.ContributesAndroidInjector
...
@@ -7,5 +8,6 @@ import dagger.android.ContributesAndroidInjector
...
@@ -7,5 +8,6 @@ import dagger.android.ContributesAndroidInjector
@Module
@Module
abstract
class
PasswordFragmentProvider
{
abstract
class
PasswordFragmentProvider
{
@ContributesAndroidInjector
(
modules
=
[
PasswordFragmentModule
::
class
])
@ContributesAndroidInjector
(
modules
=
[
PasswordFragmentModule
::
class
])
@PerFragment
abstract
fun
providePasswordFragment
():
PasswordFragment
abstract
fun
providePasswordFragment
():
PasswordFragment
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/util/extensions/String.kt
View file @
54918bf1
...
@@ -45,3 +45,7 @@ fun String.parseColor(): Int {
...
@@ -45,3 +45,7 @@ fun String.parseColor(): Int {
Color
.
parseColor
(
"white"
)
Color
.
parseColor
(
"white"
)
}
}
}
}
fun
String
.
userId
(
userId
:
String
?):
String
?
{
return
userId
?.
let
{
this
.
replace
(
it
,
""
)
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/util/extensions/Text.kt
View file @
54918bf1
...
@@ -94,3 +94,9 @@ var TextView.content: CharSequence?
...
@@ -94,3 +94,9 @@ var TextView.content: CharSequence?
Markwon
.
scheduleDrawables
(
this
)
Markwon
.
scheduleDrawables
(
this
)
Markwon
.
scheduleTableRows
(
this
)
Markwon
.
scheduleTableRows
(
this
)
}
}
var
TextView
.
spanned
:
CharSequence
?
get
()
=
text
set
(
value
)
{
text
=
spanned
}
\ No newline at end of file
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