Text export improvement

hh
Laurent 6 years ago
parent 8b6c1d0ee2
commit 057be14508
  1. 7
      app/src/main/java/net/pokeranalytics/android/model/realm/handhistory/HandHistory.kt

@ -341,7 +341,14 @@ open class HandHistory : RealmObject(), Deletable, RowRepresentable, Identifiabl
* Returns a string representation of the [playerSetup] * Returns a string representation of the [playerSetup]
*/ */
private fun localizedPlayerSetup(playerSetup: PlayerSetup, positions: LinkedHashSet<Position>, context: Context): String { private fun localizedPlayerSetup(playerSetup: PlayerSetup, positions: LinkedHashSet<Position>, context: Context): String {
val playerItems = mutableListOf(positions.elementAt(playerSetup.position).value) val playerItems = mutableListOf(positions.elementAt(playerSetup.position).value)
val isHero = (playerSetup.position == this.heroIndex)
if (isHero) {
val heroString = context.getString(R.string.hero)
playerItems.add("- $heroString")
}
playerItems.add("[${playerSetup.cards.formatted(context)}]") playerItems.add("[${playerSetup.cards.formatted(context)}]")
playerSetup.stack?.let { stack -> playerSetup.stack?.let { stack ->
playerItems.add("- $stack") playerItems.add("- $stack")

Loading…
Cancel
Save