3891: (use string templates)

This commit is contained in:
Lakoja 2023-07-28 09:33:23 +02:00
parent e5456b0197
commit 96028c841a
1 changed files with 2 additions and 3 deletions

View File

@ -175,7 +175,7 @@ class StatusListActivity : BottomSheetActivity(), HasAndroidInjector {
*/ */
private fun updateMuteTagMenuItems() { private fun updateMuteTagMenuItems() {
val tag = hashtag ?: return val tag = hashtag ?: return
val hashedTag = if (tag.startsWith('#')) tag else "#" + tag val hashedTag = if (tag.startsWith('#')) tag else "#$tag"
muteTagItem?.isVisible = true muteTagItem?.isVisible = true
muteTagItem?.isEnabled = false muteTagItem?.isEnabled = false
@ -230,7 +230,7 @@ class StatusListActivity : BottomSheetActivity(), HasAndroidInjector {
lifecycleScope.launch { lifecycleScope.launch {
var filterCreateSuccess = false var filterCreateSuccess = false
val hashedTag = if (tag.startsWith('#')) tag else "#" + tag val hashedTag = if (tag.startsWith('#')) tag else "#$tag"
mastodonApi.createFilter( mastodonApi.createFilter(
title = "#$tag", title = "#$tag",
@ -313,7 +313,6 @@ class StatusListActivity : BottomSheetActivity(), HasAndroidInjector {
} else { } else {
mastodonApi.deleteFilter(filter.id) mastodonApi.deleteFilter(filter.id)
} }
} else if (mutedFilterV1 != null) { } else if (mutedFilterV1 != null) {
mutedFilterV1?.let { filter -> mutedFilterV1?.let { filter ->
if (filter.context.size > 1) { if (filter.context.size > 1) {