アプリ設定の「プレビューカードを取得しない」を削除。「プレビューカードを表示しない」を追加。
This commit is contained in:
parent
eab4cfb927
commit
b976e47fe5
|
@ -2996,20 +2996,21 @@ class Column(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// カードを取得する
|
// マストドン2.6でTLにカード情報がレンダリングされたことにより、
|
||||||
if(! Pref.bpDontRetrievePreviewCard(context)) {
|
// 個別にカードを取得する機能は ST3.0.7で廃止される
|
||||||
this.list_tmp?.forEach { o ->
|
// この機能はRate limitの問題を引き起こすことが多かった
|
||||||
if(o is TootStatus && o.card == null)
|
// if(! Pref.bpDontRetrievePreviewCard(context)) {
|
||||||
o.card = parseItem(
|
// this.list_tmp?.forEach { o ->
|
||||||
::TootCard,
|
// // カードを取得する
|
||||||
client.request("/api/v1/statuses/" + o.id + "/card")?.jsonObject
|
// if(o is TootStatus && o.card == null)
|
||||||
)
|
// o.card = parseItem(
|
||||||
}
|
// ::TootCard,
|
||||||
}
|
// client.request("/api/v1/statuses/" + o.id + "/card")?.jsonObject
|
||||||
|
// )
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
//
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6884,7 +6885,7 @@ class Column(
|
||||||
else -> defaultColorHeaderBg
|
else -> defaultColorHeaderBg
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setHeaderBackground( view : View) {
|
fun setHeaderBackground(view : View) {
|
||||||
ViewCompat.setBackground(
|
ViewCompat.setBackground(
|
||||||
view,
|
view,
|
||||||
Styler.getAdaptiveRippleDrawable(
|
Styler.getAdaptiveRippleDrawable(
|
||||||
|
|
|
@ -1060,8 +1060,7 @@ internal class ItemViewHolder(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// カードの表示(会話ビューのみ)
|
showPreviewCard(status)
|
||||||
showPreviewCard(activity, status)
|
|
||||||
|
|
||||||
// if( status.decoded_tags == null ){
|
// if( status.decoded_tags == null ){
|
||||||
// tvTags.setVisibility( View.GONE );
|
// tvTags.setVisibility( View.GONE );
|
||||||
|
@ -1784,7 +1783,10 @@ internal class ItemViewHolder(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun showPreviewCard(activity : ActMain, status : TootStatus) {
|
private fun showPreviewCard(status : TootStatus) {
|
||||||
|
|
||||||
|
if(Pref.bpDontShowPreviewCard(activity.pref)) return
|
||||||
|
|
||||||
val card = status.card ?: return
|
val card = status.card ?: return
|
||||||
|
|
||||||
// 会話カラムで返信ステータスなら捏造したカードを表示しない
|
// 会話カラムで返信ステータスなら捏造したカードを表示しない
|
||||||
|
|
|
@ -335,11 +335,12 @@ object Pref {
|
||||||
R.id.swSendAccessTokenToAppServer
|
R.id.swSendAccessTokenToAppServer
|
||||||
)
|
)
|
||||||
|
|
||||||
val bpDontRetrievePreviewCard = BooleanPref(
|
val bpDontShowPreviewCard = BooleanPref(
|
||||||
"DontRetrievePreviewCard",
|
"DontShowPreviewCard",
|
||||||
true,
|
false,
|
||||||
R.id.swDontRetrievePreviewCard
|
R.id.swDontShowPreviewCard
|
||||||
)
|
)
|
||||||
|
|
||||||
val bpScrollTopFromColumnStrip = BooleanPref(
|
val bpScrollTopFromColumnStrip = BooleanPref(
|
||||||
"ScrollTopFromColumnStrip",
|
"ScrollTopFromColumnStrip",
|
||||||
false,
|
false,
|
||||||
|
|
|
@ -316,13 +316,13 @@
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/setting_row_label"
|
style="@style/setting_row_label"
|
||||||
android:text="@string/dont_retrieve_preview_card"
|
android:text="@string/dont_show_preview_card"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<LinearLayout style="@style/setting_row_form">
|
<LinearLayout style="@style/setting_row_form">
|
||||||
|
|
||||||
<Switch
|
<Switch
|
||||||
android:id="@+id/swDontRetrievePreviewCard"
|
android:id="@+id/swDontShowPreviewCard"
|
||||||
style="@style/setting_horizontal_stretch"
|
style="@style/setting_horizontal_stretch"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -803,5 +803,6 @@
|
||||||
<string name="content_acct_color">内容のAcctの文字色</string>
|
<string name="content_acct_color">内容のAcctの文字色</string>
|
||||||
<string name="content_text_color">内容の本文の文字色</string>
|
<string name="content_text_color">内容の本文の文字色</string>
|
||||||
<string name="quick_toot_bar_background_color">簡易投稿入力の背景色</string>
|
<string name="quick_toot_bar_background_color">簡易投稿入力の背景色</string>
|
||||||
|
<string name="dont_show_preview_card">プレビューカードを表示しない</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -821,5 +821,6 @@
|
||||||
<string name="content_acct_color">Content acct color</string>
|
<string name="content_acct_color">Content acct color</string>
|
||||||
<string name="content_text_color">Content text color</string>
|
<string name="content_text_color">Content text color</string>
|
||||||
<string name="quick_toot_bar_background_color">Quick toot bar background color</string>
|
<string name="quick_toot_bar_background_color">Quick toot bar background color</string>
|
||||||
|
<string name="dont_show_preview_card">Don\'t show preview card</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in New Issue