Fixed variable shadowing bug in ls command
This commit is contained in:
parent
fa966d30db
commit
120e61e88b
@ -258,17 +258,17 @@ var listCmd = &cobra.Command{
|
||||
var conversationsPrinted int
|
||||
outer:
|
||||
for _, category := range categories {
|
||||
conversations, ok := categorized[category.name]
|
||||
conversationLines, ok := categorized[category.name]
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
|
||||
slices.SortFunc(conversations, func(a, b ConversationLine) int {
|
||||
slices.SortFunc(conversationLines, func(a, b ConversationLine) int {
|
||||
return int(a.timeSinceReply - b.timeSinceReply)
|
||||
})
|
||||
|
||||
fmt.Printf("%s:\n", category.name)
|
||||
for _, conv := range conversations {
|
||||
for _, conv := range conversationLines {
|
||||
if conversationsPrinted >= LS_LIMIT && !all {
|
||||
fmt.Printf("%d remaining message(s), use --all to view.\n", len(conversations)-conversationsPrinted)
|
||||
break outer
|
||||
|
Loading…
Reference in New Issue
Block a user