クラッシュレポート対応
This commit is contained in:
parent
1d91ae1b0b
commit
e22928e142
@ -941,6 +941,9 @@ class ActAccountSetting
|
|||||||
var profile_busy : Boolean = false
|
var profile_busy : Boolean = false
|
||||||
|
|
||||||
internal fun showProfile(src : TootAccount) {
|
internal fun showProfile(src : TootAccount) {
|
||||||
|
|
||||||
|
if( isDestroyed ) return
|
||||||
|
|
||||||
profile_busy = true
|
profile_busy = true
|
||||||
try {
|
try {
|
||||||
ivProfileAvatar.setImageUrl(
|
ivProfileAvatar.setImageUrl(
|
||||||
@ -997,6 +1000,8 @@ class ActAccountSetting
|
|||||||
if(src.source?.fields != null) {
|
if(src.source?.fields != null) {
|
||||||
val fields = src.source.fields
|
val fields = src.source.fields
|
||||||
listEtFieldName.forEachIndexed { i, et ->
|
listEtFieldName.forEachIndexed { i, et ->
|
||||||
|
val handler =et.handler // may null
|
||||||
|
if( handler != null){
|
||||||
// いつからかfields name にもカスタム絵文字が使えるようになった
|
// いつからかfields name にもカスタム絵文字が使えるようになった
|
||||||
// https://github.com/tootsuite/mastodon/pull/11350
|
// https://github.com/tootsuite/mastodon/pull/11350
|
||||||
// しかし
|
// しかし
|
||||||
@ -1008,11 +1013,14 @@ class ActAccountSetting
|
|||||||
)
|
)
|
||||||
et.setText(text)
|
et.setText(text)
|
||||||
et.isEnabled = true
|
et.isEnabled = true
|
||||||
val invalidator = NetworkEmojiInvalidator(et.handler, et)
|
val invalidator = NetworkEmojiInvalidator(handler, et)
|
||||||
invalidator.register(text)
|
invalidator.register(text)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
listEtFieldValue.forEachIndexed { i, et ->
|
listEtFieldValue.forEachIndexed { i, et ->
|
||||||
|
val handler =et.handler // may null
|
||||||
|
if( handler != null){
|
||||||
val text = decodeOptions.decodeEmoji(
|
val text = decodeOptions.decodeEmoji(
|
||||||
when {
|
when {
|
||||||
i >= fields.size -> ""
|
i >= fields.size -> ""
|
||||||
@ -1021,14 +1029,17 @@ class ActAccountSetting
|
|||||||
)
|
)
|
||||||
et.setText(text)
|
et.setText(text)
|
||||||
et.isEnabled = true
|
et.isEnabled = true
|
||||||
val invalidator = NetworkEmojiInvalidator(et.handler, et)
|
val invalidator = NetworkEmojiInvalidator(handler, et)
|
||||||
invalidator.register(text)
|
invalidator.register(text)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
val fields = src.fields
|
val fields = src.fields
|
||||||
|
|
||||||
listEtFieldName.forEachIndexed { i, et ->
|
listEtFieldName.forEachIndexed { i, et ->
|
||||||
|
val handler =et.handler // may null
|
||||||
|
if( handler != null){
|
||||||
// いつからかfields name にもカスタム絵文字が使えるようになった
|
// いつからかfields name にもカスタム絵文字が使えるようになった
|
||||||
// https://github.com/tootsuite/mastodon/pull/11350
|
// https://github.com/tootsuite/mastodon/pull/11350
|
||||||
val text = decodeOptions.decodeEmoji(
|
val text = decodeOptions.decodeEmoji(
|
||||||
@ -1039,11 +1050,15 @@ class ActAccountSetting
|
|||||||
)
|
)
|
||||||
et.setText(text)
|
et.setText(text)
|
||||||
et.isEnabled = true
|
et.isEnabled = true
|
||||||
val invalidator = NetworkEmojiInvalidator(et.handler, et)
|
val invalidator = NetworkEmojiInvalidator(handler, et)
|
||||||
invalidator.register(text)
|
invalidator.register(text)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
listEtFieldValue.forEachIndexed { i, et ->
|
listEtFieldValue.forEachIndexed { i, et ->
|
||||||
|
val handler =et.handler // may null
|
||||||
|
if( handler != null){
|
||||||
val text = decodeOptions.decodeHTML(
|
val text = decodeOptions.decodeHTML(
|
||||||
when {
|
when {
|
||||||
fields == null || i >= fields.size -> ""
|
fields == null || i >= fields.size -> ""
|
||||||
@ -1052,10 +1067,11 @@ class ActAccountSetting
|
|||||||
)
|
)
|
||||||
et.text = text
|
et.text = text
|
||||||
et.isEnabled = true
|
et.isEnabled = true
|
||||||
val invalidator = NetworkEmojiInvalidator(et.handler, et)
|
val invalidator = NetworkEmojiInvalidator(handler, et)
|
||||||
invalidator.register(text)
|
invalidator.register(text)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
profile_busy = false
|
profile_busy = false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user