Add small formatting fixes in TelegramSettings

This commit is contained in:
Alex Sytnyk 2018-09-05 11:44:02 +03:00
parent 561814cf90
commit 546679298e

View file

@ -253,7 +253,9 @@ class TelegramSettings(private val app: TelegramApplication) {
appToConnectPackage = prefs.getString(APP_TO_CONNECT_PACKAGE_KEY, "") appToConnectPackage = prefs.getString(APP_TO_CONNECT_PACKAGE_KEY, "")
liveNowSortType = LiveNowSortType.valueOf(prefs.getString(LIVE_NOW_SORT_TYPE_KEY, LiveNowSortType.SORT_BY_GROUP.name)) liveNowSortType = LiveNowSortType.valueOf(
prefs.getString(LIVE_NOW_SORT_TYPE_KEY, LiveNowSortType.SORT_BY_GROUP.name)
)
} }
private fun updatePrefs() { private fun updatePrefs() {
@ -378,7 +380,11 @@ class TelegramSettings(private val app: TelegramApplication) {
} }
} }
enum class LiveNowSortType(@DrawableRes val iconId: Int, @StringRes val titleId: Int, @StringRes val shortTitleId: Int) { enum class LiveNowSortType(
@DrawableRes val iconId: Int,
@StringRes val titleId: Int,
@StringRes val shortTitleId: Int
) {
SORT_BY_GROUP( SORT_BY_GROUP(
R.drawable.ic_action_sort_by_group, R.drawable.ic_action_sort_by_group,
R.string.shared_string_group, R.string.shared_string_group,