package com.github.ramonrabello.kiphy.trends.data

class TrendingRepository(private val remoteDataSource: TrendingDataSource) {

    fun loadTrending() = remoteDataSource.loadTrending()
}
package com.github.ramonrabello.kiphy.trends.data

import io.reactivex.Single

class TrendingRepository(
        private val localDataSource: TrendingDataSource,
        private val remoteDataSource: TrendingDataSource) {

    fun loadTrending() = Single.merge(
            remoteDataSource.loadTrending(),
            localDataSource.loadTrending())
}
Update class to use both remote and local data sources.
Update class to use both remote and local data sources.

ramonrabello/Kiphy