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
1 changed files with 2 additions and 5 deletions

View File

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