「アプリ設定/投稿/外部アプリから共有されたメディアに添付されたテキストを追加しない」を追加。
This commit is contained in:
parent
fa6ced8c6b
commit
ad8a55f5e8
|
@ -722,29 +722,47 @@ class ActPost : AsyncActivity(),
|
|||
val sent_intent = intent.getParcelableExtra<Intent>(KEY_SENT_INTENT)
|
||||
if(sent_intent != null) {
|
||||
|
||||
appendContentText(sent_intent)
|
||||
when(sent_intent.action) {
|
||||
val hasUri = when(sent_intent.action) {
|
||||
Intent.ACTION_VIEW -> {
|
||||
val uri = sent_intent.data
|
||||
val type = sent_intent.type
|
||||
if(uri != null) addAttachment(uri, type)
|
||||
if(uri != null){
|
||||
addAttachment(uri, type)
|
||||
true
|
||||
}else{
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
Intent.ACTION_SEND -> {
|
||||
val uri = sent_intent.getParcelableExtra<Uri>(Intent.EXTRA_STREAM)
|
||||
val type = sent_intent.type
|
||||
if(uri != null) addAttachment(uri, type)
|
||||
if(uri != null){
|
||||
addAttachment(uri, type)
|
||||
true
|
||||
}else{
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
Intent.ACTION_SEND_MULTIPLE -> {
|
||||
val list_uri =
|
||||
sent_intent.getParcelableArrayListExtra<Uri>(Intent.EXTRA_STREAM)
|
||||
if(list_uri != null) {
|
||||
?.filterNotNull()
|
||||
if(list_uri?.isNotEmpty() == true ) {
|
||||
for(uri in list_uri) {
|
||||
if(uri != null) addAttachment(uri)
|
||||
addAttachment(uri)
|
||||
}
|
||||
true
|
||||
}else{
|
||||
false
|
||||
}
|
||||
}
|
||||
else ->false
|
||||
}
|
||||
|
||||
if(!hasUri || !Pref.bpIgnoreTextInSharedMedia(pref)) {
|
||||
appendContentText(sent_intent)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -410,6 +410,8 @@ val appSettingRoot = AppSettingItem(null, SettingType.Section, R.string.app_sett
|
|||
Pref.bpEmojiPickerCloseOnSelected,
|
||||
R.string.close_emoji_picker_when_selected
|
||||
)
|
||||
|
||||
sw(Pref.bpIgnoreTextInSharedMedia, R.string.ignore_text_in_shared_media)
|
||||
}
|
||||
|
||||
section(R.string.tablet_mode) {
|
||||
|
|
|
@ -437,6 +437,11 @@ object Pref {
|
|||
false
|
||||
)
|
||||
|
||||
val bpIgnoreTextInSharedMedia = BooleanPref(
|
||||
"IgnoreTextInSharedMedia",
|
||||
false
|
||||
)
|
||||
|
||||
// int
|
||||
|
||||
val ipBackButtonAction = IntPref("back_button_action", 0)
|
||||
|
|
|
@ -1043,4 +1043,5 @@
|
|||
<string name="scroll_position_after_read_gap_from_tail">ギャップを終端から読んだ後のスクロール位置</string>
|
||||
<string name="gap_head">ギャップの始端</string>
|
||||
<string name="gap_tail">ギャップの終端</string>
|
||||
<string name="ignore_text_in_shared_media">外部アプリから共有されたメディアに添付されたテキストを追加しない</string>
|
||||
</resources>
|
||||
|
|
|
@ -1051,4 +1051,5 @@
|
|||
<string name="scroll_position_after_read_gap_from_tail">Scroll position after read gap from tail</string>
|
||||
<string name="gap_head">Head of gap</string>
|
||||
<string name="gap_tail">Tail of gap</string>
|
||||
<string name="ignore_text_in_shared_media">Don\'t append text attached to media shared from external apps</string>
|
||||
</resources>
|
||||
|
|
Loading…
Reference in New Issue