|
|
@ -4,6 +4,7 @@ import ( |
|
|
|
"fmt" |
|
|
|
"fmt" |
|
|
|
"log" |
|
|
|
"log" |
|
|
|
"os" |
|
|
|
"os" |
|
|
|
|
|
|
|
"sort" |
|
|
|
"strings" |
|
|
|
"strings" |
|
|
|
"time" |
|
|
|
"time" |
|
|
|
|
|
|
|
|
|
|
@ -424,13 +425,16 @@ func populateList() { |
|
|
|
log.Printf("%+v", err) |
|
|
|
log.Printf("%+v", err) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
clearView("List") |
|
|
|
clearView("List") |
|
|
|
|
|
|
|
conversationSlice := testVar.Result.Conversations |
|
|
|
|
|
|
|
sort.SliceStable(conversationSlice, func(i, j int) bool { |
|
|
|
|
|
|
|
return conversationSlice[i].ActiveAt > conversationSlice[j].ActiveAt |
|
|
|
|
|
|
|
}) |
|
|
|
var textBase = config.Colors.Channels.Basic.stylize("") |
|
|
|
var textBase = config.Colors.Channels.Basic.stylize("") |
|
|
|
var recentPMs = textBase.append(config.Colors.Channels.Header.stylize("---[PMs]---\n")) |
|
|
|
var recentPMs = textBase.append(config.Colors.Channels.Header.stylize("---[PMs]---\n")) |
|
|
|
var recentPMsCount = 0 |
|
|
|
var recentPMsCount = 0 |
|
|
|
var recentChannels = textBase.append(config.Colors.Channels.Header.stylize("---[Teams]---\n")) |
|
|
|
var recentChannels = textBase.append(config.Colors.Channels.Header.stylize("---[Teams]---\n")) |
|
|
|
var recentChannelsCount = 0 |
|
|
|
var recentChannelsCount = 0 |
|
|
|
for _, s := range testVar.Result.Conversations { |
|
|
|
for _, s := range conversationSlice { |
|
|
|
channels = append(channels, s.Channel) |
|
|
|
channels = append(channels, s.Channel) |
|
|
|
if s.Channel.MembersType == keybase.TEAM { |
|
|
|
if s.Channel.MembersType == keybase.TEAM { |
|
|
|
recentChannelsCount++ |
|
|
|
recentChannelsCount++ |
|
|
|