|
|
|
|
@ -24,6 +24,7 @@ import net.pokeranalytics.android.model.realm.handhistory.HandHistory |
|
|
|
|
import net.pokeranalytics.android.ui.activity.components.RequestCode |
|
|
|
|
import net.pokeranalytics.android.ui.adapter.RowRepresentableDelegate |
|
|
|
|
import net.pokeranalytics.android.ui.extensions.px |
|
|
|
|
import net.pokeranalytics.android.ui.extensions.showAlertDialog |
|
|
|
|
import net.pokeranalytics.android.ui.fragment.components.BaseFragment |
|
|
|
|
import net.pokeranalytics.android.ui.fragment.components.RealmFragment |
|
|
|
|
import net.pokeranalytics.android.ui.fragment.components.bottomsheet.BottomSheetFragment |
|
|
|
|
@ -179,7 +180,7 @@ class EditorFragment : RealmFragment(), RowRepresentableDelegate, KeyboardListen |
|
|
|
|
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) { |
|
|
|
|
menu.clear() |
|
|
|
|
this.menu = menu |
|
|
|
|
inflater.inflate(R.menu.toolbar_hand_history, menu) |
|
|
|
|
inflater.inflate(R.menu.toolbar_hh_editor, menu) |
|
|
|
|
updateMenuUI() |
|
|
|
|
super.onCreateOptionsMenu(menu, inflater) |
|
|
|
|
} |
|
|
|
|
@ -237,7 +238,12 @@ class EditorFragment : RealmFragment(), RowRepresentableDelegate, KeyboardListen |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private fun exportHand() { |
|
|
|
|
(this.activity as HandHistoryActivity).exportHand(this.model.handHistory) |
|
|
|
|
|
|
|
|
|
if (!this.model.isEdited) { |
|
|
|
|
(this.activity as HandHistoryActivity).exportHand(this.model.handHistory) |
|
|
|
|
} else { |
|
|
|
|
this.showAlertDialog(R.string.please_save_hand_history) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/*** |
|
|
|
|
|