アプリ設定の文言変更
This commit is contained in:
parent
82f7ec7f26
commit
ece2c8eac3
|
@ -11,6 +11,7 @@ import jp.juggler.subwaytooter.table.MediaShown
|
||||||
import jp.juggler.subwaytooter.util.DecodeOptions
|
import jp.juggler.subwaytooter.util.DecodeOptions
|
||||||
import jp.juggler.subwaytooter.util.HTMLDecoder
|
import jp.juggler.subwaytooter.util.HTMLDecoder
|
||||||
import jp.juggler.util.ellipsize
|
import jp.juggler.util.ellipsize
|
||||||
|
import jp.juggler.util.textOrGone
|
||||||
import jp.juggler.util.vg
|
import jp.juggler.util.vg
|
||||||
|
|
||||||
private fun addLinkAndCaption(
|
private fun addLinkAndCaption(
|
||||||
|
@ -70,16 +71,10 @@ fun ItemViewHolder.showPreviewCard(status: TootStatus, fadeText: Boolean) {
|
||||||
forceHtml = true,
|
forceHtml = true,
|
||||||
mentionDefaultHostDomain = status.account
|
mentionDefaultHostDomain = status.account
|
||||||
).decodeHTML(sb.toString())
|
).decodeHTML(sb.toString())
|
||||||
if (text.isNotEmpty()) {
|
|
||||||
tvCardText.visibility = View.VISIBLE
|
|
||||||
tvCardText.text = text
|
|
||||||
bShowOuter = true
|
|
||||||
|
|
||||||
val fadeAlpha = ActMain.eventFadeAlpha
|
if (text.isNotEmpty()) {
|
||||||
if (fadeAlpha < 1f) {
|
tvCardText.textOrGone = text
|
||||||
val a = if (fadeText) fadeAlpha else 1f
|
bShowOuter = true
|
||||||
tvCardText.alpha = a
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,14 +131,10 @@ fun ItemViewHolder.showStatus(
|
||||||
tvContentWarning.alpha = a
|
tvContentWarning.alpha = a
|
||||||
tvContent.alpha = a
|
tvContent.alpha = a
|
||||||
tvApplication.alpha = a
|
tvApplication.alpha = a
|
||||||
|
tvCardText.alpha = a
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status.decoded_mentions.isEmpty()) {
|
tvMentions.textOrGone =status.decoded_mentions
|
||||||
tvMentions.visibility = View.GONE
|
|
||||||
} else {
|
|
||||||
tvMentions.visibility = View.VISIBLE
|
|
||||||
tvMentions.text = status.decoded_mentions
|
|
||||||
}
|
|
||||||
|
|
||||||
tvContent.text = modifiedContent
|
tvContent.text = modifiedContent
|
||||||
contentInvalidator.register(modifiedContent)
|
contentInvalidator.register(modifiedContent)
|
||||||
|
|
|
@ -13,6 +13,7 @@ import android.view.WindowInsetsController
|
||||||
import android.view.WindowManager
|
import android.view.WindowManager
|
||||||
import android.view.inputmethod.InputMethodManager
|
import android.view.inputmethod.InputMethodManager
|
||||||
import android.widget.CompoundButton
|
import android.widget.CompoundButton
|
||||||
|
import android.widget.TextView
|
||||||
import androidx.annotation.ColorInt
|
import androidx.annotation.ColorInt
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.appcompat.widget.SwitchCompat
|
import androidx.appcompat.widget.SwitchCompat
|
||||||
|
@ -272,3 +273,9 @@ private fun AppCompatActivity.setNavigationBarColorCompat(@ColorInt c: Int) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var TextView.textOrGone :CharSequence?
|
||||||
|
get() = text
|
||||||
|
set(value){
|
||||||
|
vg(value?.isNotEmpty() ==true)?.text = value
|
||||||
|
}
|
||||||
|
|
|
@ -1107,5 +1107,5 @@
|
||||||
<string name="url_parse_failed">URLの指定が変です</string>
|
<string name="url_parse_failed">URLの指定が変です</string>
|
||||||
<string name="url_of_user_or_status">ユーザや投稿のURL</string>
|
<string name="url_of_user_or_status">ユーザや投稿のURL</string>
|
||||||
<string name="unbookmark">ブックマーク解除</string>
|
<string name="unbookmark">ブックマーク解除</string>
|
||||||
<string name="event_text_alpha">一部の通知の本文アルファ値(0.0~1.0, デフォルト:1)</string>
|
<string name="event_text_alpha">一部の通知の本文アルファ値(0.0~1.0, デフォルト:1。アプリ再起動が必要)</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -1118,5 +1118,5 @@
|
||||||
<string name="url_of_user_or_status">URL of user or status</string>
|
<string name="url_of_user_or_status">URL of user or status</string>
|
||||||
<string name="url_parse_failed">parse error.</string>
|
<string name="url_parse_failed">parse error.</string>
|
||||||
<string name="unbookmark">Unbookmark</string>
|
<string name="unbookmark">Unbookmark</string>
|
||||||
<string name="event_text_alpha">Text alpha value for some notifications (0.0~1.0, default:1)</string>
|
<string name="event_text_alpha">Text alpha for some notifications (0.0~1.0, default:1. app restart required)</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in New Issue