|
|
|
|
@ -149,7 +149,7 @@ class SessionFragment : PokerAnalyticsFragment(), RowRepresentableDelegate, Bott |
|
|
|
|
handler.removeCallbacksAndMessages(null) |
|
|
|
|
|
|
|
|
|
when (currentSession.getState()) { |
|
|
|
|
SessionState.PENDING -> { |
|
|
|
|
SessionState.PENDING, SessionState.PLANNED -> { |
|
|
|
|
state.setTextColor(ContextCompat.getColor(requireContext(), R.color.white)) |
|
|
|
|
sessionMenu?.findItem(R.id.restart)?.isVisible = false |
|
|
|
|
floatingActionButton.setImageResource(R.drawable.ic_outline_play) |
|
|
|
|
@ -194,7 +194,7 @@ class SessionFragment : PokerAnalyticsFragment(), RowRepresentableDelegate, Bott |
|
|
|
|
*/ |
|
|
|
|
private fun updateMenuUI() { |
|
|
|
|
when (currentSession.getState()) { |
|
|
|
|
SessionState.PENDING -> { |
|
|
|
|
SessionState.PENDING, SessionState.PLANNED -> { |
|
|
|
|
sessionMenu?.findItem(R.id.restart)?.isVisible = false |
|
|
|
|
sessionMenu?.findItem(R.id.stop)?.isVisible = false |
|
|
|
|
} |
|
|
|
|
@ -233,7 +233,7 @@ class SessionFragment : PokerAnalyticsFragment(), RowRepresentableDelegate, Bott |
|
|
|
|
*/ |
|
|
|
|
private fun manageSessionState() { |
|
|
|
|
when (currentSession.getState()) { |
|
|
|
|
SessionState.PENDING, SessionState.PAUSED -> { |
|
|
|
|
SessionState.PENDING, SessionState.PLANNED, SessionState.PAUSED -> { |
|
|
|
|
currentSession.startOrContinue() |
|
|
|
|
} |
|
|
|
|
SessionState.STARTED -> { |
|
|
|
|
|