Skip to content

Commit

Permalink
Merge pull request b4tchkn#13 from ShebangDog/implement-repository
Browse files Browse the repository at this point in the history
  • Loading branch information
asagi71 authored Sep 1, 2020
2 parents 97e34fa + 1e54dab commit a4cfce8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/src/main/java/jp/co/cyberagent/dojo2020/data/Repository.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ package jp.co.cyberagent.dojo2020.data
import jp.co.cyberagent.dojo2020.data.model.Memo
import kotlinx.coroutines.flow.Flow

class Repository(private val localDataSource: DataSource, private val remoteDataSource: DataSource) : DataSource {
class Repository(
private val localDataSource: DataSource,
private val remoteDataSource: DataSource
) : DataSource {

override suspend fun save(memo: Memo) {
TODO("Not yet implemented")
localDataSource.save(memo)
}

override suspend fun fetchAll(): Flow<List<Memo>> {
TODO("Not yet implemented")
return localDataSource.fetchAll()
}
}

0 comments on commit a4cfce8

Please sign in to comment.