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
638664d9
Commit
638664d9
authored
Dec 24, 2017
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code improvement.
parent
51df8f31
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
8 deletions
+7
-8
CancelStrategy.kt
...java/chat/rocket/android/core/lifecycle/CancelStrategy.kt
+1
-0
AppComponent.kt
app/src/main/java/chat/rocket/android/dagger/AppComponent.kt
+1
-1
ActivityBuilder.kt
...java/chat/rocket/android/dagger/module/ActivityBuilder.kt
+5
-7
No files found.
app/src/main/java/chat/rocket/android/core/lifecycle/CancelStrategy.kt
View file @
638664d9
...
...
@@ -8,6 +8,7 @@ import kotlinx.coroutines.experimental.Job
import
javax.inject.Inject
class
CancelStrategy
@Inject
constructor
(
owner
:
LifecycleOwner
,
val
jobs
:
Job
)
:
LifecycleObserver
{
init
{
owner
.
lifecycle
.
addObserver
(
this
)
}
...
...
app/src/main/java/chat/rocket/android/dagger/AppComponent.kt
View file @
638664d9
...
...
@@ -10,7 +10,7 @@ import dagger.android.support.AndroidSupportInjectionModule
import
javax.inject.Singleton
@Singleton
@Component
(
modules
=
arrayOf
(
AndroidSupportInjectionModule
::
class
,
AppModule
::
class
,
ActivityBuilder
::
class
)
)
@Component
(
modules
=
[
AndroidSupportInjectionModule
::
class
,
AppModule
::
class
,
ActivityBuilder
::
class
]
)
interface
AppComponent
{
@Component
.
Builder
...
...
app/src/main/java/chat/rocket/android/dagger/module/ActivityBuilder.kt
View file @
638664d9
...
...
@@ -11,19 +11,17 @@ import chat.rocket.android.dagger.scope.PerActivity
import
dagger.Module
import
dagger.android.ContributesAndroidInjector
@Module
abstract
class
ActivityBuilder
{
@Module
abstract
class
ActivityBuilder
{
@PerActivity
@ContributesAndroidInjector
(
modules
=
arrayOf
(
AuthenticationModule
::
class
,
@ContributesAndroidInjector
(
modules
=
[
AuthenticationModule
::
class
,
LoginFragmentProvider
::
class
,
ServerFragmentProvider
::
class
,
SignupFragmentProvider
::
class
,
TwoFAFragmentProvider
::
class
))
])
abstract
fun
bindAuthenticationActivity
():
AuthenticationActivity
@ContributesAndroidInjector
abstract
fun
bindMainActivity
():
MainActivity
@ContributesAndroidInjector
abstract
fun
bindMainActivity
():
MainActivity
}
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