mirror of
https://github.com/Rudi9719/kbtui.git
synced 2026-03-22 11:07:22 +00:00
Mark unread messages
This commit is contained in:
@ -11,10 +11,10 @@ It started as a joke, then a bash script, and now here it is!
|
|||||||
* Stream view to see all incoming messages
|
* Stream view to see all incoming messages
|
||||||
* List view to show activity
|
* List view to show activity
|
||||||
* Chat view to interact with the current channel
|
* Chat view to interact with the current channel
|
||||||
|
* Marks unread messages in the List view
|
||||||
|
|
||||||
## Todo
|
## Todo
|
||||||
* Reactions to messages
|
* Reactions to messages
|
||||||
* Mark unread messages in the List view
|
|
||||||
* Pretty format headers in List view
|
* Pretty format headers in List view
|
||||||
* Twitter-style feed reading public messages
|
* Twitter-style feed reading public messages
|
||||||
* Track multiple conversations at once
|
* Track multiple conversations at once
|
||||||
|
|||||||
6
main.go
6
main.go
@ -82,11 +82,17 @@ func populateList(g *gocui.Gui) {
|
|||||||
if s.Channel.MembersType == keybase.TEAM {
|
if s.Channel.MembersType == keybase.TEAM {
|
||||||
recentChannelsCount++
|
recentChannelsCount++
|
||||||
if recentChannelsCount <= ((maxY - 2) / 3) {
|
if recentChannelsCount <= ((maxY - 2) / 3) {
|
||||||
|
if s.Unread {
|
||||||
|
recentChannels += "*"
|
||||||
|
}
|
||||||
recentChannels += fmt.Sprintf("%s\n\t#%s\n", s.Channel.Name, s.Channel.TopicName)
|
recentChannels += fmt.Sprintf("%s\n\t#%s\n", s.Channel.Name, s.Channel.TopicName)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
recentPMsCount++
|
recentPMsCount++
|
||||||
if recentPMsCount <= ((maxY- 2) / 3) {
|
if recentPMsCount <= ((maxY- 2) / 3) {
|
||||||
|
if s.Unread {
|
||||||
|
recentPMs += "*"
|
||||||
|
}
|
||||||
recentPMs += fmt.Sprintf("%s\n", cleanChannelName(s.Channel.Name))
|
recentPMs += fmt.Sprintf("%s\n", cleanChannelName(s.Channel.Name))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user