|
|
|
@ -5,6 +5,7 @@ import android.view.LayoutInflater |
|
|
|
import android.view.View |
|
|
|
import android.view.View |
|
|
|
import android.view.ViewGroup |
|
|
|
import android.view.ViewGroup |
|
|
|
import androidx.recyclerview.widget.LinearLayoutManager |
|
|
|
import androidx.recyclerview.widget.LinearLayoutManager |
|
|
|
|
|
|
|
import com.crashlytics.android.Crashlytics |
|
|
|
import io.realm.RealmModel |
|
|
|
import io.realm.RealmModel |
|
|
|
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.* |
|
|
|
@ -67,7 +68,13 @@ open class EditableDataFragment : DataManagerFragment(), RowRepresentableDelegat |
|
|
|
|
|
|
|
|
|
|
|
override fun onRowValueChanged(value: Any?, row: RowRepresentable) { |
|
|
|
override fun onRowValueChanged(value: Any?, row: RowRepresentable) { |
|
|
|
this.getRealm().executeTransaction { |
|
|
|
this.getRealm().executeTransaction { |
|
|
|
|
|
|
|
try { |
|
|
|
(this.item as Editable).updateValue(value, row) |
|
|
|
(this.item as Editable).updateValue(value, row) |
|
|
|
|
|
|
|
} catch (e: Exception) { |
|
|
|
|
|
|
|
Crashlytics.log("Exception caught: row = $row, value=$value, class=${this.javaClass}") |
|
|
|
|
|
|
|
throw e |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
rowRepresentableAdapter.refreshRow(row) |
|
|
|
rowRepresentableAdapter.refreshRow(row) |
|
|
|
} |
|
|
|
} |
|
|
|
|