|
|
|
@ -6,12 +6,14 @@ import android.os.Bundle |
|
|
|
import android.view.LayoutInflater |
|
|
|
import android.view.LayoutInflater |
|
|
|
import android.view.View |
|
|
|
import android.view.View |
|
|
|
import android.view.ViewGroup |
|
|
|
import android.view.ViewGroup |
|
|
|
|
|
|
|
import android.widget.Toast |
|
|
|
import androidx.appcompat.app.AlertDialog |
|
|
|
import androidx.appcompat.app.AlertDialog |
|
|
|
import androidx.recyclerview.widget.ItemTouchHelper |
|
|
|
import androidx.recyclerview.widget.ItemTouchHelper |
|
|
|
import androidx.recyclerview.widget.LinearLayoutManager |
|
|
|
import androidx.recyclerview.widget.LinearLayoutManager |
|
|
|
import com.google.android.material.snackbar.Snackbar |
|
|
|
import com.google.android.material.snackbar.Snackbar |
|
|
|
import io.realm.RealmObject |
|
|
|
import io.realm.RealmObject |
|
|
|
import io.realm.RealmResults |
|
|
|
import io.realm.RealmResults |
|
|
|
|
|
|
|
import io.realm.kotlin.isValid |
|
|
|
import kotlinx.android.synthetic.main.fragment_data_list.* |
|
|
|
import kotlinx.android.synthetic.main.fragment_data_list.* |
|
|
|
import kotlinx.coroutines.Dispatchers |
|
|
|
import kotlinx.coroutines.Dispatchers |
|
|
|
import kotlinx.coroutines.GlobalScope |
|
|
|
import kotlinx.coroutines.GlobalScope |
|
|
|
@ -92,6 +94,12 @@ class DataListFragment : PokerAnalyticsFragment(), LiveRowRepresentableDataSourc |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
override fun onRowSelected(position: Int, row: RowRepresentable, fromAction: Boolean) { |
|
|
|
override fun onRowSelected(position: Int, row: RowRepresentable, fromAction: Boolean) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (row is Identifiable && !row.isValid()) { |
|
|
|
|
|
|
|
Toast.makeText(requireContext(), R.string.invalid_object, Toast.LENGTH_LONG) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.dataType.relatedResultsRepresentable?.let { |
|
|
|
this.dataType.relatedResultsRepresentable?.let { |
|
|
|
lastItemClickedPosition = position |
|
|
|
lastItemClickedPosition = position |
|
|
|
EditableDataActivity.newInstanceForResult( |
|
|
|
EditableDataActivity.newInstanceForResult( |
|
|
|
|