アカウントの投稿取得時に必要ならexclude_repliesとexclude_reblogsオプションを使う。「周辺のアカウントTL」の差分取得のバグ修正。
This commit is contained in:
parent
0e7c713f46
commit
b6e2e1b1c5
@ -84,8 +84,7 @@ class Column(
|
|||||||
private const val PATH_LOCAL = "/api/v1/timelines/public?limit=$READ_LIMIT&local=true"
|
private const val PATH_LOCAL = "/api/v1/timelines/public?limit=$READ_LIMIT&local=true"
|
||||||
private const val PATH_TL_FEDERATE = "/api/v1/timelines/public?limit=$READ_LIMIT"
|
private const val PATH_TL_FEDERATE = "/api/v1/timelines/public?limit=$READ_LIMIT"
|
||||||
private const val PATH_FAVOURITES = "/api/v1/favourites?limit=$READ_LIMIT"
|
private const val PATH_FAVOURITES = "/api/v1/favourites?limit=$READ_LIMIT"
|
||||||
private const val PATH_ACCOUNT_STATUSES =
|
|
||||||
"/api/v1/accounts/%s/statuses?limit=$READ_LIMIT" // 1:account_id
|
|
||||||
private const val PATH_LIST_TL = "/api/v1/timelines/list/%s?limit=$READ_LIMIT"
|
private const val PATH_LIST_TL = "/api/v1/timelines/list/%s?limit=$READ_LIMIT"
|
||||||
|
|
||||||
// アカウントのリストを返すAPI
|
// アカウントのリストを返すAPI
|
||||||
@ -2622,13 +2621,7 @@ class Column(
|
|||||||
// ↑のトゥートのアカウントのID
|
// ↑のトゥートのアカウントのID
|
||||||
profile_id = target_status.account.id
|
profile_id = target_status.account.id
|
||||||
|
|
||||||
var path = String.format(
|
val path = makeProfileStatusesUrl(profile_id)
|
||||||
Locale.JAPAN,
|
|
||||||
PATH_ACCOUNT_STATUSES,
|
|
||||||
profile_id
|
|
||||||
)
|
|
||||||
if(with_attachment && ! with_highlight) path += "&only_media=1"
|
|
||||||
|
|
||||||
idOld = null
|
idOld = null
|
||||||
idRecent = null
|
idRecent = null
|
||||||
|
|
||||||
@ -2858,12 +2851,7 @@ class Column(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var path = String.format(
|
val path = makeProfileStatusesUrl(profile_id)
|
||||||
Locale.JAPAN,
|
|
||||||
PATH_ACCOUNT_STATUSES,
|
|
||||||
profile_id
|
|
||||||
)
|
|
||||||
if(with_attachment && ! with_highlight) path += "&only_media=1"
|
|
||||||
|
|
||||||
if(instance?.versionGE(TootInstance.VERSION_1_6) == true
|
if(instance?.versionGE(TootInstance.VERSION_1_6) == true
|
||||||
// 将来的に正しく判定できる見込みがないので、Pleroma条件でのフィルタは行わない
|
// 将来的に正しく判定できる見込みがないので、Pleroma条件でのフィルタは行わない
|
||||||
@ -3417,6 +3405,15 @@ class Column(
|
|||||||
task.executeOnExecutor(App1.task_executor)
|
task.executeOnExecutor(App1.task_executor)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// mastodon用
|
||||||
|
private fun makeProfileStatusesUrl(profile_id : EntityId?) : String {
|
||||||
|
var path ="/api/v1/accounts/$profile_id/statuses?limit=$READ_LIMIT"
|
||||||
|
if(with_attachment && ! with_highlight) path += "&only_media=1"
|
||||||
|
if(dont_show_boost) path += "&exclude_reblogs=1"
|
||||||
|
if(dont_show_reply) path += "&exclude_replies=1"
|
||||||
|
return path
|
||||||
|
}
|
||||||
|
|
||||||
private var bMinIdMatched : Boolean = false
|
private var bMinIdMatched : Boolean = false
|
||||||
|
|
||||||
private fun parseRange(
|
private fun parseRange(
|
||||||
@ -4784,19 +4781,11 @@ class Column(
|
|||||||
}
|
}
|
||||||
|
|
||||||
TYPE_ACCOUNT_AROUND -> {
|
TYPE_ACCOUNT_AROUND -> {
|
||||||
var s = String.format(
|
val path = makeProfileStatusesUrl(profile_id)
|
||||||
Locale.JAPAN,
|
|
||||||
PATH_ACCOUNT_STATUSES,
|
|
||||||
profile_id
|
|
||||||
)
|
|
||||||
if(with_attachment && ! with_highlight) s += "&only_media=1"
|
|
||||||
getStatusList(client, s)
|
|
||||||
|
|
||||||
if(bBottom) {
|
if(bBottom) {
|
||||||
getStatusList(client, s)
|
getStatusList(client, path)
|
||||||
} else {
|
} else {
|
||||||
val rv =
|
val rv = getStatusList(client, path, aroundMin = true)
|
||||||
getStatusList(client, s, aroundMin = true)
|
|
||||||
list_tmp?.sortBy { it.getOrderId() }
|
list_tmp?.sortBy { it.getOrderId() }
|
||||||
list_tmp?.reverse()
|
list_tmp?.reverse()
|
||||||
rv
|
rv
|
||||||
@ -4884,13 +4873,7 @@ class Column(
|
|||||||
misskeyParams = makeMisskeyParamsProfileStatuses(parser)
|
misskeyParams = makeMisskeyParamsProfileStatuses(parser)
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
var s = String.format(
|
getStatusList(client, makeProfileStatusesUrl(profile_id))
|
||||||
Locale.JAPAN,
|
|
||||||
PATH_ACCOUNT_STATUSES,
|
|
||||||
profile_id
|
|
||||||
)
|
|
||||||
if(with_attachment && ! with_highlight) s += "&only_media=1"
|
|
||||||
getStatusList(client, s)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5976,14 +5959,7 @@ class Column(
|
|||||||
if(access_info.isPseudo) {
|
if(access_info.isPseudo) {
|
||||||
client.request(PATH_INSTANCE)
|
client.request(PATH_INSTANCE)
|
||||||
} else {
|
} else {
|
||||||
var s =
|
getStatusList(client, makeProfileStatusesUrl(profile_id))
|
||||||
String.format(
|
|
||||||
Locale.JAPAN,
|
|
||||||
PATH_ACCOUNT_STATUSES,
|
|
||||||
profile_id
|
|
||||||
)
|
|
||||||
if(with_attachment && ! with_highlight) s += "&only_media=1"
|
|
||||||
getStatusList(client, s)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user