mirror of
https://github.com/d4rken-org/capod.git
synced 2026-09-16 11:16:12 -04:00
Fix bold highlighting of the main pod device not being reset.
This commit is contained in:
+2
-2
@@ -29,8 +29,8 @@ class DualPodsCardVH(parent: ViewGroup) :
|
|||||||
}
|
}
|
||||||
text = sb
|
text = sb
|
||||||
|
|
||||||
if (item.isMainPod) setTypeface(typeface, Typeface.BOLD)
|
if (item.isMainPod) setTypeface(null, Typeface.BOLD)
|
||||||
else setTypeface(typeface, Typeface.NORMAL)
|
else setTypeface(null, Typeface.NORMAL)
|
||||||
|
|
||||||
if (device is DualAirPods && item.showDebug) {
|
if (device is DualAirPods && item.showDebug) {
|
||||||
append(" [${device.primaryPod.name}]")
|
append(" [${device.primaryPod.name}]")
|
||||||
|
|||||||
+2
-2
@@ -23,8 +23,8 @@ class SinglePodsCardVH(parent: ViewGroup) :
|
|||||||
|
|
||||||
name.apply {
|
name.apply {
|
||||||
text = device.getLabel(context)
|
text = device.getLabel(context)
|
||||||
if (item.isMainPod) setTypeface(typeface, Typeface.BOLD)
|
if (item.isMainPod) setTypeface(null, Typeface.BOLD)
|
||||||
else setTypeface(typeface, Typeface.NORMAL)
|
else setTypeface(null, Typeface.NORMAL)
|
||||||
}
|
}
|
||||||
|
|
||||||
deviceIcon.setImageResource(device.iconRes)
|
deviceIcon.setImageResource(device.iconRes)
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ class DualPodsCardVH(parent: ViewGroup) :
|
|||||||
}
|
}
|
||||||
text = sb
|
text = sb
|
||||||
|
|
||||||
if (item.isMainPod) setTypeface(typeface, Typeface.BOLD)
|
if (item.isMainPod) setTypeface(null, Typeface.BOLD)
|
||||||
else setTypeface(typeface, Typeface.NORMAL)
|
else setTypeface(null, Typeface.NORMAL)
|
||||||
|
|
||||||
if (device is DualAirPods && item.showDebug) {
|
if (device is DualAirPods && item.showDebug) {
|
||||||
append(" [${device.primaryPod.name}]")
|
append(" [${device.primaryPod.name}]")
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ class SinglePodsCardVH(parent: ViewGroup) :
|
|||||||
|
|
||||||
name.apply {
|
name.apply {
|
||||||
text = device.getLabel(context)
|
text = device.getLabel(context)
|
||||||
if (item.isMainPod) setTypeface(typeface, Typeface.BOLD)
|
if (item.isMainPod) setTypeface(null, Typeface.BOLD)
|
||||||
else setTypeface(typeface, Typeface.NORMAL)
|
else setTypeface(null, Typeface.NORMAL)
|
||||||
}
|
}
|
||||||
|
|
||||||
deviceIcon.setImageResource(device.iconRes)
|
deviceIcon.setImageResource(device.iconRes)
|
||||||
|
|||||||
+2
-2
@@ -24,8 +24,8 @@ class UnknownPodDeviceCardVH(parent: ViewGroup) :
|
|||||||
val device = item.device
|
val device = item.device
|
||||||
name.apply {
|
name.apply {
|
||||||
text = device.getLabel(context)
|
text = device.getLabel(context)
|
||||||
if (item.isMainPod) setTypeface(typeface, Typeface.BOLD)
|
if (item.isMainPod) setTypeface(null, Typeface.BOLD)
|
||||||
else setTypeface(typeface, Typeface.NORMAL)
|
else setTypeface(null, Typeface.NORMAL)
|
||||||
}
|
}
|
||||||
|
|
||||||
lastSeen.text = device.lastSeenFormatted(item.now)
|
lastSeen.text = device.lastSeenFormatted(item.now)
|
||||||
|
|||||||
Reference in New Issue
Block a user