Profile picture in participations
continuous-integration/drone/push Build is passing Details

pull/5/head
avalin 11 months ago
parent bcc735f713
commit 98c9351d8f

@ -155,7 +155,7 @@ class BetStatusBottomSheetBetDisplayer(
BetStatusParticipant(
username = it.username,
allCoinsAmount = it.stake,
image = getImageUrl(it.id)
image = getImageUrl(it.userId)
)
HorizontalDivider(
color = AllInTheme.colors.border,
@ -168,7 +168,7 @@ class BetStatusBottomSheetBetDisplayer(
BetStatusParticipant(
username = it.username,
allCoinsAmount = it.stake,
image = getImageUrl(it.id)
image = getImageUrl(it.userId)
)
Spacer(modifier = Modifier.height(8.dp))
}

@ -129,7 +129,7 @@ class MainViewModel @Inject constructor(
selectedBet.value?.let {
val participation = Participation(
betId = it.bet.id,
id = user.id,
userId = user.id,
username = user.username,
response = response,
stake = stake

@ -86,14 +86,14 @@ class BetDetailPreviewProvider : PreviewParameterProvider<BetDetail> {
participations = listOf(
Participation(
betId = it.id,
id = "1",
userId = "1",
username = "User1",
response = answers.first().response,
stake = 100
),
Participation(
betId = it.id,
id = "2",
userId = "2",
username = "User 2",
response = answers.last().response,
stake = 150
@ -101,14 +101,14 @@ class BetDetailPreviewProvider : PreviewParameterProvider<BetDetail> {
),
userParticipation = Participation(
betId = it.id,
id = "1",
userId = "1",
username = "User1",
response = answers.first().response,
stake = 100
),
wonParticipation = Participation(
betId = it.id,
id = "1",
userId = "1",
username = "User1",
response = answers.first().response,
stake = 100

@ -359,6 +359,7 @@ class MockAllInApi : AllInApi {
mockParticipations.add(
ResponseParticipation(
id = "",
userId = "",
betId = body.betId,
username = it.first.username,
answer = body.answer,
@ -446,6 +447,7 @@ class MockAllInApi : AllInApi {
private val mockParticipations = mutableListOf(
ResponseParticipation(
id = "",
userId = "",
betId = "UUID1",
username = mockUsers[1].first.username,
answer = NO_VALUE,
@ -453,6 +455,7 @@ class MockAllInApi : AllInApi {
),
ResponseParticipation(
id = "",
userId = "",
betId = "UUID1",
username = mockUsers[6].first.username,
answer = YES_VALUE,
@ -460,6 +463,7 @@ class MockAllInApi : AllInApi {
),
ResponseParticipation(
id = "",
userId = "",
betId = "UUID2",
username = mockUsers[0].first.username,
answer = "Answer 1",
@ -467,6 +471,7 @@ class MockAllInApi : AllInApi {
),
ResponseParticipation(
id = "",
userId = "",
betId = "UUID2",
username = mockUsers[2].first.username,
answer = "Answer 1",
@ -474,6 +479,7 @@ class MockAllInApi : AllInApi {
),
ResponseParticipation(
id = "",
userId = "",
betId = "UUID2",
username = mockUsers[6].first.username,
answer = "Answer 1",
@ -481,6 +487,7 @@ class MockAllInApi : AllInApi {
),
ResponseParticipation(
id = "",
userId = "",
betId = "UUID3",
username = mockUsers[1].first.username,
answer = "The Monarchs",

@ -9,6 +9,7 @@ import kotlinx.serialization.Serializable
data class ResponseParticipation(
val id: String,
val betId: String,
val userId: String,
val username: String,
val answer: String,
val stake: Int
@ -16,7 +17,7 @@ data class ResponseParticipation(
fun toParticipation() =
Participation(
betId = betId,
id = id,
userId = userId,
username = username,
response = answer,
stake = stake

@ -4,7 +4,7 @@ import fr.iut.alldev.allin.data.api.model.RequestParticipation
data class Participation(
val betId: String,
val id: String,
val userId: String,
val username: String,
val response: String,
val stake: Int

Loading…
Cancel
Save