1
0
mirror of https://github.com/TwidereProject/Twidere-Android synced 2024-12-17 19:18:26 +01:00

made mastodon available in options

This commit is contained in:
Mariotaku Lee 2017-04-22 15:28:12 +08:00
parent 773e3162a4
commit 105046636f
No known key found for this signature in database
GPG Key ID: 15C10F89D7C33535

View File

@ -664,11 +664,8 @@ class SignInActivity : BaseActivity(), OnClickListener, TextWatcher,
val dialog = dialog ?: return val dialog = dialog ?: return
val listView = dialog.findViewById(R.id.expandableList) as ExpandableListView val listView = dialog.findViewById(R.id.expandableList) as ExpandableListView
val configGroup = data.groupBy { it.type ?: AccountType.TWITTER } val configGroup = data.groupBy { it.type ?: AccountType.TWITTER }
val supportedAccountTypes = if (BuildConfig.DEBUG) { val supportedAccountTypes = arrayOf(AccountType.TWITTER, AccountType.FANFOU,
arrayOf(AccountType.TWITTER, AccountType.FANFOU, AccountType.MASTODON, AccountType.STATUSNET) AccountType.MASTODON, AccountType.STATUSNET)
} else {
arrayOf(AccountType.TWITTER, AccountType.FANFOU, AccountType.STATUSNET)
}
(listView.expandableListAdapter as LoginTypeAdapter).data = supportedAccountTypes.mapNotNull { type -> (listView.expandableListAdapter as LoginTypeAdapter).data = supportedAccountTypes.mapNotNull { type ->
if (type == AccountType.MASTODON) return@mapNotNull LoginType(type, if (type == AccountType.MASTODON) return@mapNotNull LoginType(type,
listOf(CustomAPIConfig.mastodon(context))) listOf(CustomAPIConfig.mastodon(context)))