diff --git a/README.md b/README.md index 2c9df2c..91ec206 100644 --- a/README.md +++ b/README.md @@ -126,6 +126,8 @@ Here is a list of things that are currently broken. Here is a list of features I'd like to add soonish. * Better Attachments Support * signal-cli seems to delete old attachments after a while. maybe I should move them somewhere where they wont get deleted? +* default color list for contacts instead of white +* better mode indication * gui configuration * colors and border styles * let user re-sort contact list (for example alphabetically) diff --git a/model/model.go b/model/model.go index e051e88..75781c8 100644 --- a/model/model.go +++ b/model/model.go @@ -176,7 +176,9 @@ func (m *Message) AddAttachments(paths []string) { } } -// Attachment is just a signal.Attachment for now +// Attachment is any file sent or received. Received attachments are left in the usual `signal-cli` +// location for now. It seems to automatically delete old attachments, so we may want to come up +// with a way to keep our own copy somewhere in the siggo data folder. type Attachment struct { ContentType string `json:"contentType"` Filename string `json:"filename"` diff --git a/widgets/chatwindow.go b/widgets/chatwindow.go index 41218cf..3551915 100644 --- a/widgets/chatwindow.go +++ b/widgets/chatwindow.go @@ -259,6 +259,13 @@ func (c *ChatWindow) currentConversation() (*model.Conversation, error) { } } +func (c *ChatWindow) currentContactName() string { + if c.currentContact != nil { + return c.currentContact.String() + } + return "" +} + // SetCurrentContact sets the active contact func (c *ChatWindow) SetCurrentContact(contact *model.Contact) error { log.Debugf("setting current contact to: %v", contact) diff --git a/widgets/links.go b/widgets/links.go index 5f494d5..cbc4982 100644 --- a/widgets/links.go +++ b/widgets/links.go @@ -151,6 +151,8 @@ func NewLinksInput(parent *ChatWindow) *LinksInput { li.SetHighlightFullLine(true) li.ShowSecondaryText(false) li.SetBorder(true) + li.SetTitle(fmt.Sprintf("urls: %s", parent.currentContactName())) + li.SetTitleAlign(0) li.init() li.SetCurrentItem(-1) diff --git a/widgets/open.go b/widgets/open.go index d24c365..da6e491 100644 --- a/widgets/open.go +++ b/widgets/open.go @@ -151,6 +151,8 @@ func NewOpenInput(parent *ChatWindow) *OpenInput { oi.SetHighlightFullLine(true) oi.ShowSecondaryText(false) oi.SetBorder(true) + oi.SetTitle(fmt.Sprintf("attachments: %s", parent.currentContactName())) + oi.SetTitleAlign(0) oi.init() oi.SetCurrentItem(-1)