Filters on bets screen
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
4ce266860f
commit
4612f88c69
@ -0,0 +1,18 @@
|
||||
package fr.iut.alldev.allin.ext
|
||||
|
||||
import androidx.annotation.StringRes
|
||||
import fr.iut.alldev.allin.R
|
||||
import fr.iut.alldev.allin.data.model.bet.BetFilter
|
||||
import fr.iut.alldev.allin.data.model.bet.BetFilter.FINISHED
|
||||
import fr.iut.alldev.allin.data.model.bet.BetFilter.INVITATION
|
||||
import fr.iut.alldev.allin.data.model.bet.BetFilter.IN_PROGRESS
|
||||
import fr.iut.alldev.allin.data.model.bet.BetFilter.PUBLIC
|
||||
|
||||
@StringRes
|
||||
fun BetFilter.textId() =
|
||||
when (this) {
|
||||
PUBLIC -> R.string.Public
|
||||
INVITATION -> R.string.Invitation
|
||||
IN_PROGRESS -> R.string.Current
|
||||
FINISHED -> R.string.Finished
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package fr.iut.alldev.allin.data.model.bet
|
||||
|
||||
enum class BetFilter {
|
||||
PUBLIC,
|
||||
INVITATION,
|
||||
IN_PROGRESS,
|
||||
FINISHED
|
||||
}
|
Loading…
Reference in new issue