フィルタされた投稿のユーザ名を表示する設定
This commit is contained in:
parent
0e28b9d716
commit
8594241947
|
@ -395,7 +395,10 @@ val appSettingRoot = AppSettingItem(null, SettingType.Section, R.string.app_sett
|
|||
)
|
||||
|
||||
sw(PrefB.bpEnablePixelfed, R.string.enable_connect_to_pixelfed_server)
|
||||
|
||||
sw(PrefB.bpShowFilteredWord, R.string.show_filtered_word)
|
||||
sw(PrefB.bpShowUsernameFilteredPost,R.string.show_username_on_filtered_post)
|
||||
|
||||
sw(PrefB.bpEnableDomainTimeline, R.string.enable_domain_timeline)
|
||||
}
|
||||
|
||||
|
|
|
@ -58,18 +58,20 @@ fun ItemViewHolder.showStatus(
|
|||
|
||||
val filteredWord = status.filteredWord
|
||||
if (filteredWord != null) {
|
||||
PrefI.ipEventBgColorFiltered.value.notZero()?.let{
|
||||
PrefI.ipEventBgColorFiltered.value.notZero()?.let {
|
||||
viewRoot.backgroundColor = it
|
||||
}
|
||||
showMessageHolder(
|
||||
TootMessageHolder(
|
||||
if (PrefB.bpShowFilteredWord.value) {
|
||||
"${activity.getString(R.string.filtered)} / $filteredWord"
|
||||
} else {
|
||||
activity.getString(R.string.filtered)
|
||||
}
|
||||
)
|
||||
)
|
||||
val text = StringBuilder().apply {
|
||||
append(activity.getString(R.string.filtered))
|
||||
if (PrefB.bpShowFilteredWord.value) {
|
||||
append(" / $filteredWord")
|
||||
}
|
||||
if (PrefB.bpShowUsernameFilteredPost.value) {
|
||||
val s = status.reblog ?: status
|
||||
append(" / ${s.account.display_name} @${s.account.acct}")
|
||||
}
|
||||
}.toString()
|
||||
showMessageHolder(TootMessageHolder(text))
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -211,8 +213,10 @@ private fun ItemViewHolder.showSpoilerTextAndContent(status: TootStatus) {
|
|||
// 予約投稿でも使う
|
||||
fun ItemViewHolder.setContentVisibility(shown: Boolean) {
|
||||
llContents.visibility = if (shown) View.VISIBLE else View.GONE
|
||||
btnContentWarning.contentDescription = activity.getString(if (shown) R.string.hide else R.string.show)
|
||||
btnContentWarning.imageResource = if (shown) R.drawable.outline_compress_24 else R.drawable.outline_expand_24
|
||||
btnContentWarning.contentDescription =
|
||||
activity.getString(if (shown) R.string.hide else R.string.show)
|
||||
btnContentWarning.imageResource =
|
||||
if (shown) R.drawable.outline_compress_24 else R.drawable.outline_expand_24
|
||||
|
||||
statusShowing?.let { status ->
|
||||
val r = status.auto_cw
|
||||
|
|
|
@ -355,4 +355,9 @@ object PrefB {
|
|||
"MisskeyNotificationCheck",
|
||||
false
|
||||
)
|
||||
|
||||
val bpShowUsernameFilteredPost = BooleanPref(
|
||||
"ShowUsernameFilteredPost",
|
||||
false
|
||||
)
|
||||
}
|
||||
|
|
|
@ -1252,4 +1252,5 @@
|
|||
<string name="incorrect_chars">文字 \"%1$s\" は使えません</string>
|
||||
<string name="approved">承認されました。</string>
|
||||
<string name="account_list">アカウント一覧</string>
|
||||
</resources>
|
||||
<string name="show_username_on_filtered_post">フィルタされた投稿にユーザ名を表示する</string>
|
||||
</resources>
|
||||
|
|
|
@ -1253,4 +1253,5 @@
|
|||
<string name="glide_test">glide test</string>
|
||||
<string name="default_post_account_default_action">viewing column account(phone), or ask always(tablet)</string>
|
||||
<string name="quick_post_account">Quick post account</string>
|
||||
<string name="show_username_on_filtered_post">Show username on filtered post</string>
|
||||
</resources>
|
Loading…
Reference in New Issue