merge conflict fix

feature/top10
Razmig Sarkissian 7 years ago
commit 8adfb98199
  1. 4
      app/src/main/java/net/pokeranalytics/android/model/realm/Session.kt
  2. 2
      app/src/main/java/net/pokeranalytics/android/ui/fragment/components/bottomsheet/BottomSheetTableSizeGridFragment.kt
  3. 4
      app/src/main/java/net/pokeranalytics/android/ui/view/SessionRowView.kt
  4. 1
      app/src/main/res/values/styles.xml

@ -284,11 +284,11 @@ open class Session : RealmObject(), SessionInterface, Savable,
override fun stringForRow(row: RowRepresentable): String { override fun stringForRow(row: RowRepresentable): String {
return when (row) { return when (row) {
SessionRow.BUY_IN -> buyin.toCurrency() SessionRow.BUY_IN -> buyin.toCurrency()
SessionRow.BLINDS -> if (cgSmallBlind != null && cgBigBlind != null) "$cgSmallBlind / $cgBigBlind" else "--" SessionRow.BLINDS -> getBlinds()
SessionRow.GAME -> getGameTitle() SessionRow.GAME -> getGameTitle()
SessionRow.LOCATION -> location?.name ?: "--" SessionRow.LOCATION -> location?.name ?: "--"
SessionRow.BANKROLL -> bankroll?.name ?: "--" SessionRow.BANKROLL -> bankroll?.name ?: "--"
SessionRow.TABLE_SIZE -> tableSize?.toString() ?: "--" SessionRow.TABLE_SIZE -> tableSize?.toString() ?: "--" // if (tableSize != null) TableSize(tableSize ?: 0).localizedTitle(context) else "--"
SessionRow.START_DATE -> if (timeFrame != null) timeFrame?.startDate?.shortDateTime() ?: "--" else "--" SessionRow.START_DATE -> if (timeFrame != null) timeFrame?.startDate?.shortDateTime() ?: "--" else "--"
SessionRow.END_DATE -> if (timeFrame != null) timeFrame?.endDate?.shortDateTime() ?: "--" else "--" SessionRow.END_DATE -> if (timeFrame != null) timeFrame?.endDate?.shortDateTime() ?: "--" else "--"
SessionRow.COMMENT -> if (comment.isNotEmpty()) comment else "--" SessionRow.COMMENT -> if (comment.isNotEmpty()) comment else "--"

@ -85,7 +85,7 @@ class BottomSheetTableSizeGridFragment : BottomSheetFragment(),
} }
override fun onRowSelected(position: Int, row: RowRepresentable, fromAction: Boolean) { override fun onRowSelected(position: Int, row: RowRepresentable, fromAction: Boolean) {
this.delegate.onRowValueChanged((this.rowRepresentableForPosition(position) as TableSize).numberOfPlayer, this.row) this.delegate.onRowValueChanged((row as TableSize).numberOfPlayer, this.row)
dismiss() dismiss()
} }

@ -68,7 +68,7 @@ class SessionRowView : FrameLayout {
title += session.getBlinds() title += session.getBlinds()
} }
session.game?.let { session.game?.let {
title += session.getGameTitle() title += (if (title.isNotEmpty()) " " else "") + session.getGameTitle()
} }
title += if (title.isEmpty()) "--" else "" title += if (title.isEmpty()) "--" else ""
@ -92,7 +92,7 @@ class SessionRowView : FrameLayout {
rowHistorySession.sessionInfoTableIcon.isVisible = session.tableSize != null rowHistorySession.sessionInfoTableIcon.isVisible = session.tableSize != null
rowHistorySession.sessionInfoTableValue.isVisible = session.tableSize != null rowHistorySession.sessionInfoTableValue.isVisible = session.tableSize != null
session.tableSize?.let { session.tableSize?.let {
rowHistorySession.sessionInfoTableValue.text = TableSize.all[it].localizedTitle(context) rowHistorySession.sessionInfoTableValue.text = TableSize(it).localizedTitle(context)
} }
// State // State

@ -31,6 +31,7 @@
<!-- Toolbar --> <!-- Toolbar -->
<style name="PokerAnalyticsTheme.Toolbar" parent="Widget.MaterialComponents.Toolbar"> <style name="PokerAnalyticsTheme.Toolbar" parent="Widget.MaterialComponents.Toolbar">
<item name="android:background">@color/gray_darker</item>
<item name="titleTextColor">@color/white</item> <item name="titleTextColor">@color/white</item>
<item name="titleTextAppearance">@style/PokerAnalyticsTheme.Toolbar.TitleAppearance</item> <item name="titleTextAppearance">@style/PokerAnalyticsTheme.Toolbar.TitleAppearance</item>
</style> </style>

Loading…
Cancel
Save