Improve Home Assistant connection reliability
This commit is contained in:
@@ -19,6 +19,7 @@ open class WemoCellView: UICollectionViewCell
|
||||
{
|
||||
super.init(frame: frame)
|
||||
|
||||
isAccessibilityElement = true
|
||||
self.contentView.backgroundColor = WemoCellView.disabledBackgroundColor
|
||||
|
||||
_selectionOverlayView.backgroundColor = UIColor.clear
|
||||
@@ -130,6 +131,7 @@ open class WemoDeviceCellView: WemoCellView
|
||||
didSet
|
||||
{
|
||||
_nameLabel.text = self.deviceName.uppercased()
|
||||
accessibilityLabel = deviceName
|
||||
self.setNeedsLayout()
|
||||
}
|
||||
}
|
||||
@@ -154,6 +156,8 @@ open class WemoDeviceCellView: WemoCellView
|
||||
didSet
|
||||
{
|
||||
_indicator.status = toggled
|
||||
accessibilityValue = toggled ? "On" : "Off"
|
||||
accessibilityTraits = toggled ? [.button, .selected] : .button
|
||||
|
||||
if (toggled) {
|
||||
self.contentView.backgroundColor = WemoCellView.enabledBackgroundColor
|
||||
@@ -176,6 +180,7 @@ open class WemoActionCellView: WemoCellView
|
||||
{
|
||||
super.init(frame: frame)
|
||||
|
||||
accessibilityTraits = .button
|
||||
self.textLabel.font = UIFont(name: "Orbitron-Medium", size: 21.0)
|
||||
self.textLabel.textColor = UIColor.white
|
||||
self.textLabel.textAlignment = .center
|
||||
|
||||
Reference in New Issue
Block a user