|
|
|
@ -80,7 +80,7 @@ class BankrollDetailsFragment : RealmFragment(), StaticRowRepresentableDataSourc |
|
|
|
|
|
|
|
|
|
|
|
private fun updateUI(bankrollReport: BankrollReport) { |
|
|
|
private fun updateUI(bankrollReport: BankrollReport) { |
|
|
|
this.initRows(bankrollReport) |
|
|
|
this.initRows(bankrollReport) |
|
|
|
this.updateMenuUI(bankrollReport) |
|
|
|
this.updateMenuUI() |
|
|
|
this.bankrollAdapter.notifyDataSetChanged() |
|
|
|
this.bankrollAdapter.notifyDataSetChanged() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -156,6 +156,7 @@ class BankrollDetailsFragment : RealmFragment(), StaticRowRepresentableDataSourc |
|
|
|
private fun initUI() { |
|
|
|
private fun initUI() { |
|
|
|
|
|
|
|
|
|
|
|
setDisplayHomeAsUpEnabled(true) |
|
|
|
setDisplayHomeAsUpEnabled(true) |
|
|
|
|
|
|
|
this.updateMenuUI() |
|
|
|
|
|
|
|
|
|
|
|
bankrollAdapter = RowRepresentableAdapter(this, this) |
|
|
|
bankrollAdapter = RowRepresentableAdapter(this, this) |
|
|
|
|
|
|
|
|
|
|
|
@ -171,9 +172,9 @@ class BankrollDetailsFragment : RealmFragment(), StaticRowRepresentableDataSourc |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Update menu UI |
|
|
|
* Update menu UI |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private fun updateMenuUI(bankrollReport: BankrollReport) { |
|
|
|
private fun updateMenuUI() { |
|
|
|
|
|
|
|
|
|
|
|
if (bankrollReport.setup.virtualBankroll) { |
|
|
|
if (this.bankrollId == null) { |
|
|
|
setToolbarTitle(getString(R.string.total)) |
|
|
|
setToolbarTitle(getString(R.string.total)) |
|
|
|
bankrollDetailsMenu?.findItem(R.id.settings)?.isVisible = false |
|
|
|
bankrollDetailsMenu?.findItem(R.id.settings)?.isVisible = false |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
@ -199,7 +200,7 @@ class BankrollDetailsFragment : RealmFragment(), StaticRowRepresentableDataSourc |
|
|
|
menu?.clear() |
|
|
|
menu?.clear() |
|
|
|
inflater?.inflate(R.menu.toolbar_comparison_chart, menu) |
|
|
|
inflater?.inflate(R.menu.toolbar_comparison_chart, menu) |
|
|
|
this.bankrollDetailsMenu = menu |
|
|
|
this.bankrollDetailsMenu = menu |
|
|
|
// updateMenuUI() |
|
|
|
updateMenuUI() |
|
|
|
super.onCreateOptionsMenu(menu, inflater) |
|
|
|
super.onCreateOptionsMenu(menu, inflater) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|