|
|
|
@ -82,6 +82,12 @@ open class FilterDetailsFragment : PokerAnalyticsFragment(), StaticRowRepresenta |
|
|
|
val data = row.editingDescriptors(mapOf("hours" to hours, "minutes" to minutes)) |
|
|
|
val data = row.editingDescriptors(mapOf("hours" to hours, "minutes" to minutes)) |
|
|
|
BottomSheetFragment.create(fragmentManager, row, this, data, true) |
|
|
|
BottomSheetFragment.create(fragmentManager, row, this, data, true) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
is FilterElementRow.DurationLessThan -> { |
|
|
|
|
|
|
|
val hours = if (row.minutes / 60 > 0) (row.minutes / 60).toString() else "" |
|
|
|
|
|
|
|
val minutes = if (row.minutes % 60 > 0) (row.minutes % 60).toString() else "" |
|
|
|
|
|
|
|
val data = row.editingDescriptors(mapOf("hours" to hours, "minutes" to minutes)) |
|
|
|
|
|
|
|
BottomSheetFragment.create(fragmentManager, row, this, data, true) |
|
|
|
|
|
|
|
} |
|
|
|
else -> { |
|
|
|
else -> { |
|
|
|
|
|
|
|
|
|
|
|
val oldRows = ArrayList<RowRepresentable>() |
|
|
|
val oldRows = ArrayList<RowRepresentable>() |
|
|
|
@ -129,7 +135,7 @@ open class FilterDetailsFragment : PokerAnalyticsFragment(), StaticRowRepresenta |
|
|
|
is FilterElementRow.PastDays -> if (row.lastDays > 0) row.lastDays.toString() else NULL_TEXT |
|
|
|
is FilterElementRow.PastDays -> if (row.lastDays > 0) row.lastDays.toString() else NULL_TEXT |
|
|
|
is FilterElementRow.From -> row.date.shortDate() |
|
|
|
is FilterElementRow.From -> row.date.shortDate() |
|
|
|
is FilterElementRow.To -> row.date.shortDate() |
|
|
|
is FilterElementRow.To -> row.date.shortDate() |
|
|
|
is FilterElementRow.DurationMoreThan -> row.minutes.toMinutes(requireContext()) |
|
|
|
is FilterElementRow.TimeFilterElementRow -> row.minutes.toMinutes(requireContext()) |
|
|
|
else -> super.stringForRow(row) |
|
|
|
else -> super.stringForRow(row) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -146,7 +152,7 @@ open class FilterDetailsFragment : PokerAnalyticsFragment(), StaticRowRepresenta |
|
|
|
is FilterElementRow.From -> row.date = if (value != null && value is Date) value else Date() |
|
|
|
is FilterElementRow.From -> row.date = if (value != null && value is Date) value else Date() |
|
|
|
is FilterElementRow.To -> row.date = if (value != null && value is Date) value else Date() |
|
|
|
is FilterElementRow.To -> row.date = if (value != null && value is Date) value else Date() |
|
|
|
is FilterElementRow.PastDays -> row.lastDays = if (value != null && value is String) value.toInt() else 0 |
|
|
|
is FilterElementRow.PastDays -> row.lastDays = if (value != null && value is String) value.toInt() else 0 |
|
|
|
is FilterElementRow.DurationMoreThan -> { |
|
|
|
is FilterElementRow.TimeFilterElementRow -> { |
|
|
|
if (value is ArrayList<*>) { |
|
|
|
if (value is ArrayList<*>) { |
|
|
|
val hours = try { |
|
|
|
val hours = try { |
|
|
|
(value[0] as String? ?: "0").toInt() |
|
|
|
(value[0] as String? ?: "0").toInt() |
|
|
|
|