|
|
|
|
@ -169,7 +169,7 @@ open class DataListFragment : DeletableItemFragment(), RowRepresentableDelegate |
|
|
|
|
RequestCode.NEW_DATA.value -> { |
|
|
|
|
if (this.model.isSelectionInstance) { |
|
|
|
|
|
|
|
|
|
data?.getStringExtra(BundleKey.PRIMARY_KEY.value)?.let { id -> |
|
|
|
|
data?.getStringExtra(EditableDataActivity.IntentKey.PRIMARY_KEY.keyName)?.let { id -> |
|
|
|
|
finishActivityWithSelection(id) |
|
|
|
|
} ?: throw PAIllegalStateException("identifier not found") |
|
|
|
|
|
|
|
|
|
@ -190,10 +190,6 @@ open class DataListFragment : DeletableItemFragment(), RowRepresentableDelegate |
|
|
|
|
if (this.model.isSelectionInstance) { // Ends the activity and go back to previous screen |
|
|
|
|
val identifier = (row as Identifiable).id |
|
|
|
|
finishActivityWithSelection(identifier) |
|
|
|
|
// val intent = Intent() |
|
|
|
|
// intent.putExtra(BundleKey.PRIMARY_KEY.value, identifier) |
|
|
|
|
// this.activity?.setResult(Activity.RESULT_OK, intent) |
|
|
|
|
// this.activity?.finish() |
|
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
when (this.model.dataType) { |
|
|
|
|
|