Skip to content

Commit 58cc540

Browse files
committed
ensure consistent chat sort order when the last messages of two chats have the same timestamp
1 parent 1f3c190 commit 58cc540

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

lib/common/src/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77

88
#pragma once
99

10-
#define NCHAT_VERSION "5.11.29"
10+
#define NCHAT_VERSION "5.11.30"

src/nchat.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.\" DO NOT MODIFY THIS FILE! It was generated by help2man.
2-
.TH NCHAT "1" "October 2025" "nchat 5.11.29" "User Commands"
2+
.TH NCHAT "1" "October 2025" "nchat 5.11.30" "User Commands"
33
.SH NAME
44
nchat \- ncurses chat
55
.SH SYNOPSIS

src/uimodel.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1954,6 +1954,10 @@ void UiModel::Impl::SortChats()
19541954
if (lhsChatInfo.lastMessageTime > rhsChatInfo.lastMessageTime) return true;
19551955
if (lhsChatInfo.lastMessageTime < rhsChatInfo.lastMessageTime) return false;
19561956

1957+
// lower chat ids are listed first
1958+
if (lhsChatInfo.id < rhsChatInfo.id) return true;
1959+
if (lhsChatInfo.id > rhsChatInfo.id) return false;
1960+
19571961
return false;
19581962
});
19591963

0 commit comments

Comments
 (0)