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