diff --git a/go/handlers/appHandler.go b/go/handlers/appHandler.go index af743fb2..42d9ea07 100644 --- a/go/handlers/appHandler.go +++ b/go/handlers/appHandler.go @@ -91,6 +91,7 @@ func App(gcd *ui.GrandCentralDispatcher, subscribed chan bool, reloadingAccounts go PeerHandler(onion, gcd.GetUiManager(p.GetOnion()), incSubscribed) <-incSubscribed + // TODO: wait till ACN is 100 and online if e.Data[event.Status] != "running" { p.Listen() p.StartPeersConnections() diff --git a/go/handlers/peerHandler.go b/go/handlers/peerHandler.go index 84038e77..be94e766 100644 --- a/go/handlers/peerHandler.go +++ b/go/handlers/peerHandler.go @@ -109,10 +109,10 @@ func PeerHandler(onion string, uiManager ui.Manager, subscribed chan bool) { if exists && scope == attr.PublicScope { switch path { case constants.Name: - peer.SetContactAttribute(onion, attr.GetPublicScope(constants.Name), val) + peer.SetContactAttribute(onion, attr.GetPeerScope(constants.Name), val) uiManager.UpdateContactDisplayName(onion) case constants.Picture: - peer.SetContactAttribute(onion, attr.GetPublicScope(constants.Picture), val) + peer.SetContactAttribute(onion, attr.GetPeerScope(constants.Picture), val) uiManager.UpdateContactPicture(onion) } } diff --git a/go/ui/manager.go b/go/ui/manager.go index 54b0839d..becad2f6 100644 --- a/go/ui/manager.go +++ b/go/ui/manager.go @@ -66,19 +66,19 @@ func getWithSetDefault(id string, key string, defaultVal string) string { func GetNick(id string) string { if isGroup(id) { nick, exists := the.Peer.GetGroupAttribute(id, attr.GetLocalScope(constants.Name)) - if !exists || nick == "" { + if !exists || nick == "" || nick == id { nick, exists = the.Peer.GetGroupAttribute(id, attr.GetPeerScope(constants.Name)) if !exists { - nick = id + nick = "[" + id + "]" } } return nick } else { nick, exists := the.Peer.GetContactAttribute(id, attr.GetLocalScope(constants.Name)) - if !exists || nick == "" { + if !exists || nick == "" || nick == id { nick, exists = the.Peer.GetContactAttribute(id, attr.GetPeerScope(constants.Name)) if !exists { - nick = id + nick = "[" + id + "]" } } return nick @@ -230,7 +230,7 @@ func NewManager(profile string, gcd *GrandCentralDispatcher) Manager { // Acknowledge acknowledges the given message id in the UI func (this *manager) Acknowledge(handle, mID string) { this.gcd.DoIfProfile(this.profile, func() { - this.gcd.DoIfConversation(handle, func(){ + this.gcd.DoIfConversation(handle, func() { this.gcd.PeerAckAlert(mID) }) }) @@ -318,7 +318,7 @@ func (this *manager) AddMessage(handle string, from string, message string, from updateLastReadTime(handle) // If the message is not from the user then add it, otherwise, just acknowledge. if !fromMe || !Acknowledged { - this.gcd.TimelineInterface.AddMessage(this.gcd.TimelineInterface.num()-1) + this.gcd.TimelineInterface.AddMessage(this.gcd.TimelineInterface.num() - 1) this.gcd.TimelineInterface.RequestEIR() } else { this.gcd.Acknowledged(messageID) diff --git a/qml/opaque b/qml/opaque index 925796d4..15e3f5ab 160000 --- a/qml/opaque +++ b/qml/opaque @@ -1 +1 @@ -Subproject commit 925796d468b208787e232c06d18f77c219686a45 +Subproject commit 15e3f5ab84473070d16238f36fa04584d46f0bcb diff --git a/qml/widgets/ContactRow.qml b/qml/widgets/ContactRow.qml index 5f2dfaab..25bf535b 100644 --- a/qml/widgets/ContactRow.qml +++ b/qml/widgets/ContactRow.qml @@ -21,6 +21,8 @@ Opaque.PortraitRow { property bool blocked + portraitOverlayColor: Theme.portraitOverlayOfflineColor + badgeColor: Theme.portraitOnlineBadgeColor badgeVisible: (Utils.isGroup(handle) && status == Const.state_synced) || (Utils.isPeer(handle) && status == Const.state_authenticated) @@ -115,21 +117,25 @@ Opaque.PortraitRow { portraitColor = Theme.portraitBlockedBackgroundColor nameColor = Theme.portraitBlockedTextColor onionColor = Theme.portraitBlockedTextColor + portraitPerformTransform = true } else if (status == Const.state_synced || status == Const.state_authenticated) { portraitBorderColor = Theme.portraitOnlineBorderColor portraitColor = Theme.portraitOnlineBackgroundColor nameColor = Theme.portraitOnlineTextColor onionColor = Theme.portraitOnlineTextColor + portraitPerformTransform = false } else if (status == Const.state_connected || status == Const.state_connecting) { portraitBorderColor = Theme.portraitConnectingBorderColor portraitColor = Theme.portraitConnectingBackgroundColor nameColor = Theme.portraitConnectingTextColor onionColor = Theme.portraitConnectingTextColor + portraitPerformTransform = true } else { portraitBorderColor = Theme.portraitOfflineBorderColor portraitColor = Theme.portraitOfflineBackgroundColor nameColor = Theme.portraitOfflineTextColor onionColor = Theme.portraitOfflineTextColor + portraitPerformTransform = true } }