update Kotlin to 1.7.10 and fix some (new?) warnings (#2647)
* update Kotlin to 1.7.10 and fix some (new?) warnings * remove unused import
This commit is contained in:
parent
12e42e9b2b
commit
4f0f9a7a12
11 changed files with 17 additions and 65 deletions
|
|
@ -97,11 +97,11 @@ class ComposeTokenizer : MultiAutoCompleteTextView.Tokenizer {
|
|||
return if (i > 0 && text[i - 1] == ' ') {
|
||||
text
|
||||
} else if (text is Spanned) {
|
||||
val s = SpannableString(text.toString() + " ")
|
||||
val s = SpannableString("$text ")
|
||||
TextUtils.copySpansFrom(text, 0, text.length, Object::class.java, s, 0)
|
||||
s
|
||||
} else {
|
||||
text.toString() + " "
|
||||
"$text "
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ fun showAddPollDialog(
|
|||
}
|
||||
|
||||
val pollDurationId = durations.indexOfLast {
|
||||
it <= poll?.expiresIn ?: 0
|
||||
it <= (poll?.expiresIn ?: 0)
|
||||
}
|
||||
|
||||
binding.pollDurationSpinner.setSelection(pollDurationId)
|
||||
|
|
|
|||
|
|
@ -191,10 +191,6 @@ class SearchViewModel @Inject constructor(
|
|||
.autoDispose()
|
||||
}
|
||||
|
||||
fun getAllAccountsOrderedByActive(): List<AccountEntity> {
|
||||
return accountManager.getAllAccountsOrderedByActive()
|
||||
}
|
||||
|
||||
fun muteAccount(accountId: String, notifications: Boolean, duration: Int?) {
|
||||
timelineCases.mute(accountId, notifications, duration)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -288,7 +288,7 @@ class SearchStatusesFragment : SearchFragment<StatusViewData.Concrete>(), Status
|
|||
|
||||
val stringToShare = statusToShare.account.username +
|
||||
" - " +
|
||||
statusToShare.content.toString()
|
||||
statusToShare.content
|
||||
sendIntent.putExtra(Intent.EXTRA_TEXT, stringToShare)
|
||||
sendIntent.type = "text/plain"
|
||||
startActivity(Intent.createChooser(sendIntent, resources.getText(R.string.send_post_content_to)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue