Get rid of postDelayeds

FASTER!
This commit is contained in:
Mygod
2018-02-04 04:12:17 -08:00
parent d715f7b4c6
commit 88fc092aa2
2 changed files with 4 additions and 8 deletions
@@ -84,9 +84,7 @@ class ServiceButton @JvmOverloads constructor(context: Context, attrs: Attribute
TooltipCompat.setTooltipText(this, context.getString(R.string.connect))
}
refreshDrawableState()
isEnabled = false
if (state == BaseService.CONNECTED || state == BaseService.STOPPED) app.handler.postDelayed(
{ isEnabled = state == BaseService.CONNECTED || state == BaseService.STOPPED }, 1000)
isEnabled = state == BaseService.CONNECTED || state == BaseService.STOPPED
}
private fun counters(a: AnimatedVectorDrawableCompat, b: AnimatedVectorDrawableCompat): Boolean =