Make online indicator more subtle
This commit is contained in:
parent
621bf922ab
commit
38629b4c4e
|
@ -31,7 +31,7 @@ public class AvatarImageView: UIImageView {
|
|||
|
||||
func initialize() {
|
||||
// Loki: Used to indicate a contact's online status
|
||||
layer.borderWidth = 4
|
||||
layer.borderWidth = 2
|
||||
|
||||
// Loki: Observe online status changes
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(handleContactOnlineStatusChangedNotification), name: .contactOnlineStatusChanged, object: nil)
|
||||
|
@ -87,7 +87,7 @@ public class AvatarImageView: UIImageView {
|
|||
@objc func updateOnlineStatusIndicator() {
|
||||
let peerInfo = LokiP2PAPI.getInfo(for: contactID)
|
||||
let isOnline = peerInfo?.isOnline ?? false
|
||||
let color: UIColor = isOnline ? .lokiGreen() : .lokiDarkGray()
|
||||
let color: UIColor = isOnline ? .lokiGreen() : .lokiGray()
|
||||
let currentUserID = OWSIdentityManager.shared().identityKeyPair()!.hexEncodedPublicKey
|
||||
let isCurrentUser = (contactID == currentUserID)
|
||||
layer.borderColor = isCurrentUser ? UIColor.clear.cgColor : color.cgColor
|
||||
|
|
|
@ -58,6 +58,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
+ (UIColor *)lokiDarkestGray;
|
||||
+ (UIColor *)lokiDarkerGray;
|
||||
+ (UIColor *)lokiDarkGray;
|
||||
+ (UIColor *)lokiGray;
|
||||
+ (UIColor *)lokiLightGray;
|
||||
|
||||
@end
|
||||
|
|
|
@ -208,6 +208,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
+ (UIColor *)lokiDarkestGray { return [UIColor colorWithRGBHex:0x0A0A0A]; }
|
||||
+ (UIColor *)lokiDarkerGray { return [UIColor colorWithRGBHex:0x252525]; }
|
||||
+ (UIColor *)lokiDarkGray { return [UIColor colorWithRGBHex:0x313131]; }
|
||||
+ (UIColor *)lokiGray { return [UIColor colorWithRGBHex:0x363636]; }
|
||||
+ (UIColor *)lokiLightGray { return [UIColor colorWithRGBHex:0x414141]; }
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in New Issue