|
|
|
@ -6,6 +6,7 @@ import net.pokeranalytics.android.model.realm.handhistory.Action |
|
|
|
import net.pokeranalytics.android.model.realm.handhistory.HandHistory |
|
|
|
import net.pokeranalytics.android.model.realm.handhistory.HandHistory |
|
|
|
import net.pokeranalytics.android.ui.view.RowRepresentable |
|
|
|
import net.pokeranalytics.android.ui.view.RowRepresentable |
|
|
|
import net.pokeranalytics.android.ui.view.RowViewType |
|
|
|
import net.pokeranalytics.android.ui.view.RowViewType |
|
|
|
|
|
|
|
import net.pokeranalytics.android.ui.view.handhistory.HandHistoryKeyboard |
|
|
|
import net.pokeranalytics.android.ui.view.handhistory.StreetCardHeader |
|
|
|
import net.pokeranalytics.android.ui.view.handhistory.StreetCardHeader |
|
|
|
import net.pokeranalytics.android.ui.view.rowrepresentable.CustomizableRowRepresentable |
|
|
|
import net.pokeranalytics.android.ui.view.rowrepresentable.CustomizableRowRepresentable |
|
|
|
import java.util.* |
|
|
|
import java.util.* |
|
|
|
@ -304,12 +305,12 @@ class HHBuilder { |
|
|
|
/*** |
|
|
|
/*** |
|
|
|
* Finds the index of the first incomplete action, if existing |
|
|
|
* Finds the index of the first incomplete action, if existing |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
fun findIndexForEdition(): RowRepresentable? { |
|
|
|
fun findIndexForEdition(): Pair<Int, HandHistoryKeyboard>? { |
|
|
|
|
|
|
|
|
|
|
|
this.currentRowRepresentables.forEach { rowRepresentable -> |
|
|
|
this.currentRowRepresentables.forEachIndexed { index, rowRepresentable -> |
|
|
|
if (rowRepresentable is HandHistoryRow) { |
|
|
|
if (rowRepresentable is HandHistoryRow) { |
|
|
|
if (!rowRepresentable.isValid()) { |
|
|
|
rowRepresentable.keyboardForCompletion()?.let { keyboard -> |
|
|
|
return rowRepresentable |
|
|
|
return Pair(index, keyboard) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|