hide featured tag button if not enabled
This commit is contained in:
parent
fb39e787e6
commit
762f2cd9a2
|
@ -1387,13 +1387,11 @@ class ActPost : AppCompatActivity(),
|
||||||
|
|
||||||
val now = SystemClock.elapsedRealtime()
|
val now = SystemClock.elapsedRealtime()
|
||||||
val cache = featuredTagCache[account.acct]
|
val cache = featuredTagCache[account.acct]
|
||||||
if(cache != null && now - cache.time <= 300000L) {
|
|
||||||
vg(btnFeaturedTag, cache.list.isNotEmpty())
|
vg(btnFeaturedTag, cache?.list?.isNotEmpty() == true)
|
||||||
return
|
if(cache != null && cache.time <= 300000L) return
|
||||||
}
|
|
||||||
|
|
||||||
// 同時に実行するタスクは1つまで
|
// 同時に実行するタスクは1つまで
|
||||||
vg(btnFeaturedTag, false)
|
|
||||||
var lastTask = lastFeaturedTagTask
|
var lastTask = lastFeaturedTagTask
|
||||||
if(lastTask?.isActive != true) {
|
if(lastTask?.isActive != true) {
|
||||||
lastTask = TootTaskRunner(this, TootTaskRunner.PROGRESS_NONE)
|
lastTask = TootTaskRunner(this, TootTaskRunner.PROGRESS_NONE)
|
||||||
|
|
Loading…
Reference in New Issue