Pixelfedが無効な場合にPull通知チェックが誤動作しないようにする

This commit is contained in:
tateisu 2019-10-02 18:51:11 +09:00
parent 0d17718402
commit ec4c3c5dd8
1 changed files with 6 additions and 3 deletions

View File

@ -25,6 +25,7 @@ import jp.juggler.subwaytooter.api.TootApiCallback
import jp.juggler.subwaytooter.api.TootApiClient
import jp.juggler.subwaytooter.api.TootParser
import jp.juggler.subwaytooter.api.entity.EntityId
import jp.juggler.subwaytooter.api.entity.TootInstance
import jp.juggler.subwaytooter.api.entity.TootNotification
import jp.juggler.subwaytooter.api.entity.TootStatus
import jp.juggler.subwaytooter.table.*
@ -806,7 +807,6 @@ class PollingWorker private constructor(contextArg : Context) {
log.d(")JobItem.run jobId=${jobId}, cancel=${isJobCancelled}")
}
}
internal inner class TaskRunner {
@ -1082,6 +1082,9 @@ class PollingWorker private constructor(contextArg : Context) {
// 未確認アカウントはチェック対象外
if(! account.isConfirmed) return
val (_, instance) = TootInstance.get(client)
if(instance == null) return
client.account = account
val wps = PushSubscriptionHelper(context, account)