-
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 remote-tracking branch 'origin/mvvm_architecture' into login-ac…
…tivity-mvvm-migration # Conflicts: # app/src/main/java/org/mifos/mobile/injection/module/RepositoryModule.kt # app/src/main/java/org/mifos/mobile/repositories/ClientRepository.kt # app/src/main/java/org/mifos/mobile/repositories/ClientRepositoryImp.kt # app/src/main/java/org/mifos/mobile/repositories/UserAuthRepository.kt # app/src/main/java/org/mifos/mobile/repositories/UserAuthRepositoryImp.kt # app/src/test/java/org/mifos/mobile/repositories/ClientRepositoryImpTest.kt
- Loading branch information
Showing
20 changed files
with
735 additions
and
142 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
14 changes: 14 additions & 0 deletions
14
app/src/main/java/org/mifos/mobile/repositories/RecentTransactionRepository.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,14 @@ | ||
package org.mifos.mobile.repositories | ||
|
||
|
||
import io.reactivex.Observable | ||
import org.mifos.mobile.models.Page | ||
import org.mifos.mobile.models.Transaction | ||
|
||
interface RecentTransactionRepository { | ||
|
||
fun recentTransactions( | ||
offset: Int?, | ||
limit: Int? | ||
): Observable<Page<Transaction?>?>? | ||
} |
15 changes: 15 additions & 0 deletions
15
app/src/main/java/org/mifos/mobile/repositories/RecentTransactionRepositoryImp.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,15 @@ | ||
package org.mifos.mobile.repositories | ||
|
||
import io.reactivex.Observable | ||
import org.mifos.mobile.api.DataManager | ||
import org.mifos.mobile.models.Page | ||
import org.mifos.mobile.models.Transaction | ||
import javax.inject.Inject | ||
|
||
class RecentTransactionRepositoryImp @Inject constructor(private val dataManager: DataManager) : | ||
RecentTransactionRepository { | ||
|
||
override fun recentTransactions(offset: Int?, limit: Int?): Observable<Page<Transaction?>?>? { | ||
return limit?.let { offset?.let { it1 -> dataManager.getRecentTransactions(it1, it) } } | ||
} | ||
} |
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
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.