|
|
|
@ -33,6 +33,8 @@ sealed class FilterElementRow : RowRepresentable { |
|
|
|
|
|
|
|
|
|
|
|
object ResultMoreThan : MoreFilterElementRow() |
|
|
|
object ResultMoreThan : MoreFilterElementRow() |
|
|
|
object ResultLessThan : LessFilterElementRow() |
|
|
|
object ResultLessThan : LessFilterElementRow() |
|
|
|
|
|
|
|
object ReBuyMoreThan: MoreFilterElementRow() |
|
|
|
|
|
|
|
object ReBuyLessThan: LessFilterElementRow() |
|
|
|
object DurationMoreThan : MoreTimeFilterElementRow() |
|
|
|
object DurationMoreThan : MoreTimeFilterElementRow() |
|
|
|
object DurationLessThan : LessTimeFilterElementRow() |
|
|
|
object DurationLessThan : LessTimeFilterElementRow() |
|
|
|
|
|
|
|
|
|
|
|
@ -172,6 +174,8 @@ sealed class FilterElementRow : RowRepresentable { |
|
|
|
is Blind -> R.string.blinds |
|
|
|
is Blind -> R.string.blinds |
|
|
|
is LastGames -> R.string.last_records |
|
|
|
is LastGames -> R.string.last_records |
|
|
|
is LastSessions -> R.string.last_sessions |
|
|
|
is LastSessions -> R.string.last_sessions |
|
|
|
|
|
|
|
is ReBuyMoreThan -> R.string.maximum |
|
|
|
|
|
|
|
is ReBuyLessThan -> R.string.minimum |
|
|
|
is MoreFilterElementRow, is MoreTimeFilterElementRow -> R.string.more_than |
|
|
|
is MoreFilterElementRow, is MoreTimeFilterElementRow -> R.string.more_than |
|
|
|
is LessFilterElementRow, is LessTimeFilterElementRow -> R.string.less_than |
|
|
|
is LessFilterElementRow, is LessTimeFilterElementRow -> R.string.less_than |
|
|
|
else -> null |
|
|
|
else -> null |
|
|
|
@ -181,9 +185,7 @@ sealed class FilterElementRow : RowRepresentable { |
|
|
|
override val viewType: Int |
|
|
|
override val viewType: Int |
|
|
|
get() { |
|
|
|
get() { |
|
|
|
return when (this) { |
|
|
|
return when (this) { |
|
|
|
is PastDays, |
|
|
|
is PastDays, is From, is To, is LastGames, is LastSessions, is ReBuyMoreThan, is ReBuyLessThan, |
|
|
|
is From, is To, |
|
|
|
|
|
|
|
is LastGames, is LastSessions, |
|
|
|
|
|
|
|
is DurationMoreThan, is DurationLessThan -> RowViewType.TITLE_VALUE_CHECK.ordinal |
|
|
|
is DurationMoreThan, is DurationLessThan -> RowViewType.TITLE_VALUE_CHECK.ordinal |
|
|
|
else -> RowViewType.TITLE_CHECK.ordinal |
|
|
|
else -> RowViewType.TITLE_CHECK.ordinal |
|
|
|
} |
|
|
|
} |
|
|
|
@ -192,7 +194,7 @@ sealed class FilterElementRow : RowRepresentable { |
|
|
|
override val bottomSheetType: BottomSheetType |
|
|
|
override val bottomSheetType: BottomSheetType |
|
|
|
get() { |
|
|
|
get() { |
|
|
|
return when (this) { |
|
|
|
return when (this) { |
|
|
|
is PastDays, is LastGames, is LastSessions -> BottomSheetType.EDIT_TEXT |
|
|
|
is PastDays, is LastGames, is LastSessions, is ReBuyMoreThan, is ReBuyLessThan -> BottomSheetType.EDIT_TEXT |
|
|
|
is DurationMoreThan, is DurationLessThan -> BottomSheetType.DOUBLE_EDIT_TEXT |
|
|
|
is DurationMoreThan, is DurationLessThan -> BottomSheetType.DOUBLE_EDIT_TEXT |
|
|
|
else -> BottomSheetType.NONE |
|
|
|
else -> BottomSheetType.NONE |
|
|
|
} |
|
|
|
} |
|
|
|
@ -218,6 +220,18 @@ sealed class FilterElementRow : RowRepresentable { |
|
|
|
RowRepresentableEditDescriptor(lastSessions, R.string.last_sessions, inputType = InputType.TYPE_CLASS_NUMBER) |
|
|
|
RowRepresentableEditDescriptor(lastSessions, R.string.last_sessions, inputType = InputType.TYPE_CLASS_NUMBER) |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
is ReBuyMoreThan -> { |
|
|
|
|
|
|
|
val reBuyMore: String? by map |
|
|
|
|
|
|
|
arrayListOf( |
|
|
|
|
|
|
|
RowRepresentableEditDescriptor(reBuyMore, R.string.maximum, inputType = InputType.TYPE_CLASS_NUMBER) |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
is ReBuyLessThan -> { |
|
|
|
|
|
|
|
val reBuyLess: String? by map |
|
|
|
|
|
|
|
arrayListOf( |
|
|
|
|
|
|
|
RowRepresentableEditDescriptor(reBuyLess, R.string.minimum, inputType = InputType.TYPE_CLASS_NUMBER) |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
is DurationMoreThan, is DurationLessThan -> { |
|
|
|
is DurationMoreThan, is DurationLessThan -> { |
|
|
|
val hours: String? by map |
|
|
|
val hours: String? by map |
|
|
|
val minutes: String? by map |
|
|
|
val minutes: String? by map |
|
|
|
|