コード整形
This commit is contained in:
parent
1026983132
commit
0535901aea
@ -56,6 +56,7 @@ fun isAndroid7TlsBug(errorText: String) =
|
||||
* - 選択されたアクションに応じて分岐する。
|
||||
*/
|
||||
fun ActMain.accountAdd() {
|
||||
@Suppress("UNUSED_ANONYMOUS_PARAMETER")
|
||||
showLoginForm { dialogHost, apiHost, serverInfo, action ->
|
||||
launchMain {
|
||||
try {
|
||||
|
@ -1,6 +1,5 @@
|
||||
package jp.juggler.subwaytooter.actpost
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import android.text.Spannable
|
||||
@ -26,7 +25,7 @@ fun ActPost.resetMushroom() {
|
||||
states.mushroomEnd = 0
|
||||
}
|
||||
|
||||
fun ActPost.openPluginList(){
|
||||
fun ActPost.openPluginList() {
|
||||
val url = "https://github.com/tateisu/SubwayTooter/wiki/Simeji-Mushroom-Plugins"
|
||||
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url)))
|
||||
}
|
||||
|
@ -1008,7 +1008,9 @@ class TootStatus(
|
||||
|
||||
// kmy.blue拡張
|
||||
// https://github.com/kmycode/mastodon/wiki/%E3%83%A1%E3%83%87%E3%82%A3%E3%82%A2%E6%8B%A1%E5%BC%B5API
|
||||
parseListOrNull( src.jsonArray("media_attachments_ex")) {
|
||||
// そのうちなくなるらしい
|
||||
// https://kmy.blue/@askyq/110241555669354847
|
||||
parseListOrNull(src.jsonArray("media_attachments_ex")) {
|
||||
tootAttachment(parser, it)
|
||||
}?.notEmpty()?.let {
|
||||
when (val list = media_attachments) {
|
||||
|
@ -243,6 +243,7 @@ class PostImpl(
|
||||
json["visibleUserIds"] = userIds
|
||||
"specified"
|
||||
}
|
||||
|
||||
account.misskeyVersion >= 11 -> "specified"
|
||||
else -> "private"
|
||||
}
|
||||
@ -322,15 +323,15 @@ class PostImpl(
|
||||
add(a.id.toString())
|
||||
}
|
||||
}
|
||||
attachmentList.mapNotNull {a->
|
||||
attachmentList.mapNotNull { a ->
|
||||
buildJsonObject {
|
||||
put("id",a.id.toString())
|
||||
a.updateDescription?.let{ put("description",it)}
|
||||
a.updateThumbnail?.let{ put("thumbnail",it)}
|
||||
a.updateFocus?.let{ put("focus",it)}
|
||||
}.takeIf { it.keys.size >= 2 }
|
||||
}.let{
|
||||
json["media_attributes"] = it.toJsonArray()
|
||||
put("id", a.id.toString())
|
||||
a.updateDescription?.let { put("description", it) }
|
||||
a.updateThumbnail?.let { put("thumbnail", it) }
|
||||
a.updateFocus?.let { put("focus", it) }
|
||||
}.takeIf { it.keys.size >= 2 }
|
||||
}.notEmpty()?.toJsonArray()?.let {
|
||||
json["media_attributes"] = it
|
||||
}
|
||||
}
|
||||
|
||||
@ -586,6 +587,7 @@ class PostImpl(
|
||||
when {
|
||||
account.isMisskey -> jsonObject?.jsonObject("createdNote")
|
||||
?: jsonObject
|
||||
|
||||
else -> jsonObject
|
||||
}
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user