Fix bold highlighting of the main pod device not being reset.

This commit is contained in:
darken
2022-10-22 10:49:45 +03:00
parent c3d4500e3a
commit d55300f53d
5 changed files with 10 additions and 10 deletions
@@ -29,8 +29,8 @@ class DualPodsCardVH(parent: ViewGroup) :
}
text = sb
if (item.isMainPod) setTypeface(typeface, Typeface.BOLD)
else setTypeface(typeface, Typeface.NORMAL)
if (item.isMainPod) setTypeface(null, Typeface.BOLD)
else setTypeface(null, Typeface.NORMAL)
if (device is DualAirPods && item.showDebug) {
append(" [${device.primaryPod.name}]")
@@ -23,8 +23,8 @@ class SinglePodsCardVH(parent: ViewGroup) :
name.apply {
text = device.getLabel(context)
if (item.isMainPod) setTypeface(typeface, Typeface.BOLD)
else setTypeface(typeface, Typeface.NORMAL)
if (item.isMainPod) setTypeface(null, Typeface.BOLD)
else setTypeface(null, Typeface.NORMAL)
}
deviceIcon.setImageResource(device.iconRes)
@@ -31,8 +31,8 @@ class DualPodsCardVH(parent: ViewGroup) :
}
text = sb
if (item.isMainPod) setTypeface(typeface, Typeface.BOLD)
else setTypeface(typeface, Typeface.NORMAL)
if (item.isMainPod) setTypeface(null, Typeface.BOLD)
else setTypeface(null, Typeface.NORMAL)
if (device is DualAirPods && item.showDebug) {
append(" [${device.primaryPod.name}]")
@@ -23,8 +23,8 @@ class SinglePodsCardVH(parent: ViewGroup) :
name.apply {
text = device.getLabel(context)
if (item.isMainPod) setTypeface(typeface, Typeface.BOLD)
else setTypeface(typeface, Typeface.NORMAL)
if (item.isMainPod) setTypeface(null, Typeface.BOLD)
else setTypeface(null, Typeface.NORMAL)
}
deviceIcon.setImageResource(device.iconRes)
@@ -24,8 +24,8 @@ class UnknownPodDeviceCardVH(parent: ViewGroup) :
val device = item.device
name.apply {
text = device.getLabel(context)
if (item.isMainPod) setTypeface(typeface, Typeface.BOLD)
else setTypeface(typeface, Typeface.NORMAL)
if (item.isMainPod) setTypeface(null, Typeface.BOLD)
else setTypeface(null, Typeface.NORMAL)
}
lastSeen.text = device.lastSeenFormatted(item.now)