mirror of
https://github.com/tateisu/SubwayTooter
synced 2025-02-07 06:04:23 +01:00
アクセストークン更新したらプッシュ購読の更新も行う
This commit is contained in:
parent
03ed016c5e
commit
e2716d4741
@ -35,10 +35,7 @@ import jp.juggler.subwaytooter.span.MyClickableSpan
|
||||
import jp.juggler.subwaytooter.span.MyClickableSpanClickCallback
|
||||
import jp.juggler.subwaytooter.table.AcctColor
|
||||
import jp.juggler.subwaytooter.table.SavedAccount
|
||||
import jp.juggler.subwaytooter.util.ChromeTabOpener
|
||||
import jp.juggler.subwaytooter.util.EmptyCallback
|
||||
import jp.juggler.subwaytooter.util.LinkHelper
|
||||
import jp.juggler.subwaytooter.util.PostHelper
|
||||
import jp.juggler.subwaytooter.util.*
|
||||
import jp.juggler.subwaytooter.view.*
|
||||
import jp.juggler.util.*
|
||||
import org.apache.commons.io.IOUtils
|
||||
@ -2005,6 +2002,7 @@ class ActMain : AppCompatActivity()
|
||||
}
|
||||
|
||||
// 通知の更新が必要かもしれない
|
||||
PushSubscriptionHelper.clearLastCheck(sa)
|
||||
PollingWorker.queueUpdateNotification(this@ActMain)
|
||||
return true
|
||||
}
|
||||
|
@ -30,8 +30,14 @@ class PushSubscriptionHelper(
|
||||
"Push subscription is not needed. we can't do check current subscription state, and unsubscribe it."
|
||||
const val ERROR_PREVENT_FREQUENTLY_CHECK = "prevent frequently subscription check."
|
||||
|
||||
fun clearLastCheck(account : SavedAccount){
|
||||
synchronized(lastCheckedMap){
|
||||
lastCheckedMap.remove(account.acct)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private fun preventRapid() : Boolean {
|
||||
if(verbose) return true
|
||||
val now = System.currentTimeMillis()
|
||||
|
Loading…
x
Reference in New Issue
Block a user