|
|
|
|
@ -68,8 +68,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 { |
|
|
|
|
NAME(R.string.name), |
|
|
|
|
LIVE(R.string.live), |
|
|
|
|
CURRENCY(R.string.currency); |
|
|
|
|
|
|
|
|
|
@ -80,14 +88,13 @@ enum class BankrollRow(val resId: Int) : DynamicRowInterface { |
|
|
|
|
override val viewType: Int |
|
|
|
|
get() { |
|
|
|
|
return when (this) { |
|
|
|
|
NAME, LIVE, CURRENCY -> RowViewType.TITLE_VALUE.ordinal |
|
|
|
|
LIVE, CURRENCY -> RowViewType.TITLE_VALUE.ordinal |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
override val bottomSheetType: BottomSheetType |
|
|
|
|
get() { |
|
|
|
|
return when (this) { |
|
|
|
|
NAME -> BottomSheetType.EDIT_TEXT |
|
|
|
|
LIVE -> BottomSheetType.NONE |
|
|
|
|
CURRENCY -> BottomSheetType.LIST |
|
|
|
|
} |
|
|
|
|
@ -95,91 +102,15 @@ enum class BankrollRow(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 { |
|
|
|
|
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 { |
|
|
|
|
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 { |
|
|
|
|
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 { |
|
|
|
|
|