|
|
|
@ -8,7 +8,6 @@ import android.view.ViewGroup |
|
|
|
import android.widget.Toast |
|
|
|
import android.widget.Toast |
|
|
|
import androidx.appcompat.app.AlertDialog |
|
|
|
import androidx.appcompat.app.AlertDialog |
|
|
|
import androidx.recyclerview.widget.LinearLayoutManager |
|
|
|
import androidx.recyclerview.widget.LinearLayoutManager |
|
|
|
import io.realm.Realm |
|
|
|
|
|
|
|
import io.realm.RealmObject |
|
|
|
import io.realm.RealmObject |
|
|
|
import kotlinx.android.synthetic.main.fragment_editable_data.* |
|
|
|
import kotlinx.android.synthetic.main.fragment_editable_data.* |
|
|
|
import kotlinx.android.synthetic.main.fragment_editable_data.view.* |
|
|
|
import kotlinx.android.synthetic.main.fragment_editable_data.view.* |
|
|
|
@ -85,7 +84,7 @@ class EditableDataFragment : PokerAnalyticsFragment(), RowRepresentableDelegate, |
|
|
|
this.saveButton.text = this.saveButton.context.getString(R.string.save) |
|
|
|
this.saveButton.text = this.saveButton.context.getString(R.string.save) |
|
|
|
this.saveButton.setOnClickListener { |
|
|
|
this.saveButton.setOnClickListener { |
|
|
|
|
|
|
|
|
|
|
|
if ((this.item as ObjectSavable).isSavable()) { |
|
|
|
if ((this.item as ObjectSavable).isValidForSave()) { |
|
|
|
this.getRealm().executeTransaction { |
|
|
|
this.getRealm().executeTransaction { |
|
|
|
it.copyToRealmOrUpdate(this.item) |
|
|
|
it.copyToRealmOrUpdate(this.item) |
|
|
|
} |
|
|
|
} |
|
|
|
|