|
|
|
|
@ -55,8 +55,13 @@ class SessionFragment : PokerAnalyticsFragment(), RowRepresentableDelegate { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private fun refreshTimer() { |
|
|
|
|
currentSession.updateRowRepresentation() |
|
|
|
|
sessionAdapter.notifyItemChanged(0) |
|
|
|
|
|
|
|
|
|
this.updateSessionUI(false) |
|
|
|
|
|
|
|
|
|
// currentSession.updateRowRepresentation() |
|
|
|
|
sessionAdapter.notifyDataSetChanged() |
|
|
|
|
|
|
|
|
|
// sessionAdapter.notifyItemChanged(0) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { |
|
|
|
|
@ -181,7 +186,8 @@ class SessionFragment : PokerAnalyticsFragment(), RowRepresentableDelegate { |
|
|
|
|
|
|
|
|
|
val animationDuration = if (firstDisplay) 0L else 300L |
|
|
|
|
|
|
|
|
|
when (currentSession.getState()) { |
|
|
|
|
val state = currentSession.getState() |
|
|
|
|
when (state) { |
|
|
|
|
SessionState.PENDING, SessionState.PLANNED -> { |
|
|
|
|
sessionMenu?.findItem(R.id.restart)?.isVisible = false |
|
|
|
|
floatingActionButton.setImageResource(R.drawable.ic_outline_play) |
|
|
|
|
@ -189,6 +195,7 @@ class SessionFragment : PokerAnalyticsFragment(), RowRepresentableDelegate { |
|
|
|
|
floatingActionButton.animate().scaleX(1f).scaleY(1f).alpha(1f) |
|
|
|
|
.setDuration(animationDuration) |
|
|
|
|
.setInterpolator(OvershootInterpolator()).start() |
|
|
|
|
handler.postDelayed(refreshTimer, 60000) |
|
|
|
|
} |
|
|
|
|
SessionState.STARTED -> { |
|
|
|
|
sessionMenu?.findItem(R.id.restart)?.isVisible = true |
|
|
|
|
|