-
Notifications
You must be signed in to change notification settings - Fork 688
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2217 from gururani-abhishek/mvvm_architecture
Mvvm architecture
- Loading branch information
Showing
150 changed files
with
3,737 additions
and
770 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 0 additions & 11 deletions
11
app/src/main/java/org/mifos/mobile/injection/ActivityContext.kt
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
app/src/main/java/org/mifos/mobile/injection/ApplicationContext.kt
This file was deleted.
Oops, something went wrong.
94 changes: 0 additions & 94 deletions
94
app/src/main/java/org/mifos/mobile/injection/component/ActivityComponent.kt
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
app/src/main/java/org/mifos/mobile/injection/component/ApplicationComponent.kt
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
app/src/main/java/org/mifos/mobile/injection/module/ActivityModule.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
app/src/main/java/org/mifos/mobile/injection/module/RepositoryModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package org.mifos.mobile.injection.module | ||
|
||
import dagger.Module | ||
import dagger.Provides | ||
import dagger.hilt.InstallIn | ||
import dagger.hilt.components.SingletonComponent | ||
import org.mifos.mobile.repositories.NotificationRepositoryImp | ||
import org.mifos.mobile.api.DataManager | ||
import org.mifos.mobile.repositories.LoanRepository | ||
import org.mifos.mobile.repositories.LoanRepositoryImp | ||
import org.mifos.mobile.repositories.NotificationRepository | ||
import org.mifos.mobile.api.local.PreferencesHelper | ||
import org.mifos.mobile.repositories.ClientRepository | ||
import org.mifos.mobile.repositories.ClientRepositoryImp | ||
import org.mifos.mobile.repositories.RecentTransactionRepository | ||
import org.mifos.mobile.repositories.RecentTransactionRepositoryImp | ||
import org.mifos.mobile.repositories.UserAuthRepository | ||
import org.mifos.mobile.repositories.UserAuthRepositoryImp | ||
|
||
@Module | ||
@InstallIn(SingletonComponent::class) | ||
class RepositoryModule { | ||
|
||
@Provides | ||
fun providesUserAuthRepository(dataManager: DataManager): UserAuthRepository { | ||
return UserAuthRepositoryImp(dataManager) | ||
} | ||
|
||
@Provides | ||
fun providesLoanRepository(dataManager: DataManager): LoanRepository { | ||
return LoanRepositoryImp(dataManager) | ||
} | ||
|
||
@Provides | ||
fun providesNotificationRepository(dataManager: DataManager) : NotificationRepository { | ||
return NotificationRepositoryImp(dataManager) | ||
} | ||
|
||
@Provides | ||
fun providesClientRepository( | ||
dataManager: DataManager, preferencesHelper: PreferencesHelper | ||
): ClientRepository { | ||
return ClientRepositoryImp(dataManager, preferencesHelper) | ||
} | ||
|
||
@Provides | ||
fun providesRecentTransactionRepository(dataManager: DataManager): RecentTransactionRepository { | ||
return RecentTransactionRepositoryImp(dataManager) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.