diff --git a/app/src/main/java/xyz/leomurca/csgomatches/data/local/MatchLocalDataSource.kt b/app/src/main/java/xyz/leomurca/csgomatches/data/local/MatchLocalDataSource.kt deleted file mode 100644 index 8b25c15..0000000 --- a/app/src/main/java/xyz/leomurca/csgomatches/data/local/MatchLocalDataSource.kt +++ /dev/null @@ -1,159 +0,0 @@ -package xyz.leomurca.csgomatches.data.local - -import xyz.leomurca.csgomatches.data.model.LeagueDto -import xyz.leomurca.csgomatches.data.model.MatchDto -import xyz.leomurca.csgomatches.data.model.OpponentDto -import xyz.leomurca.csgomatches.data.model.OpponentRecord -import xyz.leomurca.csgomatches.data.model.SerieDto -import xyz.leomurca.csgomatches.data.model.TeamDetailsDto -import xyz.leomurca.csgomatches.data.source.MatchDataSource -import xyz.leomurca.csgomatches.domain.model.Resource - -class MatchLocalDataSource : MatchDataSource { - override suspend fun upcomingMatches(page: Int): Resource> { - return Resource.Success( - data = listOf( - // Happy path - MatchDto( - beginAt = null, - opponents = listOf( - OpponentDto( - type = "team", - opponent = OpponentRecord( - id = 128519, - name = "GenOne", - imageUrl = "https://cdn.pandascore.co/images/team/image/128519/genone_csgo.png" - ) - ), - OpponentDto( - type = "team", - opponent = OpponentRecord( - id = 134996, - name = "VOLT", - imageUrl = "https://cdn.pandascore.co/images/team/image/134996/127px_volt_2024_allmode.png" - ) - ) - ), - league = LeagueDto( - id = 5078, - name = "United21", - imageUrl = "https://cdn.pandascore.co/images/league/image/5078/800px-united21_allmode-png" - ), - serie = SerieDto( - id = 9519, - fullName = "Season 35 2025" - ), - status = "not_started" - ), - // Empty Opponents - MatchDto( - beginAt = null, - opponents = emptyList(), - league = LeagueDto( - id = 5078, - name = "United21", - imageUrl = "https://cdn.pandascore.co/images/league/image/5078/800px-united21_allmode-png" - ), - serie = SerieDto( - id = 9519, - fullName = "Season 35 2025" - ), - status = "not_started" - ), - - // Only 1 opponent - MatchDto( - beginAt = null, - opponents = listOf( - OpponentDto( - type = "team", - opponent = OpponentRecord( - id = 128519, - name = "Bushido Wildcats", - imageUrl = "https://cdn.pandascore.co/images/team/image/136934/bushido_wildcatslogo_square.png" - ) - ), - ), - league = LeagueDto( - id = 5078, - name = "Gamers Club Liga Série A", - imageUrl = "https://cdn.pandascore.co/images/league/image/4554/Liga_Gamers_Club_SSrie_A_logo.png" - ), - serie = SerieDto( - id = 9519, - fullName = "July 2025" - ), - status = "not_started" - ), - // 1 opponent without logo - MatchDto( - beginAt = null, - opponents = listOf( - OpponentDto( - type = "team", - opponent = OpponentRecord( - id = 128519, - name = "NO ORG", - imageUrl = null - ) - ), - OpponentDto( - type = "team", - opponent = OpponentRecord( - id = 128519, - name = "Bushido Wildcats", - imageUrl = "https://cdn.pandascore.co/images/team/image/136934/bushido_wildcatslogo_square.png" - ) - ), - ), - league = LeagueDto( - id = 5078, - name = "Gamers Club Liga Série A", - imageUrl = "https://cdn.pandascore.co/images/league/image/4554/Liga_Gamers_Club_SSrie_A_logo.png" - ), - serie = SerieDto( - id = 9519, - fullName = "July 2025" - ), - status = "not_started" - ), - // League without logo - MatchDto( - beginAt = null, - opponents = listOf( - OpponentDto( - type = "team", - opponent = OpponentRecord( - id = 128519, - name = "Abyss team", - imageUrl = "https://cdn.pandascore.co/images/team/image/136868/146px_abyss_team_lightmode.png" - ) - ), - OpponentDto( - type = "team", - opponent = OpponentRecord( - id = 128519, - name = "Bushido Wildcats", - imageUrl = "https://cdn.pandascore.co/images/team/image/136934/bushido_wildcatslogo_square.png" - ) - ), - ), - league = LeagueDto( - id = 5078, - name = "ESEA", - imageUrl = null - ), - serie = SerieDto( - id = 9519, - fullName = "July 2025" - ), - status = "not_started" - ), - ) - ) - } - - override suspend fun teamDetails(teamId: String): Resource> { - TODO("Not yet implemented") - } -} \ No newline at end of file diff --git a/app/src/main/java/xyz/leomurca/csgomatches/di/NetworkModule.kt b/app/src/main/java/xyz/leomurca/csgomatches/di/NetworkModule.kt index d29969d..1967d23 100644 --- a/app/src/main/java/xyz/leomurca/csgomatches/di/NetworkModule.kt +++ b/app/src/main/java/xyz/leomurca/csgomatches/di/NetworkModule.kt @@ -14,7 +14,6 @@ import javax.inject.Singleton import okhttp3.MediaType.Companion.toMediaType import okhttp3.OkHttpClient import xyz.leomurca.csgomatches.BuildConfig -import xyz.leomurca.csgomatches.data.local.MatchLocalDataSource import xyz.leomurca.csgomatches.data.remote.AuthorizationInterceptor import xyz.leomurca.csgomatches.data.remote.MatchRemoteDataSourceImpl import xyz.leomurca.csgomatches.data.repository.MatchRepositoryImpl @@ -70,12 +69,7 @@ internal object NetworkModule { matchesApiService: MatchesApiService, json: Json ): MatchDataSource { - val useRemote = true - return if (useRemote) { - MatchRemoteDataSourceImpl(matchesApiService, json) - } else { - MatchLocalDataSource() - } + return MatchRemoteDataSourceImpl(matchesApiService, json) } @Provides