アカウント設定に「WebUIの設定をいくつか読み込む/メディアを常に閲覧注意としてマークする/CWされたコンテンツを隠さない」を追加。
This commit is contained in:
parent
b76591e493
commit
4518f4dd10
|
@ -86,12 +86,18 @@ class ActAccountSetting
|
||||||
|
|
||||||
private lateinit var tvInstance : TextView
|
private lateinit var tvInstance : TextView
|
||||||
private lateinit var tvUser : TextView
|
private lateinit var tvUser : TextView
|
||||||
private lateinit var btnAccessToken : View
|
private lateinit var btnAccessToken : Button
|
||||||
private lateinit var btnInputAccessToken : View
|
private lateinit var btnInputAccessToken : Button
|
||||||
private lateinit var btnAccountRemove : View
|
private lateinit var btnAccountRemove : Button
|
||||||
|
private lateinit var btnLoadPreference : Button
|
||||||
|
|
||||||
private lateinit var btnVisibility : Button
|
private lateinit var btnVisibility : Button
|
||||||
|
|
||||||
private lateinit var swNSFWOpen : Switch
|
private lateinit var swNSFWOpen : Switch
|
||||||
private lateinit var swDontShowTimeout : Switch
|
private lateinit var swDontShowTimeout : Switch
|
||||||
|
private lateinit var swExpandCW : Switch
|
||||||
|
private lateinit var swMarkSensitive : Switch
|
||||||
|
|
||||||
private lateinit var btnOpenBrowser : Button
|
private lateinit var btnOpenBrowser : Button
|
||||||
private lateinit var btnPushSubscription : Button
|
private lateinit var btnPushSubscription : Button
|
||||||
private lateinit var cbNotificationMention : CheckBox
|
private lateinit var cbNotificationMention : CheckBox
|
||||||
|
@ -253,9 +259,12 @@ class ActAccountSetting
|
||||||
btnAccessToken = findViewById(R.id.btnAccessToken)
|
btnAccessToken = findViewById(R.id.btnAccessToken)
|
||||||
btnInputAccessToken = findViewById(R.id.btnInputAccessToken)
|
btnInputAccessToken = findViewById(R.id.btnInputAccessToken)
|
||||||
btnAccountRemove = findViewById(R.id.btnAccountRemove)
|
btnAccountRemove = findViewById(R.id.btnAccountRemove)
|
||||||
|
btnLoadPreference = findViewById(R.id.btnLoadPreference)
|
||||||
btnVisibility = findViewById(R.id.btnVisibility)
|
btnVisibility = findViewById(R.id.btnVisibility)
|
||||||
swNSFWOpen = findViewById(R.id.swNSFWOpen)
|
swNSFWOpen = findViewById(R.id.swNSFWOpen)
|
||||||
swDontShowTimeout = findViewById(R.id.swDontShowTimeout)
|
swDontShowTimeout = findViewById(R.id.swDontShowTimeout)
|
||||||
|
swExpandCW = findViewById(R.id.swExpandCW)
|
||||||
|
swMarkSensitive = findViewById(R.id.swMarkSensitive)
|
||||||
btnOpenBrowser = findViewById(R.id.btnOpenBrowser)
|
btnOpenBrowser = findViewById(R.id.btnOpenBrowser)
|
||||||
btnPushSubscription = findViewById(R.id.btnPushSubscription)
|
btnPushSubscription = findViewById(R.id.btnPushSubscription)
|
||||||
cbNotificationMention = findViewById(R.id.cbNotificationMention)
|
cbNotificationMention = findViewById(R.id.cbNotificationMention)
|
||||||
|
@ -309,6 +318,7 @@ class ActAccountSetting
|
||||||
btnAccessToken.setOnClickListener(this)
|
btnAccessToken.setOnClickListener(this)
|
||||||
btnInputAccessToken.setOnClickListener(this)
|
btnInputAccessToken.setOnClickListener(this)
|
||||||
btnAccountRemove.setOnClickListener(this)
|
btnAccountRemove.setOnClickListener(this)
|
||||||
|
btnLoadPreference.setOnClickListener(this)
|
||||||
btnVisibility.setOnClickListener(this)
|
btnVisibility.setOnClickListener(this)
|
||||||
btnUserCustom.setOnClickListener(this)
|
btnUserCustom.setOnClickListener(this)
|
||||||
btnProfileAvatar.setOnClickListener(this)
|
btnProfileAvatar.setOnClickListener(this)
|
||||||
|
@ -319,6 +329,8 @@ class ActAccountSetting
|
||||||
|
|
||||||
swNSFWOpen.setOnCheckedChangeListener(this)
|
swNSFWOpen.setOnCheckedChangeListener(this)
|
||||||
swDontShowTimeout.setOnCheckedChangeListener(this)
|
swDontShowTimeout.setOnCheckedChangeListener(this)
|
||||||
|
swExpandCW.setOnCheckedChangeListener(this)
|
||||||
|
swMarkSensitive.setOnCheckedChangeListener(this)
|
||||||
cbNotificationMention.setOnCheckedChangeListener(this)
|
cbNotificationMention.setOnCheckedChangeListener(this)
|
||||||
cbNotificationBoost.setOnCheckedChangeListener(this)
|
cbNotificationBoost.setOnCheckedChangeListener(this)
|
||||||
cbNotificationFavourite.setOnCheckedChangeListener(this)
|
cbNotificationFavourite.setOnCheckedChangeListener(this)
|
||||||
|
@ -392,6 +404,8 @@ class ActAccountSetting
|
||||||
|
|
||||||
swNSFWOpen.isChecked = a.dont_hide_nsfw
|
swNSFWOpen.isChecked = a.dont_hide_nsfw
|
||||||
swDontShowTimeout.isChecked = a.dont_show_timeout
|
swDontShowTimeout.isChecked = a.dont_show_timeout
|
||||||
|
swExpandCW.isChecked = a.expand_cw
|
||||||
|
swMarkSensitive.isChecked = a.default_sensitive
|
||||||
cbNotificationMention.isChecked = a.notification_mention
|
cbNotificationMention.isChecked = a.notification_mention
|
||||||
cbNotificationBoost.isChecked = a.notification_boost
|
cbNotificationBoost.isChecked = a.notification_boost
|
||||||
cbNotificationFavourite.isChecked = a.notification_favourite
|
cbNotificationFavourite.isChecked = a.notification_favourite
|
||||||
|
@ -444,7 +458,7 @@ class ActAccountSetting
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
updateVisibility()
|
showVisibility()
|
||||||
showAcctColor()
|
showAcctColor()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -464,6 +478,8 @@ class ActAccountSetting
|
||||||
account.visibility = visibility
|
account.visibility = visibility
|
||||||
account.dont_hide_nsfw = swNSFWOpen.isChecked
|
account.dont_hide_nsfw = swNSFWOpen.isChecked
|
||||||
account.dont_show_timeout = swDontShowTimeout.isChecked
|
account.dont_show_timeout = swDontShowTimeout.isChecked
|
||||||
|
account.expand_cw = swExpandCW.isChecked
|
||||||
|
account.default_sensitive = swMarkSensitive.isChecked
|
||||||
account.notification_mention = cbNotificationMention.isChecked
|
account.notification_mention = cbNotificationMention.isChecked
|
||||||
account.notification_boost = cbNotificationBoost.isChecked
|
account.notification_boost = cbNotificationBoost.isChecked
|
||||||
account.notification_favourite = cbNotificationFavourite.isChecked
|
account.notification_favourite = cbNotificationFavourite.isChecked
|
||||||
|
@ -501,6 +517,7 @@ class ActAccountSetting
|
||||||
R.id.btnInputAccessToken -> inputAccessToken()
|
R.id.btnInputAccessToken -> inputAccessToken()
|
||||||
|
|
||||||
R.id.btnAccountRemove -> performAccountRemove()
|
R.id.btnAccountRemove -> performAccountRemove()
|
||||||
|
R.id.btnLoadPreference -> performLoadPreference()
|
||||||
R.id.btnVisibility -> performVisibility()
|
R.id.btnVisibility -> performVisibility()
|
||||||
R.id.btnOpenBrowser -> App1.openBrowser(
|
R.id.btnOpenBrowser -> App1.openBrowser(
|
||||||
this@ActAccountSetting,
|
this@ActAccountSetting,
|
||||||
|
@ -543,7 +560,7 @@ class ActAccountSetting
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateVisibility() {
|
private fun showVisibility() {
|
||||||
btnVisibility.text = Styler.getVisibilityString(this, account.isMisskey, visibility)
|
btnVisibility.text = Styler.getVisibilityString(this, account.isMisskey, visibility)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -580,7 +597,7 @@ class ActAccountSetting
|
||||||
.setItems(caption_list) { _, which ->
|
.setItems(caption_list) { _, which ->
|
||||||
if(which in 0 until list.size) {
|
if(which in 0 until list.size) {
|
||||||
visibility = list[which]
|
visibility = list[which]
|
||||||
updateVisibility()
|
showVisibility()
|
||||||
saveUIToData()
|
saveUIToData()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -589,6 +606,60 @@ class ActAccountSetting
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun performLoadPreference() {
|
||||||
|
|
||||||
|
TootTaskRunner(this).run(account, object : TootTask {
|
||||||
|
override fun background(client : TootApiClient) : TootApiResult? {
|
||||||
|
return client.request("/api/v1/preferences")
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun handleResult(result : TootApiResult?) {
|
||||||
|
result ?: return
|
||||||
|
|
||||||
|
val json = result.jsonObject
|
||||||
|
if(json == null) {
|
||||||
|
showToast(this@ActAccountSetting, true, result.error)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var bChanged = false
|
||||||
|
try {
|
||||||
|
loading = true
|
||||||
|
|
||||||
|
val tmpVisibility =
|
||||||
|
TootVisibility.parseMastodon(json.parseString("posting:default:visibility"))
|
||||||
|
if(tmpVisibility != null) {
|
||||||
|
bChanged = true
|
||||||
|
visibility = tmpVisibility
|
||||||
|
showVisibility()
|
||||||
|
}
|
||||||
|
|
||||||
|
val tmpDefaultSensitive = json.parseBoolean("posting:default:sensitive")
|
||||||
|
if(tmpDefaultSensitive != null) {
|
||||||
|
bChanged = true
|
||||||
|
swMarkSensitive.isChecked = tmpDefaultSensitive
|
||||||
|
}
|
||||||
|
|
||||||
|
val tmpExpandMedia = json.parseString("reading:expand:media")
|
||||||
|
if(tmpExpandMedia?.isNotEmpty() == true) {
|
||||||
|
bChanged = true
|
||||||
|
swNSFWOpen.isChecked = (tmpExpandMedia == "show_all")
|
||||||
|
}
|
||||||
|
|
||||||
|
val tmpExpandCW = json.parseBoolean("reading:expand:spoilers")
|
||||||
|
if(tmpExpandCW != null) {
|
||||||
|
bChanged = true
|
||||||
|
swExpandCW.isChecked = tmpExpandCW
|
||||||
|
}
|
||||||
|
|
||||||
|
} finally {
|
||||||
|
loading = false
|
||||||
|
if(bChanged) saveUIToData()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////
|
///////////////////////////////////////////////////
|
||||||
private fun performAccountRemove() {
|
private fun performAccountRemove() {
|
||||||
AlertDialog.Builder(this)
|
AlertDialog.Builder(this)
|
||||||
|
|
|
@ -146,6 +146,8 @@ class ActMain : AppCompatActivity()
|
||||||
private lateinit var btnQuickTootMenu : ImageButton
|
private lateinit var btnQuickTootMenu : ImageButton
|
||||||
lateinit var post_helper : PostHelper
|
lateinit var post_helper : PostHelper
|
||||||
|
|
||||||
|
private var quickTootVisibility : TootVisibility = TootVisibility.AccountSetting
|
||||||
|
|
||||||
class PhoneEnv {
|
class PhoneEnv {
|
||||||
internal lateinit var pager : MyViewPager
|
internal lateinit var pager : MyViewPager
|
||||||
internal lateinit var pager_adapter : ColumnPagerAdapter
|
internal lateinit var pager_adapter : ColumnPagerAdapter
|
||||||
|
@ -722,15 +724,25 @@ class ActMain : AppCompatActivity()
|
||||||
}
|
}
|
||||||
|
|
||||||
private val dlgQuickTootMenu = DlgQuickTootMenu(this, object : DlgQuickTootMenu.Callback {
|
private val dlgQuickTootMenu = DlgQuickTootMenu(this, object : DlgQuickTootMenu.Callback {
|
||||||
|
|
||||||
|
override var visibility : TootVisibility
|
||||||
|
get() = quickTootVisibility
|
||||||
|
set(value) {
|
||||||
|
if(value != quickTootVisibility) {
|
||||||
|
quickTootVisibility = value
|
||||||
|
pref.edit().put(Pref.spQuickTootVisibility, value.id.toString()).apply()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun onMacro(text : String) {
|
override fun onMacro(text : String) {
|
||||||
val editable = etQuickToot.text
|
val editable = etQuickToot.text
|
||||||
if(editable?.isNotEmpty() ==true) {
|
if(editable?.isNotEmpty() == true) {
|
||||||
val start = etQuickToot.selectionStart
|
val start = etQuickToot.selectionStart
|
||||||
val end = etQuickToot.selectionEnd
|
val end = etQuickToot.selectionEnd
|
||||||
editable.replace(start, end, text)
|
editable.replace(start, end, text)
|
||||||
etQuickToot.requestFocus()
|
etQuickToot.requestFocus()
|
||||||
etQuickToot.setSelection(start + text.length)
|
etQuickToot.setSelection(start + text.length)
|
||||||
}else{
|
} else {
|
||||||
etQuickToot.setText(text)
|
etQuickToot.setText(text)
|
||||||
etQuickToot.requestFocus()
|
etQuickToot.requestFocus()
|
||||||
etQuickToot.setSelection(text.length)
|
etQuickToot.setSelection(text.length)
|
||||||
|
@ -779,7 +791,12 @@ class ActMain : AppCompatActivity()
|
||||||
|
|
||||||
post_helper.content = etQuickToot.text.toString().trim { it <= ' ' }
|
post_helper.content = etQuickToot.text.toString().trim { it <= ' ' }
|
||||||
post_helper.spoiler_text = null
|
post_helper.spoiler_text = null
|
||||||
post_helper.visibility = account.visibility
|
|
||||||
|
post_helper.visibility = when(quickTootVisibility) {
|
||||||
|
TootVisibility.AccountSetting -> account.visibility
|
||||||
|
else -> quickTootVisibility
|
||||||
|
}
|
||||||
|
|
||||||
post_helper.bNSFW = false
|
post_helper.bNSFW = false
|
||||||
post_helper.in_reply_to_id = null
|
post_helper.in_reply_to_id = null
|
||||||
post_helper.attachment_list = null
|
post_helper.attachment_list = null
|
||||||
|
@ -1255,7 +1272,9 @@ class ActMain : AppCompatActivity()
|
||||||
internal fun initUI() {
|
internal fun initUI() {
|
||||||
setContentView(R.layout.act_main)
|
setContentView(R.layout.act_main)
|
||||||
|
|
||||||
|
quickTootVisibility =
|
||||||
|
TootVisibility.parseSavedVisibility(Pref.spQuickTootVisibility(pref))
|
||||||
|
?: quickTootVisibility
|
||||||
|
|
||||||
Column.reloadDefaultColor(this, pref)
|
Column.reloadDefaultColor(this, pref)
|
||||||
|
|
||||||
|
@ -1912,8 +1931,8 @@ class ActMain : AppCompatActivity()
|
||||||
}
|
}
|
||||||
|
|
||||||
val (r2, ti) = client.parseInstanceInformation(client.getInstanceInformation())
|
val (r2, ti) = client.parseInstanceInformation(client.getInstanceInformation())
|
||||||
if(ti==null) return r2
|
if(ti == null) return r2
|
||||||
val misskeyVersion = when{
|
val misskeyVersion = when {
|
||||||
ti.versionGE(TootInstance.MISSKEY_VERSION_11) -> 11
|
ti.versionGE(TootInstance.MISSKEY_VERSION_11) -> 11
|
||||||
else -> 10
|
else -> 10
|
||||||
}
|
}
|
||||||
|
@ -1922,7 +1941,7 @@ class ActMain : AppCompatActivity()
|
||||||
|
|
||||||
this.host = instance
|
this.host = instance
|
||||||
val client_name = Pref.spClientName(this@ActMain)
|
val client_name = Pref.spClientName(this@ActMain)
|
||||||
val result = client.authentication2Misskey(client_name, token,misskeyVersion)
|
val result = client.authentication2Misskey(client_name, token, misskeyVersion)
|
||||||
this.ta = TootParser(
|
this.ta = TootParser(
|
||||||
this@ActMain
|
this@ActMain
|
||||||
, LinkHelper.newLinkHelper(instance, misskeyVersion = misskeyVersion)
|
, LinkHelper.newLinkHelper(instance, misskeyVersion = misskeyVersion)
|
||||||
|
@ -2071,8 +2090,6 @@ class ActMain : AppCompatActivity()
|
||||||
// アカウント追加時
|
// アカウント追加時
|
||||||
val user = ta.username + "@" + host
|
val user = ta.username + "@" + host
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
val row_id = SavedAccount.insert(
|
val row_id = SavedAccount.insert(
|
||||||
host,
|
host,
|
||||||
user,
|
user,
|
||||||
|
|
|
@ -678,6 +678,8 @@ class ActPost : AppCompatActivity(),
|
||||||
|
|
||||||
appendContentText(account?.default_text, selectBefore = true)
|
appendContentText(account?.default_text, selectBefore = true)
|
||||||
|
|
||||||
|
cbNSFW.isChecked = account?.default_sensitive ?: false
|
||||||
|
|
||||||
// 再編集
|
// 再編集
|
||||||
sv = intent.getStringExtra(KEY_REDRAFT_STATUS)
|
sv = intent.getStringExtra(KEY_REDRAFT_STATUS)
|
||||||
if(sv != null && account != null) {
|
if(sv != null && account != null) {
|
||||||
|
@ -708,6 +710,10 @@ class ActPost : AppCompatActivity(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( this.attachment_list.isNotEmpty() ) {
|
||||||
|
cbNSFW.isChecked = base_status.sensitive == true
|
||||||
|
}
|
||||||
|
|
||||||
// 再編集の場合はdefault_textは反映されない
|
// 再編集の場合はdefault_textは反映されない
|
||||||
|
|
||||||
val decodeOptions = DecodeOptions(this)
|
val decodeOptions = DecodeOptions(this)
|
||||||
|
@ -722,7 +728,7 @@ class ActPost : AppCompatActivity(),
|
||||||
etContentWarning.setText(text)
|
etContentWarning.setText(text)
|
||||||
etContentWarning.setSelection(text.length)
|
etContentWarning.setSelection(text.length)
|
||||||
cbContentWarning.isChecked = text.isNotEmpty()
|
cbContentWarning.isChecked = text.isNotEmpty()
|
||||||
cbNSFW.isChecked = base_status.sensitive == true
|
|
||||||
|
|
||||||
val src_enquete = base_status.enquete
|
val src_enquete = base_status.enquete
|
||||||
val src_items = src_enquete?.items
|
val src_items = src_enquete?.items
|
||||||
|
@ -790,7 +796,6 @@ class ActPost : AppCompatActivity(),
|
||||||
} else {
|
} else {
|
||||||
cbContentWarning.isChecked = false
|
cbContentWarning.isChecked = false
|
||||||
}
|
}
|
||||||
cbNSFW.isChecked = item.sensitive
|
|
||||||
visibility = item.visibility
|
visibility = item.visibility
|
||||||
|
|
||||||
// 2019/1/7 どうも添付データを古い投稿から引き継げないようだ…。
|
// 2019/1/7 どうも添付データを古い投稿から引き継げないようだ…。
|
||||||
|
@ -812,6 +817,9 @@ class ActPost : AppCompatActivity(),
|
||||||
log.trace(ex)
|
log.trace(ex)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if( this.attachment_list.isNotEmpty()) {
|
||||||
|
cbNSFW.isChecked = item.sensitive
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch(ex : Throwable) {
|
} catch(ex : Throwable) {
|
||||||
log.trace(ex)
|
log.trace(ex)
|
||||||
|
|
|
@ -113,8 +113,10 @@ class App1 : Application() {
|
||||||
// 2018/10/31 v296 33 => 34 UserRelationMisskey に blocked_by を追加
|
// 2018/10/31 v296 33 => 34 UserRelationMisskey に blocked_by を追加
|
||||||
// 2018/10/31 v296 34 => 35 UserRelationMisskey に requested_by を追加
|
// 2018/10/31 v296 34 => 35 UserRelationMisskey に requested_by を追加
|
||||||
// 2018/12/6 v317 35 => 36 ContentWarningテーブルの作り直し。
|
// 2018/12/6 v317 35 => 36 ContentWarningテーブルの作り直し。
|
||||||
|
// 2019/6/4 v351 36 => 37 SavedAccount テーブルに項目追加。
|
||||||
internal const val DB_VERSION = 36
|
// 2019/6/4 v351 37 => 38 SavedAccount テーブルに項目追加。
|
||||||
|
|
||||||
|
internal const val DB_VERSION = 38
|
||||||
|
|
||||||
private val tableList = arrayOf(
|
private val tableList = arrayOf(
|
||||||
LogData,
|
LogData,
|
||||||
|
|
|
@ -563,7 +563,7 @@ internal class ItemViewHolder(
|
||||||
llContentWarning.visibility = View.VISIBLE
|
llContentWarning.visibility = View.VISIBLE
|
||||||
tvContentWarning.text = decoded_spoiler_text
|
tvContentWarning.text = decoded_spoiler_text
|
||||||
spoiler_invalidator.register(decoded_spoiler_text)
|
spoiler_invalidator.register(decoded_spoiler_text)
|
||||||
val cw_shown = ContentWarning.isShown(item.uri, false)
|
val cw_shown = ContentWarning.isShown(item.uri, access_info.expand_cw)
|
||||||
showContent(cw_shown)
|
showContent(cw_shown)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1272,7 +1272,7 @@ internal class ItemViewHolder(
|
||||||
llContentWarning.visibility = View.VISIBLE
|
llContentWarning.visibility = View.VISIBLE
|
||||||
tvContentWarning.text = status.decoded_spoiler_text
|
tvContentWarning.text = status.decoded_spoiler_text
|
||||||
spoiler_invalidator.register(status.decoded_spoiler_text)
|
spoiler_invalidator.register(status.decoded_spoiler_text)
|
||||||
val cw_shown = ContentWarning.isShown(status, false)
|
val cw_shown = ContentWarning.isShown(status, access_info.expand_cw)
|
||||||
showContent(cw_shown)
|
showContent(cw_shown)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1281,7 +1281,7 @@ internal class ItemViewHolder(
|
||||||
llContentWarning.visibility = View.VISIBLE
|
llContentWarning.visibility = View.VISIBLE
|
||||||
tvContentWarning.text = r.decoded_spoiler_text
|
tvContentWarning.text = r.decoded_spoiler_text
|
||||||
spoiler_invalidator.register(r.decoded_spoiler_text)
|
spoiler_invalidator.register(r.decoded_spoiler_text)
|
||||||
val cw_shown = ContentWarning.isShown(status, false)
|
val cw_shown = ContentWarning.isShown(status, access_info.expand_cw)
|
||||||
showContent(cw_shown)
|
showContent(cw_shown)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -491,6 +491,7 @@ object Pref {
|
||||||
val spTimeZone = StringPref("TimeZone","")
|
val spTimeZone = StringPref("TimeZone","")
|
||||||
|
|
||||||
val spQuickTootMacro = StringPref("QuickTootMacro","")
|
val spQuickTootMacro = StringPref("QuickTootMacro","")
|
||||||
|
val spQuickTootVisibility = StringPref("QuickTootVisibility","")
|
||||||
|
|
||||||
// long
|
// long
|
||||||
val lpTabletTootDefaultAccount = LongPref("tablet_toot_default_account", - 1L)
|
val lpTabletTootDefaultAccount = LongPref("tablet_toot_default_account", - 1L)
|
||||||
|
|
|
@ -38,6 +38,7 @@ object Styler {
|
||||||
TootVisibility.DirectSpecified -> R.drawable.ic_mail
|
TootVisibility.DirectSpecified -> R.drawable.ic_mail
|
||||||
TootVisibility.DirectPrivate -> R.drawable.ic_lock
|
TootVisibility.DirectPrivate -> R.drawable.ic_lock
|
||||||
TootVisibility.WebSetting -> R.drawable.ic_question
|
TootVisibility.WebSetting -> R.drawable.ic_question
|
||||||
|
TootVisibility.AccountSetting -> R.drawable.ic_question
|
||||||
|
|
||||||
TootVisibility.LocalPublic -> R.drawable.ic_local_ltl
|
TootVisibility.LocalPublic -> R.drawable.ic_local_ltl
|
||||||
TootVisibility.LocalHome -> R.drawable.ic_local_home
|
TootVisibility.LocalHome -> R.drawable.ic_local_home
|
||||||
|
@ -51,6 +52,7 @@ object Styler {
|
||||||
TootVisibility.DirectSpecified -> R.drawable.ic_mail
|
TootVisibility.DirectSpecified -> R.drawable.ic_mail
|
||||||
TootVisibility.DirectPrivate -> R.drawable.ic_mail
|
TootVisibility.DirectPrivate -> R.drawable.ic_mail
|
||||||
TootVisibility.WebSetting -> R.drawable.ic_question
|
TootVisibility.WebSetting -> R.drawable.ic_question
|
||||||
|
TootVisibility.AccountSetting -> R.drawable.ic_question
|
||||||
|
|
||||||
TootVisibility.LocalPublic -> R.drawable.ic_local_ltl
|
TootVisibility.LocalPublic -> R.drawable.ic_local_ltl
|
||||||
TootVisibility.LocalHome -> R.drawable.ic_local_lock_open
|
TootVisibility.LocalHome -> R.drawable.ic_local_lock_open
|
||||||
|
@ -79,6 +81,7 @@ object Styler {
|
||||||
TootVisibility.DirectSpecified -> R.string.visibility_direct
|
TootVisibility.DirectSpecified -> R.string.visibility_direct
|
||||||
TootVisibility.DirectPrivate -> R.string.visibility_private
|
TootVisibility.DirectPrivate -> R.string.visibility_private
|
||||||
TootVisibility.WebSetting -> R.string.visibility_web_setting
|
TootVisibility.WebSetting -> R.string.visibility_web_setting
|
||||||
|
TootVisibility.AccountSetting-> R.string.visibility_account_setting
|
||||||
|
|
||||||
TootVisibility.LocalPublic -> R.string.visibility_local_public
|
TootVisibility.LocalPublic -> R.string.visibility_local_public
|
||||||
TootVisibility.LocalHome -> R.string.visibility_local_home
|
TootVisibility.LocalHome -> R.string.visibility_local_home
|
||||||
|
@ -91,6 +94,7 @@ object Styler {
|
||||||
TootVisibility.DirectSpecified -> R.string.visibility_direct
|
TootVisibility.DirectSpecified -> R.string.visibility_direct
|
||||||
TootVisibility.DirectPrivate -> R.string.visibility_direct
|
TootVisibility.DirectPrivate -> R.string.visibility_direct
|
||||||
TootVisibility.WebSetting -> R.string.visibility_web_setting
|
TootVisibility.WebSetting -> R.string.visibility_web_setting
|
||||||
|
TootVisibility.AccountSetting-> R.string.visibility_account_setting
|
||||||
|
|
||||||
TootVisibility.LocalPublic -> R.string.visibility_local_public
|
TootVisibility.LocalPublic -> R.string.visibility_local_public
|
||||||
TootVisibility.LocalHome -> R.string.visibility_local_unlisted
|
TootVisibility.LocalHome -> R.string.visibility_local_unlisted
|
||||||
|
|
|
@ -9,7 +9,10 @@ enum class TootVisibility(
|
||||||
) {
|
) {
|
||||||
|
|
||||||
// IDは下書き保存などで永続化するので、リリース後は変更しないこと!
|
// IDは下書き保存などで永続化するので、リリース後は変更しないこと!
|
||||||
|
|
||||||
|
// アカウント設定に合わせる。
|
||||||
|
AccountSetting(-1, 200, strMastodon = "account_setting", strMisskey = "account_setting"),
|
||||||
|
|
||||||
// WebUIの設定に合わせる。
|
// WebUIの設定に合わせる。
|
||||||
WebSetting(0, 100, strMastodon = "web_setting", strMisskey = "web_setting"),
|
WebSetting(0, 100, strMastodon = "web_setting", strMisskey = "web_setting"),
|
||||||
|
|
||||||
|
|
|
@ -1,25 +1,23 @@
|
||||||
package jp.juggler.subwaytooter.dialog
|
package jp.juggler.subwaytooter.dialog
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
|
import android.app.AlertDialog
|
||||||
import android.app.Dialog
|
import android.app.Dialog
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.WindowManager
|
import android.view.WindowManager
|
||||||
import android.widget.Button
|
import android.widget.Button
|
||||||
import android.widget.EditText
|
import android.widget.EditText
|
||||||
import jp.juggler.subwaytooter.ActMain
|
|
||||||
import jp.juggler.subwaytooter.Pref
|
|
||||||
import jp.juggler.subwaytooter.R
|
|
||||||
import jp.juggler.subwaytooter.put
|
|
||||||
import jp.juggler.util.dismissSafe
|
import jp.juggler.util.dismissSafe
|
||||||
import java.lang.ref.WeakReference
|
import java.lang.ref.WeakReference
|
||||||
import android.view.Gravity
|
import android.view.Gravity
|
||||||
|
import jp.juggler.subwaytooter.*
|
||||||
|
import jp.juggler.subwaytooter.api.entity.TootVisibility
|
||||||
|
|
||||||
class DlgQuickTootMenu(
|
class DlgQuickTootMenu(
|
||||||
internal val activity : ActMain,
|
internal val activity : ActMain,
|
||||||
internal val callback : Callback
|
internal val callback : Callback
|
||||||
) {
|
) : View.OnClickListener {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val etTextIds = arrayOf(
|
val etTextIds = arrayOf(
|
||||||
R.id.etText0,
|
R.id.etText0,
|
||||||
|
@ -37,10 +35,22 @@ class DlgQuickTootMenu(
|
||||||
R.id.btnText4,
|
R.id.btnText4,
|
||||||
R.id.btnText5
|
R.id.btnText5
|
||||||
)
|
)
|
||||||
|
|
||||||
|
val visibilityList = arrayOf(
|
||||||
|
TootVisibility.AccountSetting,
|
||||||
|
TootVisibility.WebSetting,
|
||||||
|
TootVisibility.Public,
|
||||||
|
TootVisibility.UnlistedHome,
|
||||||
|
TootVisibility.PrivateFollowers,
|
||||||
|
TootVisibility.DirectSpecified
|
||||||
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Callback {
|
interface Callback {
|
||||||
fun onMacro(text:String)
|
fun onMacro(text:String)
|
||||||
|
|
||||||
|
var visibility : TootVisibility
|
||||||
}
|
}
|
||||||
|
|
||||||
var dialogRef : WeakReference<Dialog>? = null
|
var dialogRef : WeakReference<Dialog>? = null
|
||||||
|
@ -55,17 +65,13 @@ class DlgQuickTootMenu(
|
||||||
}
|
}
|
||||||
|
|
||||||
val etText = arrayOfNulls<EditText>(6)
|
val etText = arrayOfNulls<EditText>(6)
|
||||||
|
private lateinit var btnVisibility :Button
|
||||||
|
|
||||||
@SuppressLint("InflateParams")
|
@SuppressLint("InflateParams")
|
||||||
fun show(){
|
fun show(){
|
||||||
val view = activity.layoutInflater.inflate(R.layout.dlg_quick_toot_menu, null, false)
|
val view = activity.layoutInflater.inflate(R.layout.dlg_quick_toot_menu, null, false)
|
||||||
|
|
||||||
view.findViewById<Button>(R.id.btnCancel).setOnClickListener {
|
view.findViewById<Button>(R.id.btnCancel).setOnClickListener(this)
|
||||||
val dialog = dialogRef?.get()
|
|
||||||
if( dialog != null && dialog.isShowing) {
|
|
||||||
dialog.dismissSafe()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
val btnListener :View.OnClickListener = View.OnClickListener{ v ->
|
val btnListener :View.OnClickListener = View.OnClickListener{ v ->
|
||||||
val text = etText[v.tag as? Int ?: 0]?.text?.toString()
|
val text = etText[v.tag as? Int ?: 0]?.text?.toString()
|
||||||
|
@ -90,6 +96,11 @@ class DlgQuickTootMenu(
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
btnVisibility = view.findViewById(R.id.btnVisibility)
|
||||||
|
btnVisibility.setOnClickListener(this)
|
||||||
|
|
||||||
|
showVisibility()
|
||||||
|
|
||||||
val dialog = Dialog(activity)
|
val dialog = Dialog(activity)
|
||||||
this.dialogRef = WeakReference(dialog)
|
this.dialogRef = WeakReference(dialog)
|
||||||
dialog.setCanceledOnTouchOutside(true)
|
dialog.setCanceledOnTouchOutside(true)
|
||||||
|
@ -107,6 +118,7 @@ class DlgQuickTootMenu(
|
||||||
dialog.show()
|
dialog.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private fun loadStrings() =
|
private fun loadStrings() =
|
||||||
Pref.spQuickTootMacro(activity.pref).split("\n")
|
Pref.spQuickTootMacro(activity.pref).split("\n")
|
||||||
|
|
||||||
|
@ -119,4 +131,38 @@ class DlgQuickTootMenu(
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.apply()
|
.apply()
|
||||||
|
|
||||||
|
|
||||||
|
override fun onClick(v : View?) { // TODO
|
||||||
|
when(v?.id){
|
||||||
|
|
||||||
|
R.id.btnCancel-> dialogRef?.get()?.dismissSafe()
|
||||||
|
|
||||||
|
R.id.btnVisibility -> performVisibility()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private fun performVisibility() {
|
||||||
|
|
||||||
|
val caption_list = visibilityList
|
||||||
|
.map { Styler.getVisibilityCaption(activity, false, it) }
|
||||||
|
.toTypedArray()
|
||||||
|
|
||||||
|
AlertDialog.Builder(activity)
|
||||||
|
.setTitle(R.string.choose_visibility)
|
||||||
|
.setItems(caption_list) { _, which ->
|
||||||
|
if(which in 0 until visibilityList.size) {
|
||||||
|
callback.visibility = visibilityList[which]
|
||||||
|
showVisibility()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.setNegativeButton(R.string.cancel, null)
|
||||||
|
.show()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun showVisibility() {
|
||||||
|
btnVisibility.text = Styler.getVisibilityCaption(activity,false,callback.visibility)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,6 +61,9 @@ class SavedAccount(
|
||||||
var register_time : Long = 0
|
var register_time : Long = 0
|
||||||
var default_text : String = ""
|
var default_text : String = ""
|
||||||
|
|
||||||
|
var default_sensitive = false
|
||||||
|
var expand_cw = false
|
||||||
|
|
||||||
private val refInstance = AtomicReference<TootInstance>(null)
|
private val refInstance = AtomicReference<TootInstance>(null)
|
||||||
|
|
||||||
// DBには保存しない
|
// DBには保存しない
|
||||||
|
@ -152,6 +155,9 @@ class SavedAccount(
|
||||||
this.sound_uri = cursor.getString(COL_SOUND_URI)
|
this.sound_uri = cursor.getString(COL_SOUND_URI)
|
||||||
|
|
||||||
this.default_text = cursor.getStringOrNull(COL_DEFAULT_TEXT) ?: ""
|
this.default_text = cursor.getStringOrNull(COL_DEFAULT_TEXT) ?: ""
|
||||||
|
|
||||||
|
this.default_sensitive = cursor.getBoolean(COL_DEFAULT_SENSITIVE)
|
||||||
|
this.expand_cw = cursor.getBoolean(COL_EXPAND_CW)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -211,6 +217,9 @@ class SavedAccount(
|
||||||
cv.put(COL_SOUND_URI, sound_uri)
|
cv.put(COL_SOUND_URI, sound_uri)
|
||||||
cv.put(COL_DEFAULT_TEXT, default_text)
|
cv.put(COL_DEFAULT_TEXT, default_text)
|
||||||
|
|
||||||
|
cv.put(COL_DEFAULT_SENSITIVE, default_sensitive.b2i())
|
||||||
|
cv.put(COL_EXPAND_CW, expand_cw.b2i())
|
||||||
|
|
||||||
// UIからは更新しない
|
// UIからは更新しない
|
||||||
// notification_tag
|
// notification_tag
|
||||||
// register_key
|
// register_key
|
||||||
|
@ -265,6 +274,8 @@ class SavedAccount(
|
||||||
this.notification_vote = b.notification_vote
|
this.notification_vote = b.notification_vote
|
||||||
this.notification_tag = b.notification_tag
|
this.notification_tag = b.notification_tag
|
||||||
this.default_text = b.default_text
|
this.default_text = b.default_text
|
||||||
|
this.default_sensitive = b.default_sensitive
|
||||||
|
this.expand_cw = b.expand_cw
|
||||||
|
|
||||||
this.sound_uri = b.sound_uri
|
this.sound_uri = b.sound_uri
|
||||||
}
|
}
|
||||||
|
@ -416,6 +427,9 @@ class SavedAccount(
|
||||||
// スキーマ33から
|
// スキーマ33から
|
||||||
private const val COL_NOTIFICATION_REACTION = "notification_reaction"
|
private const val COL_NOTIFICATION_REACTION = "notification_reaction"
|
||||||
private const val COL_NOTIFICATION_VOTE = "notification_vote"
|
private const val COL_NOTIFICATION_VOTE = "notification_vote"
|
||||||
|
|
||||||
|
private const val COL_DEFAULT_SENSITIVE = "default_sensitive"
|
||||||
|
private const val COL_EXPAND_CW = "expand_cw"
|
||||||
|
|
||||||
/////////////////////////////////
|
/////////////////////////////////
|
||||||
// login information
|
// login information
|
||||||
|
@ -485,6 +499,10 @@ class SavedAccount(
|
||||||
+ ",$COL_NOTIFICATION_REACTION integer default 1"
|
+ ",$COL_NOTIFICATION_REACTION integer default 1"
|
||||||
+ ",$COL_NOTIFICATION_VOTE integer default 1"
|
+ ",$COL_NOTIFICATION_VOTE integer default 1"
|
||||||
|
|
||||||
|
// スキーマ37から
|
||||||
|
+ ",$COL_DEFAULT_SENSITIVE integer default 0"
|
||||||
|
+ ",$COL_EXPAND_CW integer default 0"
|
||||||
|
|
||||||
+ ")"
|
+ ")"
|
||||||
)
|
)
|
||||||
db.execSQL("create index if not exists ${table}_user on ${table}(u)")
|
db.execSQL("create index if not exists ${table}_user on ${table}(u)")
|
||||||
|
@ -632,6 +650,19 @@ class SavedAccount(
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if(oldVersion < 38 && newVersion >= 38) {
|
||||||
|
try {
|
||||||
|
db.execSQL("alter table $table add column $COL_DEFAULT_SENSITIVE integer default 0")
|
||||||
|
} catch(ex : Throwable) {
|
||||||
|
log.trace(ex)
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
db.execSQL("alter table $table add column $COL_EXPAND_CW integer default 0")
|
||||||
|
} catch(ex : Throwable) {
|
||||||
|
log.trace(ex)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 横断検索用の、何とも紐ついていないアカウント
|
// 横断検索用の、何とも紐ついていないアカウント
|
||||||
|
|
|
@ -352,7 +352,7 @@ class PostHelper(
|
||||||
)
|
)
|
||||||
if(visibility_checked != null) {
|
if(visibility_checked != null) {
|
||||||
|
|
||||||
if(visibility_checked == TootVisibility.DirectSpecified) {
|
if(visibility_checked == TootVisibility.DirectSpecified || visibility_checked == TootVisibility.DirectPrivate ) {
|
||||||
val userIds = JSONArray()
|
val userIds = JSONArray()
|
||||||
val reMention =
|
val reMention =
|
||||||
Pattern.compile("(?:\\A|\\s)@([a-zA-Z0-9_]{1,20})(?:@([\\w.:-]+))?(?:\\z|\\s)")
|
Pattern.compile("(?:\\A|\\s)@([a-zA-Z0-9_]{1,20})(?:@([\\w.:-]+))?(?:\\z|\\s)")
|
||||||
|
@ -376,11 +376,13 @@ class PostHelper(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
json.put(
|
json.put(
|
||||||
"visibility", if(userIds.length() == 0) {
|
"visibility", when {
|
||||||
"private"
|
userIds.length() > 0 -> {
|
||||||
} else {
|
json.put("visibleUserIds", userIds)
|
||||||
json.put("visibleUserIds", userIds)
|
"specified"
|
||||||
"specified"
|
}
|
||||||
|
account.misskeyVersion >= 11 -> "specified"
|
||||||
|
else -> "private"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -116,6 +116,30 @@ fun JSONObject.parseFloatArrayList(name : String) : ArrayList<Float>? {
|
||||||
fun String.toJsonObject() = JSONObject(this)
|
fun String.toJsonObject() = JSONObject(this)
|
||||||
fun String.toJsonArray() = JSONArray(this)
|
fun String.toJsonArray() = JSONArray(this)
|
||||||
|
|
||||||
|
fun JSONObject.parseBoolean(key : String) : Boolean? {
|
||||||
|
val o = this.opt(key)
|
||||||
|
if(o == null || o == JSONObject.NULL) return null
|
||||||
|
|
||||||
|
return when(o){
|
||||||
|
is Boolean -> o
|
||||||
|
|
||||||
|
is Int -> return o != 0
|
||||||
|
is Long -> return o != 0L
|
||||||
|
is Float -> return !(o.isFinite() && o == 0f)
|
||||||
|
is Double -> return !(o.isFinite() && o == 0.0)
|
||||||
|
|
||||||
|
is String -> when(o){
|
||||||
|
"", "0","false" ,"False" -> false
|
||||||
|
else-> true
|
||||||
|
}
|
||||||
|
|
||||||
|
is JSONArray -> o.length() > 0
|
||||||
|
is JSONObject -> o.length() > 0
|
||||||
|
|
||||||
|
else -> true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fun JSONObject.parseString(key : String) : String? {
|
fun JSONObject.parseString(key : String) : String? {
|
||||||
val o = this.opt(key)
|
val o = this.opt(key)
|
||||||
return if(o == null || o == JSONObject.NULL) null else o.toString()
|
return if(o == null || o == JSONObject.NULL) null else o.toString()
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
|
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
android:fillViewport="true"
|
android:fillViewport="true"
|
||||||
android:paddingBottom="128dp"
|
|
||||||
android:paddingTop="12dp"
|
android:paddingTop="12dp"
|
||||||
|
android:paddingBottom="128dp"
|
||||||
android:scrollbarStyle="outsideOverlay"
|
android:scrollbarStyle="outsideOverlay"
|
||||||
tools:ignore="TooManyViews,Autofill"
|
tools:ignore="TooManyViews,Autofill"
|
||||||
>
|
>
|
||||||
|
@ -85,8 +85,8 @@
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/setting_row_label"
|
style="@style/setting_row_label"
|
||||||
android:text="@string/toot_default_text"
|
|
||||||
android:labelFor="@+id/etDefaultText"
|
android:labelFor="@+id/etDefaultText"
|
||||||
|
android:text="@string/toot_default_text"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<LinearLayout style="@style/setting_row_form">
|
<LinearLayout style="@style/setting_row_form">
|
||||||
|
@ -95,13 +95,12 @@
|
||||||
android:id="@+id/etDefaultText"
|
android:id="@+id/etDefaultText"
|
||||||
style="@style/setting_horizontal_stretch"
|
style="@style/setting_horizontal_stretch"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:padding="4dp"
|
|
||||||
android:inputType="textMultiLine"
|
android:inputType="textMultiLine"
|
||||||
|
android:padding="4dp"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
<View style="@style/setting_divider"/>
|
<View style="@style/setting_divider"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -222,19 +221,19 @@
|
||||||
|
|
||||||
<View style="@style/setting_divider"/>
|
<View style="@style/setting_divider"/>
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/setting_row_label"
|
style="@style/setting_row_label"
|
||||||
android:text="@string/profile_metadata"
|
android:text="@string/profile_metadata"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout style="@style/setting_row_form_fields">
|
<LinearLayout style="@style/setting_row_form_fields">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/setting_wrap"
|
style="@style/setting_wrap"
|
||||||
android:labelFor="@+id/etFieldName1"
|
android:labelFor="@+id/etFieldName1"
|
||||||
android:text="@string/field_name1"
|
android:text="@string/field_name1"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/etFieldName1"
|
android:id="@+id/etFieldName1"
|
||||||
style="@style/setting_horizontal_stretch"
|
style="@style/setting_horizontal_stretch"
|
||||||
|
@ -243,11 +242,13 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout style="@style/setting_row_form_fields">
|
<LinearLayout style="@style/setting_row_form_fields">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/setting_wrap"
|
style="@style/setting_wrap"
|
||||||
android:labelFor="@+id/etFieldValue1"
|
android:labelFor="@+id/etFieldValue1"
|
||||||
android:text="@string/field_value1"
|
android:text="@string/field_value1"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/etFieldValue1"
|
android:id="@+id/etFieldValue1"
|
||||||
style="@style/setting_horizontal_stretch"
|
style="@style/setting_horizontal_stretch"
|
||||||
|
@ -256,11 +257,13 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout style="@style/setting_row_form_fields">
|
<LinearLayout style="@style/setting_row_form_fields">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/setting_wrap"
|
style="@style/setting_wrap"
|
||||||
android:labelFor="@+id/etFieldName2"
|
android:labelFor="@+id/etFieldName2"
|
||||||
android:text="@string/field_name2"
|
android:text="@string/field_name2"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/etFieldName2"
|
android:id="@+id/etFieldName2"
|
||||||
style="@style/setting_horizontal_stretch"
|
style="@style/setting_horizontal_stretch"
|
||||||
|
@ -275,6 +278,7 @@
|
||||||
android:labelFor="@+id/etFieldValue2"
|
android:labelFor="@+id/etFieldValue2"
|
||||||
android:text="@string/field_value2"
|
android:text="@string/field_value2"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/etFieldValue2"
|
android:id="@+id/etFieldValue2"
|
||||||
style="@style/setting_horizontal_stretch"
|
style="@style/setting_horizontal_stretch"
|
||||||
|
@ -283,11 +287,13 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout style="@style/setting_row_form_fields">
|
<LinearLayout style="@style/setting_row_form_fields">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/setting_wrap"
|
style="@style/setting_wrap"
|
||||||
android:labelFor="@+id/etFieldName3"
|
android:labelFor="@+id/etFieldName3"
|
||||||
android:text="@string/field_name3"
|
android:text="@string/field_name3"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/etFieldName3"
|
android:id="@+id/etFieldName3"
|
||||||
style="@style/setting_horizontal_stretch"
|
style="@style/setting_horizontal_stretch"
|
||||||
|
@ -296,11 +302,13 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout style="@style/setting_row_form_fields">
|
<LinearLayout style="@style/setting_row_form_fields">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/setting_wrap"
|
style="@style/setting_wrap"
|
||||||
android:labelFor="@+id/etFieldValue3"
|
android:labelFor="@+id/etFieldValue3"
|
||||||
android:text="@string/field_value3"
|
android:text="@string/field_value3"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/etFieldValue3"
|
android:id="@+id/etFieldValue3"
|
||||||
style="@style/setting_horizontal_stretch"
|
style="@style/setting_horizontal_stretch"
|
||||||
|
@ -309,11 +317,13 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout style="@style/setting_row_form_fields">
|
<LinearLayout style="@style/setting_row_form_fields">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/setting_wrap"
|
style="@style/setting_wrap"
|
||||||
android:labelFor="@+id/etFieldName4"
|
android:labelFor="@+id/etFieldName4"
|
||||||
android:text="@string/field_name4"
|
android:text="@string/field_name4"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/etFieldName4"
|
android:id="@+id/etFieldName4"
|
||||||
style="@style/setting_horizontal_stretch"
|
style="@style/setting_horizontal_stretch"
|
||||||
|
@ -322,27 +332,30 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout style="@style/setting_row_form_fields">
|
<LinearLayout style="@style/setting_row_form_fields">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/setting_wrap"
|
style="@style/setting_wrap"
|
||||||
android:labelFor="@+id/etFieldValue4"
|
android:labelFor="@+id/etFieldValue4"
|
||||||
android:text="@string/field_value4"
|
android:text="@string/field_value4"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/etFieldValue4"
|
android:id="@+id/etFieldValue4"
|
||||||
style="@style/setting_horizontal_stretch"
|
style="@style/setting_horizontal_stretch"
|
||||||
android:inputType="textMultiLine"
|
android:inputType="textMultiLine"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout style="@style/setting_row_form_fields">
|
<LinearLayout style="@style/setting_row_form_fields">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/setting_horizontal_stretch"
|
style="@style/setting_horizontal_stretch"
|
||||||
android:text="@string/available_mastodon_2_4_later"
|
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:gravity="end"
|
android:gravity="end"
|
||||||
|
android:text="@string/available_mastodon_2_4_later"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/btnFields"
|
android:id="@+id/btnFields"
|
||||||
android:layout_width="48dp"
|
android:layout_width="48dp"
|
||||||
|
@ -362,53 +375,45 @@
|
||||||
android:text="@string/actions"
|
android:text="@string/actions"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<LinearLayout style="@style/setting_row_form">
|
<Button
|
||||||
|
android:id="@+id/btnOpenBrowser"
|
||||||
|
style="@style/setting_row_button"
|
||||||
|
android:ellipsize="start"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
tools:text="open http://mastodon.juggler.jp/"
|
||||||
|
/>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/btnOpenBrowser"
|
android:id="@+id/btnAccessToken"
|
||||||
style="@style/setting_horizontal_stretch"
|
style="@style/setting_row_button"
|
||||||
android:ellipsize="start"
|
android:ellipsize="start"
|
||||||
android:textAllCaps="false"
|
android:text="@string/update_access_token"
|
||||||
tools:text="open http://mastodon.juggler.jp/"
|
android:textAllCaps="false"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</LinearLayout>
|
<Button
|
||||||
|
android:id="@+id/btnInputAccessToken"
|
||||||
|
style="@style/setting_row_button"
|
||||||
|
android:ellipsize="start"
|
||||||
|
android:text="@string/input_access_token"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
/>
|
||||||
|
|
||||||
<LinearLayout style="@style/setting_row_form">
|
<Button
|
||||||
|
android:id="@+id/btnLoadPreference"
|
||||||
|
style="@style/setting_row_button"
|
||||||
|
android:ellipsize="start"
|
||||||
|
android:text="@string/load_preference_from_web_ui"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
/>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/btnAccessToken"
|
android:id="@+id/btnAccountRemove"
|
||||||
style="@style/setting_horizontal_stretch"
|
style="@style/setting_row_button"
|
||||||
android:ellipsize="start"
|
android:ellipsize="start"
|
||||||
android:text="@string/update_access_token"
|
android:text="@string/account_remove"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout style="@style/setting_row_form">
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/btnInputAccessToken"
|
|
||||||
style="@style/setting_horizontal_stretch"
|
|
||||||
android:ellipsize="start"
|
|
||||||
android:text="@string/input_access_token"
|
|
||||||
android:textAllCaps="false"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout style="@style/setting_row_form">
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/btnAccountRemove"
|
|
||||||
style="@style/setting_horizontal_stretch"
|
|
||||||
android:ellipsize="start"
|
|
||||||
android:text="@string/account_remove"
|
|
||||||
android:textAllCaps="false"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View style="@style/setting_divider"/>
|
<View style="@style/setting_divider"/>
|
||||||
|
|
||||||
|
@ -428,6 +433,27 @@
|
||||||
|
|
||||||
<View style="@style/setting_divider"/>
|
<View style="@style/setting_divider"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/setting_row_label"
|
||||||
|
android:text="@string/mark_sensitive_by_default"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<LinearLayout style="@style/setting_row_form">
|
||||||
|
|
||||||
|
<Switch
|
||||||
|
android:id="@+id/swMarkSensitive"
|
||||||
|
style="@style/setting_wrap"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View style="@style/setting_divider"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/setting_row_label"
|
style="@style/setting_row_label"
|
||||||
android:text="@string/sensitive_content_default_open"
|
android:text="@string/sensitive_content_default_open"
|
||||||
|
@ -449,6 +475,27 @@
|
||||||
|
|
||||||
<View style="@style/setting_divider"/>
|
<View style="@style/setting_divider"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/setting_row_label"
|
||||||
|
android:text="@string/cw_default_open"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<LinearLayout style="@style/setting_row_form">
|
||||||
|
|
||||||
|
<Switch
|
||||||
|
android:id="@+id/swExpandCW"
|
||||||
|
style="@style/setting_wrap"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View style="@style/setting_divider"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/setting_row_label"
|
style="@style/setting_row_label"
|
||||||
android:text="@string/dont_show_timeout"
|
android:text="@string/dont_show_timeout"
|
||||||
|
@ -597,6 +644,7 @@
|
||||||
android:text="@string/follow"
|
android:text="@string/follow"
|
||||||
/>
|
/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout style="@style/setting_row_form">
|
<LinearLayout style="@style/setting_row_form">
|
||||||
|
|
||||||
<CheckBox
|
<CheckBox
|
||||||
|
@ -605,6 +653,7 @@
|
||||||
android:text="@string/reaction"
|
android:text="@string/reaction"
|
||||||
/>
|
/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout style="@style/setting_row_form">
|
<LinearLayout style="@style/setting_row_form">
|
||||||
|
|
||||||
<CheckBox
|
<CheckBox
|
||||||
|
@ -613,6 +662,7 @@
|
||||||
android:text="@string/vote_polls"
|
android:text="@string/vote_polls"
|
||||||
/>
|
/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout style="@style/setting_row_form">
|
<LinearLayout style="@style/setting_row_form">
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
|
|
@ -25,6 +25,27 @@
|
||||||
android:paddingBottom="3dp"
|
android:paddingBottom="3dp"
|
||||||
>
|
>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/visibility"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/btnVisibility"
|
||||||
|
android:gravity="start|center_vertical"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/fixed_phrase"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -162,6 +183,8 @@
|
||||||
android:text="@string/input"
|
android:text="@string/input"
|
||||||
/>
|
/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</jp.juggler.subwaytooter.view.MaxHeightScrollView>
|
</jp.juggler.subwaytooter.view.MaxHeightScrollView>
|
||||||
|
@ -179,7 +202,7 @@
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="@string/cancel"
|
android:text="@string/close"
|
||||||
/>
|
/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -632,7 +632,11 @@
|
||||||
<string name="send_message">メッセージを送る</string>
|
<string name="send_message">メッセージを送る</string>
|
||||||
<string name="send_message_from_another_account">別アカウントでメッセージを送る</string>
|
<string name="send_message_from_another_account">別アカウントでメッセージを送る</string>
|
||||||
<string name="send_text">テキストをアプリに送る</string>
|
<string name="send_text">テキストをアプリに送る</string>
|
||||||
|
|
||||||
<string name="sensitive_content_default_open">NSFWな添付データを隠さない</string>
|
<string name="sensitive_content_default_open">NSFWな添付データを隠さない</string>
|
||||||
|
<string name="cw_default_open">CWされたコンテンツを隠さない</string>
|
||||||
|
|
||||||
|
|
||||||
<string name="server_confirmed">サーバを確認しました</string>
|
<string name="server_confirmed">サーバを確認しました</string>
|
||||||
<string name="set_description">説明文を設定(マストドン2.0以降)</string>
|
<string name="set_description">説明文を設定(マストドン2.0以降)</string>
|
||||||
<string name="set_focus_point">焦点を設定 (マストドン2.3以降)</string>
|
<string name="set_focus_point">焦点を設定 (マストドン2.3以降)</string>
|
||||||
|
@ -743,6 +747,7 @@
|
||||||
<string name="visibility_style_by_account">カラムのアカウントに合わせる</string>
|
<string name="visibility_style_by_account">カラムのアカウントに合わせる</string>
|
||||||
<string name="visibility_unlisted">未収載</string>
|
<string name="visibility_unlisted">未収載</string>
|
||||||
<string name="visibility_web_setting">Webアプリの設定に追従する</string>
|
<string name="visibility_web_setting">Webアプリの設定に追従する</string>
|
||||||
|
<string name="visibility_account_setting">アカウントの設定に追従する</string>
|
||||||
|
|
||||||
<string name="visibility_local_public">公開 (ローカル)</string>
|
<string name="visibility_local_public">公開 (ローカル)</string>
|
||||||
<string name="visibility_local_home">ホーム (ローカル)</string>
|
<string name="visibility_local_home">ホーム (ローカル)</string>
|
||||||
|
@ -894,5 +899,8 @@
|
||||||
<string name="input">入力</string>
|
<string name="input">入力</string>
|
||||||
<string name="polls_choice_not_selected">1つ以上の項目を選んでください。</string>
|
<string name="polls_choice_not_selected">1つ以上の項目を選んでください。</string>
|
||||||
<string name="custom_emoji_separator_zwsp">カスタム絵文字の区切りにゼロ幅空白を使う</string>
|
<string name="custom_emoji_separator_zwsp">カスタム絵文字の区切りにゼロ幅空白を使う</string>
|
||||||
|
<string name="fixed_phrase">定型文</string>
|
||||||
|
<string name="mark_sensitive_by_default">メディアを常に閲覧注意としてマークする(投稿時)</string>
|
||||||
|
<string name="load_preference_from_web_ui">WebUIの設定をいくつか読み込む</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -64,6 +64,7 @@
|
||||||
<string name="visibility_private">Followers-only</string>
|
<string name="visibility_private">Followers-only</string>
|
||||||
<string name="visibility_direct">Direct</string>
|
<string name="visibility_direct">Direct</string>
|
||||||
<string name="visibility_web_setting">Trace web app setting</string>
|
<string name="visibility_web_setting">Trace web app setting</string>
|
||||||
|
<string name="visibility_account_setting">Trace account setting</string>
|
||||||
<string name="visibility_local_public">Public (local)</string>
|
<string name="visibility_local_public">Public (local)</string>
|
||||||
<string name="visibility_local_home">Home (local)</string>
|
<string name="visibility_local_home">Home (local)</string>
|
||||||
<string name="visibility_local_followers">Followers-only (local)</string>
|
<string name="visibility_local_followers">Followers-only (local)</string>
|
||||||
|
@ -99,7 +100,9 @@
|
||||||
<string name="actions">Actions</string>
|
<string name="actions">Actions</string>
|
||||||
<string name="default_status_visibility">Default toot visibility</string>
|
<string name="default_status_visibility">Default toot visibility</string>
|
||||||
<string name="confirm_before_boost">Confirm before boosting</string>
|
<string name="confirm_before_boost">Confirm before boosting</string>
|
||||||
<string name="sensitive_content_default_open">Always open sensitive content</string>
|
<string name="sensitive_content_default_open">Showing sensitive attachments by default</string>
|
||||||
|
<string name="cw_default_open">Expand CWed content by default</string>
|
||||||
|
|
||||||
<string name="user">User</string>
|
<string name="user">User</string>
|
||||||
<string name="confirm_account_remove">This account will be deleted and all the columns will be removed.\nAre you sure?</string>
|
<string name="confirm_account_remove">This account will be deleted and all the columns will be removed.\nAre you sure?</string>
|
||||||
<string name="user_name_not_match">Username doesn\'t match</string>
|
<string name="user_name_not_match">Username doesn\'t match</string>
|
||||||
|
@ -889,5 +892,8 @@
|
||||||
<string name="input">Input</string>
|
<string name="input">Input</string>
|
||||||
<string name="polls_choice_not_selected">Please select 1 or more choices.</string>
|
<string name="polls_choice_not_selected">Please select 1 or more choices.</string>
|
||||||
<string name="custom_emoji_separator_zwsp">use ZWSP instead of space for custom emoji separator</string>
|
<string name="custom_emoji_separator_zwsp">use ZWSP instead of space for custom emoji separator</string>
|
||||||
|
<string name="fixed_phrase">fixed phrase</string>
|
||||||
|
<string name="mark_sensitive_by_default">Always mark media as sensitive (when posting)</string>
|
||||||
|
<string name="load_preference_from_web_ui">Load some preferences from WebUI</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
Loading…
Reference in New Issue