1
0
mirror of https://github.com/tateisu/SubwayTooter synced 2025-01-26 16:56:28 +01:00

リファクタ

This commit is contained in:
tateisu 2019-08-07 10:17:59 +09:00
parent ef7110cbd9
commit 49ee5696d4
2 changed files with 5 additions and 9 deletions

View File

@ -250,14 +250,7 @@ class Column(
}
// 短い名前
fun getColumnTypeName(context : Context, type : Int) =
when(val item = columnTypeProcMap[type]) {
null -> "?"
else -> item.name(context)
}
internal fun getIconId(acct : String, type : Int) =
fun getIconId(acct : String, type : Int) =
when(val item = columnTypeProcMap[type]) {
null -> R.drawable.ic_info
else -> item.iconId(acct)

View File

@ -217,7 +217,10 @@ object Action_Account {
bAuto = true,
message = activity.getString(
R.string.account_picker_add_timeline_of,
Column.getColumnTypeName(activity, type)
when(val ctp = columnTypeProcMap[type]) {
null -> "?"
else -> ctp.name(activity)
}
)
) { ai ->
when(type) {