|
|
|
|
@ -30,7 +30,7 @@ class HandHistoryActivity : BaseActivity() { |
|
|
|
|
ATTACHED("attached") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private var fragment: Fragment? = null |
|
|
|
|
private var currentFragment: Fragment? = null |
|
|
|
|
|
|
|
|
|
companion object { |
|
|
|
|
|
|
|
|
|
@ -97,7 +97,7 @@ class HandHistoryActivity : BaseActivity() { |
|
|
|
|
|
|
|
|
|
val fragment = HandHistoryFragment.newInstance(handHistoryId, sessionId, attached) |
|
|
|
|
showFragment(fragment, R.id.container) |
|
|
|
|
this.fragment = fragment |
|
|
|
|
this.currentFragment = fragment |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
fun showReplayer(handHistoryId: String) { |
|
|
|
|
@ -106,12 +106,12 @@ class HandHistoryActivity : BaseActivity() { |
|
|
|
|
|
|
|
|
|
val fragment = ReplayerFragment.newInstance(handHistoryId) |
|
|
|
|
showFragment(fragment, R.id.container) |
|
|
|
|
this.fragment = fragment |
|
|
|
|
this.currentFragment = fragment |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
override fun onBackPressed() { |
|
|
|
|
|
|
|
|
|
val shouldShowDataLossWarning = ((this.fragment as? HandHistoryFragment)?.isEditing == true) |
|
|
|
|
val shouldShowDataLossWarning = ((this.currentFragment as? HandHistoryFragment)?.isEditing == true) |
|
|
|
|
|
|
|
|
|
if (shouldShowDataLossWarning) { |
|
|
|
|
|
|
|
|
|
|