feat(messages): sort group read status — read (earliest first), unread (alphabetical)
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
1a3db7cf14
commit
6eff4aad83
@ -652,6 +652,15 @@
|
||||
|
||||
if (isGroup) {
|
||||
// Group: show per-member read status
|
||||
// Sort: read (earliest first), then unread (alphabetically)
|
||||
otherMembers.sort(function (a, b) {
|
||||
var aRead = a.last_read_at && new Date(a.last_read_at) >= msgTime;
|
||||
var bRead = b.last_read_at && new Date(b.last_read_at) >= msgTime;
|
||||
if (aRead && !bRead) return -1;
|
||||
if (!aRead && bRead) return 1;
|
||||
if (aRead && bRead) return new Date(a.last_read_at) - new Date(b.last_read_at);
|
||||
return (a.name || '').localeCompare(b.name || '', 'pl');
|
||||
});
|
||||
var lines = [];
|
||||
otherMembers.forEach(function (m) {
|
||||
var name = m.name || 'Użytkownik';
|
||||
|
||||
@ -228,7 +228,7 @@ window.__CSRF_TOKEN__ = '{{ csrf_token() }}';
|
||||
// Load conversations.js after data is set
|
||||
(function() {
|
||||
var s = document.createElement('script');
|
||||
s.src = '{{ url_for("static", filename="js/conversations.js") }}?v=16';
|
||||
s.src = '{{ url_for("static", filename="js/conversations.js") }}?v=17';
|
||||
document.body.appendChild(s);
|
||||
})();
|
||||
{% endblock %}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user