|
|
|
@ -66,8 +66,16 @@ enum class SessionRow(val resId: Int) : DynamicRowInterface { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
enum class SimpleRow(val resId: Int) : DynamicRowInterface { |
|
|
|
|
|
|
|
NAME(R.string.name); |
|
|
|
|
|
|
|
override fun localizedTitle(context: Context): String { |
|
|
|
|
|
|
|
return context.getString(this.resId) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
override val viewType: Int = RowViewType.TITLE_VALUE.ordinal |
|
|
|
|
|
|
|
override val bottomSheetType: BottomSheetType = BottomSheetType.EDIT_TEXT |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
enum class BankrollRow(val resId: Int) : DynamicRowInterface { |
|
|
|
enum class BankrollRow(val resId: Int) : DynamicRowInterface { |
|
|
|
NAME(R.string.name), |
|
|
|
|
|
|
|
LIVE(R.string.live), |
|
|
|
LIVE(R.string.live), |
|
|
|
CURRENCY(R.string.currency); |
|
|
|
CURRENCY(R.string.currency); |
|
|
|
|
|
|
|
|
|
|
|
@ -78,14 +86,13 @@ enum class BankrollRow(val resId: Int) : DynamicRowInterface { |
|
|
|
override val viewType: Int |
|
|
|
override val viewType: Int |
|
|
|
get() { |
|
|
|
get() { |
|
|
|
return when (this) { |
|
|
|
return when (this) { |
|
|
|
NAME, LIVE, CURRENCY -> RowViewType.TITLE_VALUE.ordinal |
|
|
|
LIVE, CURRENCY -> RowViewType.TITLE_VALUE.ordinal |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
override val bottomSheetType: BottomSheetType |
|
|
|
override val bottomSheetType: BottomSheetType |
|
|
|
get() { |
|
|
|
get() { |
|
|
|
return when (this) { |
|
|
|
return when (this) { |
|
|
|
NAME -> BottomSheetType.EDIT_TEXT |
|
|
|
|
|
|
|
LIVE -> BottomSheetType.NONE |
|
|
|
LIVE -> BottomSheetType.NONE |
|
|
|
CURRENCY -> BottomSheetType.LIST |
|
|
|
CURRENCY -> BottomSheetType.LIST |
|
|
|
} |
|
|
|
} |
|
|
|
@ -93,91 +100,15 @@ enum class BankrollRow(val resId: Int) : DynamicRowInterface { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
enum class GameRow(val resId: Int) : DynamicRowInterface { |
|
|
|
enum class GameRow(val resId: Int) : DynamicRowInterface { |
|
|
|
NAME(R.string.name); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override fun localizedTitle(context: Context): String { |
|
|
|
|
|
|
|
return context.getString(this.resId) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override val viewType: Int |
|
|
|
|
|
|
|
get() { |
|
|
|
|
|
|
|
return when (this) { |
|
|
|
|
|
|
|
NAME -> RowViewType.TITLE_VALUE.ordinal |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override val bottomSheetType: BottomSheetType |
|
|
|
|
|
|
|
get() { |
|
|
|
|
|
|
|
return when (this) { |
|
|
|
|
|
|
|
NAME -> BottomSheetType.EDIT_TEXT |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
enum class LocationRow(val resId: Int) : DynamicRowInterface { |
|
|
|
enum class LocationRow(val resId: Int) : DynamicRowInterface { |
|
|
|
NAME(R.string.name); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override fun localizedTitle(context: Context): String { |
|
|
|
|
|
|
|
return context.getString(this.resId) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override val viewType: Int |
|
|
|
|
|
|
|
get() { |
|
|
|
|
|
|
|
return when (this) { |
|
|
|
|
|
|
|
NAME -> RowViewType.TITLE_VALUE.ordinal |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override val bottomSheetType: BottomSheetType |
|
|
|
|
|
|
|
get() { |
|
|
|
|
|
|
|
return when (this) { |
|
|
|
|
|
|
|
NAME -> BottomSheetType.EDIT_TEXT |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
enum class TransactionTypeRow(val resId: Int) : DynamicRowInterface { |
|
|
|
enum class TransactionTypeRow(val resId: Int) : DynamicRowInterface { |
|
|
|
NAME(R.string.name); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override fun localizedTitle(context: Context): String { |
|
|
|
|
|
|
|
return context.getString(this.resId) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override val viewType: Int |
|
|
|
|
|
|
|
get() { |
|
|
|
|
|
|
|
return when (this) { |
|
|
|
|
|
|
|
NAME -> RowViewType.TITLE_VALUE.ordinal |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override val bottomSheetType: BottomSheetType |
|
|
|
|
|
|
|
get() { |
|
|
|
|
|
|
|
return when (this) { |
|
|
|
|
|
|
|
NAME -> BottomSheetType.EDIT_TEXT |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
enum class TournamentFeatureRow(val resId: Int) : DynamicRowInterface { |
|
|
|
enum class TournamentFeatureRow(val resId: Int) : DynamicRowInterface { |
|
|
|
NAME(R.string.name); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override fun localizedTitle(context: Context): String { |
|
|
|
|
|
|
|
return context.getString(this.resId) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override val viewType: Int |
|
|
|
|
|
|
|
get() { |
|
|
|
|
|
|
|
return when (this) { |
|
|
|
|
|
|
|
NAME -> RowViewType.TITLE_VALUE.ordinal |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override val bottomSheetType: BottomSheetType |
|
|
|
|
|
|
|
get() { |
|
|
|
|
|
|
|
return when (this) { |
|
|
|
|
|
|
|
NAME -> BottomSheetType.EDIT_TEXT |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
enum class SettingRow(val resId: Int) : DynamicRowInterface { |
|
|
|
enum class SettingRow(val resId: Int) : DynamicRowInterface { |
|
|
|
|