update ktlint plugin to 11.3.1, format code (#3442)
This commit is contained in:
parent
774d79d666
commit
d839f18267
141 changed files with 589 additions and 428 deletions
|
|
@ -82,7 +82,7 @@ data class AccountEntity(
|
|||
var pushPubKey: String = "",
|
||||
var pushPrivKey: String = "",
|
||||
var pushAuth: String = "",
|
||||
var pushServerKey: String = "",
|
||||
var pushServerKey: String = ""
|
||||
) {
|
||||
|
||||
val identifier: String
|
||||
|
|
|
|||
|
|
@ -66,7 +66,6 @@ class AccountManager @Inject constructor(db: AppDatabase) {
|
|||
oauthScopes: String,
|
||||
newAccount: Account
|
||||
) {
|
||||
|
||||
activeAccount?.let {
|
||||
it.isActive = false
|
||||
Log.d(TAG, "addAccount: saving account with id " + it.id)
|
||||
|
|
@ -121,7 +120,6 @@ class AccountManager @Inject constructor(db: AppDatabase) {
|
|||
* @return the new active account, or null if no other account was found
|
||||
*/
|
||||
fun logActiveAccountOut(): AccountEntity? {
|
||||
|
||||
return activeAccount?.let { account ->
|
||||
|
||||
account.logout()
|
||||
|
|
@ -167,7 +165,6 @@ class AccountManager @Inject constructor(db: AppDatabase) {
|
|||
* @param accountId the database id of the new active account
|
||||
*/
|
||||
fun setActiveAccount(accountId: Long) {
|
||||
|
||||
val newActiveAccount = accounts.find { (id) ->
|
||||
id == accountId
|
||||
} ?: return // invalid accountId passed, do nothing
|
||||
|
|
@ -237,10 +234,12 @@ class AccountManager @Inject constructor(db: AppDatabase) {
|
|||
fun shouldDisplaySelfUsername(context: Context): Boolean {
|
||||
val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context)
|
||||
val showUsernamePreference = sharedPreferences.getString(PrefKeys.SHOW_SELF_USERNAME, "disambiguate")
|
||||
if (showUsernamePreference == "always")
|
||||
if (showUsernamePreference == "always") {
|
||||
return true
|
||||
if (showUsernamePreference == "never")
|
||||
}
|
||||
if (showUsernamePreference == "never") {
|
||||
return false
|
||||
}
|
||||
|
||||
return accounts.size > 1 // "disambiguate"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ data class DraftEntity(
|
|||
val failedToSendNew: Boolean,
|
||||
val scheduledAt: String?,
|
||||
val language: String?,
|
||||
val statusId: String?,
|
||||
val statusId: String?
|
||||
)
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ data class TimelineStatusEntity(
|
|||
val pinned: Boolean,
|
||||
val card: String?,
|
||||
val language: String?,
|
||||
val filtered: List<FilterResult>?,
|
||||
val filtered: List<FilterResult>?
|
||||
) {
|
||||
val isPlaceholder: Boolean
|
||||
get() = this.authorServerId == null
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue