hide featured tag button if not enabled

This commit is contained in:
tateisu 2019-09-14 15:24:52 +09:00
parent 762f2cd9a2
commit 444f4507c2
1 changed files with 4 additions and 3 deletions

View File

@ -378,7 +378,7 @@ class ActPost : AppCompatActivity(),
internal lateinit var cbContentWarning : CheckBox
internal lateinit var etContentWarning : MyEditText
internal lateinit var etContent : MyEditText
internal lateinit var btnFeaturedTag : ImageButton
private lateinit var btnFeaturedTag : ImageButton
internal lateinit var cbQuoteRenote : CheckBox
@ -1385,11 +1385,12 @@ class ActPost : AppCompatActivity(),
return
}
val now = SystemClock.elapsedRealtime()
val cache = featuredTagCache[account.acct]
vg(btnFeaturedTag, cache?.list?.isNotEmpty() == true)
if(cache != null && cache.time <= 300000L) return
val now = SystemClock.elapsedRealtime()
if(cache != null && now - cache.time <= 300000L) return
// 同時に実行するタスクは1つまで
var lastTask = lastFeaturedTagTask