mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
drafts: Use a reverse-cron sort.
I think it's natural for your eyes get drawn to the top of the modal, so that's where we should put the most recent draft.
This commit is contained in:
@@ -257,27 +257,13 @@ run_test('format_drafts', () => {
|
||||
|
||||
var expected = [
|
||||
{
|
||||
draft_id: 'id3',
|
||||
draft_id: 'id1',
|
||||
is_stream: true,
|
||||
stream: 'stream 2',
|
||||
stream: 'stream',
|
||||
stream_color: '#FFFFFF',
|
||||
topic: 'topic',
|
||||
raw_content: 'Test Stream Message 2',
|
||||
time_stamp: 'Jan 21',
|
||||
},
|
||||
{
|
||||
draft_id: 'id4',
|
||||
is_stream: false,
|
||||
recipients: 'aaron',
|
||||
raw_content: 'Test Private Message 2',
|
||||
time_stamp: 'Jan 26',
|
||||
},
|
||||
{
|
||||
draft_id: 'id5',
|
||||
is_stream: false,
|
||||
recipients: 'aaron',
|
||||
raw_content: 'Test Private Message 3',
|
||||
time_stamp: 'Jan 29',
|
||||
raw_content: 'Test Stream Message',
|
||||
time_stamp: '7:55 AM',
|
||||
},
|
||||
{
|
||||
draft_id: 'id2',
|
||||
@@ -287,13 +273,27 @@ run_test('format_drafts', () => {
|
||||
time_stamp: 'Jan 30',
|
||||
},
|
||||
{
|
||||
draft_id: 'id1',
|
||||
draft_id: 'id5',
|
||||
is_stream: false,
|
||||
recipients: 'aaron',
|
||||
raw_content: 'Test Private Message 3',
|
||||
time_stamp: 'Jan 29',
|
||||
},
|
||||
{
|
||||
draft_id: 'id4',
|
||||
is_stream: false,
|
||||
recipients: 'aaron',
|
||||
raw_content: 'Test Private Message 2',
|
||||
time_stamp: 'Jan 26',
|
||||
},
|
||||
{
|
||||
draft_id: 'id3',
|
||||
is_stream: true,
|
||||
stream: 'stream',
|
||||
stream: 'stream 2',
|
||||
stream_color: '#FFFFFF',
|
||||
topic: 'topic',
|
||||
raw_content: 'Test Stream Message',
|
||||
time_stamp: '7:55 AM',
|
||||
raw_content: 'Test Stream Message 2',
|
||||
time_stamp: 'Jan 21',
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user