Format code so its easier to read

This commit is contained in:
Tim Gunn 2020-05-02 01:55:11 +12:00
parent 9e2c3255e2
commit 5c38762178
No known key found for this signature in database
GPG key ID: C9BC1E9D0D0AED8C

View file

@ -622,9 +622,16 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
}
loopPlugin.isEnabled(PluginType.LOOP) -> {
val APSmode = sp.getString(R.string.key_aps_mode, "open")
val isLGS = loopPlugin.isLGS
overview_apsmode?.text = if (closedLoopEnabled.value()) if (isLGS) resourceHelper.gs(R.string.lgs) else resourceHelper.gs(R.string.closedloop) else resourceHelper.gs(R.string.openloop)
overview_apsmode?.text =
if (closedLoopEnabled.value())
if (isLGS)
resourceHelper.gs(R.string.lgs)
else
resourceHelper.gs(R.string.closedloop)
else
resourceHelper.gs(R.string.openloop)
overview_apsmode?.setBackgroundColor(if (isLGS) resourceHelper.gc(R.color.ribbonUnusual) else resourceHelper.gc(R.color.ribbonDefault))
overview_apsmode?.setTextColor(resourceHelper.gc(R.color.ribbonTextDefault))
}