Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Room Park Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
Vladislav Bogdashkin
Room Park Android
Commits
e8069009
Commit
e8069009
authored
Nov 06, 2019
by
Vladislav Bogdashkin
🎣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resolve dependencies
parent
99dff8b6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
12 deletions
+10
-12
ContextModule.kt
...va/com/biganto/visual/roompark/di/dagger/ContextModule.kt
+9
-10
authUseCase.kt
...om/biganto/visual/roompark/domain/use_case/authUseCase.kt
+1
-2
No files found.
app/src/main/java/com/biganto/visual/roompark/di/dagger/ContextModule.kt
View file @
e8069009
...
...
@@ -8,8 +8,8 @@ import com.biganto.visual.roompark.data.repository.mapper.fromRaw
import
com.biganto.visual.roompark.domain.contract.AuthContract
import
com.biganto.visual.roompark.domain.model.AuthInfoModel
import
com.biganto.visual.roompark.domain.model.fromEntity
import
dagger.Binds
import
dagger.Module
import
dagger.Provides
import
io.reactivex.Completable
import
io.reactivex.Observable
import
timber.log.Timber
...
...
@@ -35,14 +35,13 @@ const val FILES_CACHE_LIMIT_SECONDS_INACTIVE = 60L
const
val
DATABASE_VERSION
=
6
@Module
class
AppModule
()
{
}
class
AppModule
class
AuthContractModule
@Inject
constructor
(
val
local
:
ILocalStore
,
val
api
:
IRoomParkApi
,
val
db
:
IDb
private
val
local
:
ILocalStore
,
private
val
api
:
IRoomParkApi
,
private
val
db
:
IDb
):
AuthContract
{
init
{
...
...
@@ -66,13 +65,13 @@ class AppModule() {
}
}
}
@Module
()
class
DataModule
()
{
@Module
abstract
class
DataModule
{
@
Provide
s
@
Bind
s
@Singleton
fun
provideAuthContract
()
:
AuthContract
=
AuthContractModule
()
abstract
fun
provideAuthContract
(
contract
:
AuthContractModule
)
:
AuthContract
/*
@Provides
...
...
app/src/main/java/com/biganto/visual/roompark/domain/use_case/authUseCase.kt
View file @
e8069009
package
com.biganto.visual.roompark.domain.use_case
import
com.biganto.visual.roompark.domain.contract.AuthContract
import
io.reactivex.Observable
import
javax.inject.Inject
/**
...
...
@@ -12,7 +11,7 @@ class AuthUseCase @Inject constructor(
private
val
authContract
:
AuthContract
){
fun
validateAuth
()
=
Observable
.
just
(
true
)
fun
validateAuth
()
=
authContract
.
validateAuthState
(
)
fun
signIn
(
login
:
String
,
pwd
:
String
)
=
authContract
.
signIn
(
login
,
pwd
)
...
...
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