tateisu
tateisu
it's composition of 2 problem. The first is lack of spread operator `*` where the code that app showing error, it method receives `vararg args :Any?` and pass to `...
Mastodon seems to have changed the number of characters in the voting options from 25 to 40. ST did not follow it. it's fixed at https://github.com/tateisu/SubwayTooter/commit/238845284af1fb71b29a38d0d4322faa47062f56
今はダウンロード処理をまるっとDownloadManagerに投げてるだけなんですよね…。 https://developer.android.com/reference/android/app/DownloadManager オプションで保存先フォルダが指定されてる時だけ自前でダウンロードしてそこに出力するとかしたら出来るだろうけど、動画とかMisskeyとかだと巨大なデータがありうるので、アプリがバックグラウンドになった後の動作制限に対応するため結局DownloadManagerと同等の処理を自前実装しないといけないので、やや高コストだと思います。
発想をかえて「ダウンロード自体はDownloadManagerに任せる。完了イベントを受け取ったらファイルを移動する」というのも検討してみましょう。あれ、でもファイルの移動に時間がかかる(onReceive内部に収まらない)ならサービスを書くのは一緒だからダウンロード処理だけ節約しても工数かわんないな…?
https://developer.android.com/reference/android/app/DownloadManager.Request.html#setDestinationUri(android.net.Uri) DownloadManagerに出力先のpathを指定するAPIはあるが、Android Q で増えた制限を見ると出力先にSDカード等は指定できなくなった。
https://github.com/tateisu/SubwayTooter/releases/tag/v4.9.0
I couldn't fix this problem well because I didn't saw it myself. I think it's probably due to my Misskey usage pattern. In version 4.9.3, SubwayTooter no longer checks notifications...
https://github.com/misskey-dev/misskey/issues/8906#issuecomment-1177921071 にコメントしましたが、 - (A) STはPushメッセージを受け取ると通知APIにアクセスする - (B) Misskeyは通知APIにアクセスするとPushメッセージを出すようになった というのが今回の問題の真相です。(B)が出すPushメッセージは本当に必要なものなのでしょうか。たとえば未読位置が実際には変化していないのに「未読を更新しました」など送ってたりしませんか。 @tamaina
https://github.com/tateisu/SubwayTooter/releases/tag/v4.9.4
4.9.4で行った変更の動作確認。 自宅鯖にログ出力を追加して ``` --- a/packages/backend/src/server/api/endpoints/i/notifications.ts +++ b/packages/backend/src/server/api/endpoints/i/notifications.ts @@ -115,6 +115,7 @@ export default define(meta, paramDef, async (ps, user) => { const notifications = await query.take(ps.limit).getMany(); // Mark all as read...