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:
Steve Howell
2018-12-16 21:56:35 +00:00
committed by Tim Abbott
parent 4ac2db56f8
commit c4cd0fe0c1
2 changed files with 25 additions and 25 deletions

View File

@@ -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',
},
];