-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Going back to Result (as KMMResult is no longer needed in iOS) (#204)
Co-authored-by: Antoine Robiez <[email protected]>
- Loading branch information
Showing
23 changed files
with
37 additions
and
60 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
7 changes: 3 additions & 4 deletions
7
shared/data/src/commonMain/kotlin/fr/androidmakers/store/graphql/FlowExtensions.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 |
---|---|---|
@@ -1,12 +1,11 @@ | ||
package fr.androidmakers.store.graphql | ||
|
||
import at.asitplus.KmmResult | ||
import kotlinx.coroutines.flow.Flow | ||
import kotlinx.coroutines.flow.catch | ||
import kotlinx.coroutines.flow.map | ||
|
||
internal fun <T> Flow<T>.toResultFlow(): Flow<KmmResult<T>> = this.map { | ||
KmmResult.success(it) | ||
internal fun <T> Flow<T>.toResultFlow(): Flow<Result<T>> = this.map { | ||
Result.success(it) | ||
}.catch { | ||
emit(KmmResult.failure<T>(it)) | ||
emit(Result.failure(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
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
3 changes: 1 addition & 2 deletions
3
shared/domain/src/commonMain/kotlin/fr/androidmakers/domain/repo/PartnersRepository.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 |
---|---|---|
@@ -1,9 +1,8 @@ | ||
package fr.androidmakers.domain.repo | ||
|
||
import at.asitplus.KmmResult | ||
import fr.androidmakers.domain.model.PartnerGroup | ||
import kotlinx.coroutines.flow.Flow | ||
|
||
interface PartnersRepository { | ||
fun getPartners(): Flow<KmmResult<List<PartnerGroup>>> | ||
fun getPartners(): Flow<Result<List<PartnerGroup>>> | ||
} |
5 changes: 2 additions & 3 deletions
5
shared/domain/src/commonMain/kotlin/fr/androidmakers/domain/repo/RoomsRepository.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 |
---|---|---|
@@ -1,12 +1,11 @@ | ||
package fr.androidmakers.domain.repo | ||
|
||
import at.asitplus.KmmResult | ||
import fr.androidmakers.domain.model.Room | ||
import kotlinx.coroutines.flow.Flow | ||
|
||
interface RoomsRepository { | ||
|
||
fun getRoom(id: String): Flow<KmmResult<Room>> | ||
fun getRoom(id: String): Flow<Result<Room>> | ||
|
||
fun getRooms(): Flow<KmmResult<List<Room>>> | ||
fun getRooms(): Flow<Result<List<Room>>> | ||
} |
7 changes: 3 additions & 4 deletions
7
shared/domain/src/commonMain/kotlin/fr/androidmakers/domain/repo/SessionsRepository.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 |
---|---|---|
@@ -1,15 +1,14 @@ | ||
package fr.androidmakers.domain.repo | ||
|
||
import at.asitplus.KmmResult | ||
import fr.androidmakers.domain.model.Session | ||
import kotlinx.coroutines.flow.Flow | ||
|
||
interface SessionsRepository { | ||
fun getSession(id: String): Flow<KmmResult<Session>> | ||
fun getSession(id: String): Flow<Result<Session>> | ||
|
||
fun getSessions(): Flow<KmmResult<List<Session>>> | ||
fun getSessions(): Flow<Result<List<Session>>> | ||
|
||
fun getBookmarks(userId: String): Flow<KmmResult<Set<String>>> | ||
fun getBookmarks(userId: String): Flow<Result<Set<String>>> | ||
|
||
suspend fun setBookmark(userId: String, sessionId: String, value: Boolean) | ||
} |
5 changes: 2 additions & 3 deletions
5
shared/domain/src/commonMain/kotlin/fr/androidmakers/domain/repo/SpeakersRepository.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 |
---|---|---|
@@ -1,12 +1,11 @@ | ||
package fr.androidmakers.domain.repo | ||
|
||
import at.asitplus.KmmResult | ||
import fr.androidmakers.domain.model.Speaker | ||
import kotlinx.coroutines.flow.Flow | ||
|
||
interface SpeakersRepository { | ||
|
||
fun getSpeaker(id: String): Flow<KmmResult<Speaker>> | ||
fun getSpeaker(id: String): Flow<Result<Speaker>> | ||
|
||
fun getSpeakers(): Flow<KmmResult<List<Speaker>>> | ||
fun getSpeakers(): Flow<Result<List<Speaker>>> | ||
} |
3 changes: 1 addition & 2 deletions
3
shared/domain/src/commonMain/kotlin/fr/androidmakers/domain/repo/VenueRepository.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 |
---|---|---|
@@ -1,9 +1,8 @@ | ||
package fr.androidmakers.domain.repo | ||
|
||
import at.asitplus.KmmResult | ||
import fr.androidmakers.domain.model.Venue | ||
import kotlinx.coroutines.flow.Flow | ||
|
||
interface VenueRepository { | ||
fun getVenue(id: String): Flow<KmmResult<Venue>> | ||
fun getVenue(id: String): Flow<Result<Venue>> | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class TestClass { | ||
// TODO find a solution to remove this class | ||
// It is necessary to build the iOS Framework | ||
// Maybe by configuring src sets on iOS? | ||
} |
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
3 changes: 1 addition & 2 deletions
3
shared/ui/src/commonMain/kotlin/com/androidmakers/ui/model/Lce.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
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
4 changes: 0 additions & 4 deletions
4
shared/ui/src/iosMain/kotlin/com/androidmakers/ui/sponsors/SponsorViewController.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