APIの呼び方が悪かったのを修正。ユーザ別ハッシュタグカラムを用意した

This commit is contained in:
tateisu 2019-04-04 11:20:24 +09:00
parent 7a12952260
commit a48419ef42
3 changed files with 19 additions and 16 deletions

View File

@ -6402,7 +6402,7 @@ class Column(
return when(column_type) {
TYPE_HOME, TYPE_MISSKEY_HYBRID, TYPE_PROFILE, TYPE_NOTIFICATIONS, TYPE_LIST_TL -> true
TYPE_LOCAL, TYPE_FEDERATE, TYPE_HASHTAG, TYPE_SEARCH -> isMisskey
TYPE_HASHTAG_FROM_ACCT -> true
TYPE_HASHTAG_FROM_ACCT -> false
TYPE_CONVERSATION, TYPE_DIRECT_MESSAGES -> isMisskey
else -> false
}
@ -6413,6 +6413,7 @@ class Column(
return when(column_type) {
TYPE_HOME, TYPE_MISSKEY_HYBRID, TYPE_PROFILE, TYPE_NOTIFICATIONS, TYPE_LIST_TL, TYPE_DIRECT_MESSAGES -> true
TYPE_LOCAL, TYPE_FEDERATE, TYPE_HASHTAG, TYPE_SEARCH -> isMisskey
TYPE_HASHTAG_FROM_ACCT -> true
else -> false
}
}
@ -7131,9 +7132,9 @@ class Column(
profile_id = whoRef.get().id
}
val sb = StringBuilder("/api/v1/accounts/${profile_id}/statuses?tagged=")
.append(hashtag.encodePercent())
val sb = StringBuilder("/api/v1/accounts/${profile_id}/statuses")
.append("?limit=").append(READ_LIMIT)
.append("&tagged=").append(hashtag.encodePercent())
if(with_attachment) sb.append("&only_media=true")
if(instance_local) sb.append("&local=true")

View File

@ -37,19 +37,19 @@ object Action_HashTag {
// https://mastodon.juggler.jp/@tateisu/101865456016473337
// 一時的に使えなくする
// if( whoAcct != null ){
// val(username,instance)=whoAcct.split('@')
// d.addAction(AcctColor.getStringWithNickname(activity, R.string.open_hashtag_from_account ,whoAcct)) {
// timelineOtherInstance(
// activity,
// pos,
// "https://${instance}/@${username}/tagged/${ tag_without_sharp.encodePercent()}",
// host,
// tag_without_sharp,
// whoAcct
// )
// }
// }
if( whoAcct != null ){
val(username,instance)=whoAcct.split('@')
d.addAction(AcctColor.getStringWithNickname(activity, R.string.open_hashtag_from_account ,whoAcct)) {
timelineOtherInstance(
activity,
pos,
"https://${instance}/@${username}/tagged/${ tag_without_sharp.encodePercent()}",
host,
tag_without_sharp,
whoAcct
)
}
}
d.addAction(activity.getString(R.string.open_in_browser)) {

View File

@ -886,5 +886,7 @@
<string name="vote_button">投票</string>
<string name="end_of_polling_from">%1$sの調査の終了</string>
<string name="open_hashtag_from_account">(%1$sからの)ハッシュタグのカラムを開く</string>
<string name="hashtag_from_acct">Hashtag from account</string>
<string name="hashtag_of_from">Hashtag :#%1$s (%2$sから)</string>
</resources>