Skip to content

Commit 4bd86be

Browse files
committed
Remove unused method
1 parent db713d9 commit 4bd86be

File tree

3 files changed

+0
-23
lines changed

3 files changed

+0
-23
lines changed

common/src/commonMain/kotlin/cz/frantisekmasa/wfrp_master/common/core/domain/character/CharacterRepository.kt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ interface CharacterRepository {
2727

2828
fun getLive(characterId: CharacterId): Flow<Either<CharacterNotFound, Character>>
2929

30-
suspend fun hasCharacterInParty(
31-
userId: String,
32-
partyId: PartyId,
33-
): Boolean
34-
3530
fun getPlayerCharactersInAllPartiesLive(userId: UserId): Flow<List<Pair<PartyId, Character>>>
3631

3732
suspend fun findByCompendiumCareer(

common/src/commonMain/kotlin/cz/frantisekmasa/wfrp_master/common/core/firebase/repositories/FirestoreCharacterRepository.kt

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,6 @@ class FirestoreCharacterRepository(
8383
}
8484
}
8585

86-
override suspend fun hasCharacterInParty(
87-
userId: String,
88-
partyId: PartyId,
89-
): Boolean {
90-
return characters(partyId)
91-
.where("userId", equalTo = userId)
92-
.get()
93-
.documents
94-
.isNotEmpty()
95-
}
96-
9786
override fun getPlayerCharactersInAllPartiesLive(userId: UserId): Flow<List<Pair<PartyId, Character>>> {
9887
return firestore.collectionGroup(Schema.CHARACTERS)
9988
.where { ("userId" equalTo userId.toString()) and ("archived" equalTo false) }

common/src/commonTest/kotlin/cz/frantisekmasa/wfrp_master/common/dummies/DummyCharacterRepository.kt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,6 @@ class DummyCharacterRepository : CharacterRepository {
4444
)
4545
}
4646

47-
override suspend fun hasCharacterInParty(
48-
userId: String,
49-
partyId: PartyId,
50-
): Boolean {
51-
return characters[partyId]?.any { it.value.userId?.toString() == userId } ?: false
52-
}
53-
5447
override fun getPlayerCharactersInAllPartiesLive(userId: UserId): Flow<List<Pair<PartyId, Character>>> {
5548
return flowOf(
5649
characters.entries

0 commit comments

Comments
 (0)