order media so that latest added are top #660

Merged
Plume_migration_agent merged 2 commits from feature/621 into master 2019-08-28 09:37:04 +00:00

partial fix for #621

partial fix for #621
codecov[bot] commented 2019-08-27 14:00:21 +00:00 (Migrated from github.com)

Codecov Report

Merging #660 into master will increase coverage by 0.04%.
The diff coverage is 85.71%.

@@            Coverage Diff             @@
##           master     #660      +/-   ##
==========================================
+ Coverage   35.11%   35.15%   +0.04%     
==========================================
  Files          68       68              
  Lines        7943     7950       +7     
  Branches     1889     1889              
==========================================
+ Hits         2789     2795       +6     
- Misses       4374     4375       +1     
  Partials      780      780
# [Codecov](https://codecov.io/gh/Plume-org/Plume/pull/660?src=pr&el=h1) Report > Merging [#660](https://codecov.io/gh/Plume-org/Plume/pull/660?src=pr&el=desc) into [master](https://codecov.io/gh/Plume-org/Plume/commit/935d331e971bc19019a4cbc271b3a59719b6be93?src=pr&el=desc) will **increase** coverage by `0.04%`. > The diff coverage is `85.71%`. ```diff @@ Coverage Diff @@ ## master #660 +/- ## ========================================== + Coverage 35.11% 35.15% +0.04% ========================================== Files 68 68 Lines 7943 7950 +7 Branches 1889 1889 ========================================== + Hits 2789 2795 +6 - Misses 4374 4375 +1 Partials 780 780 ```
igalic (Migrated from github.com) reviewed 2019-08-27 14:17:58 +00:00
igalic (Migrated from github.com) left a comment

@ -66,0 +67,4 @@
medias::table
.filter(medias::owner_id.eq(owner))
.order(medias::id.desc())
.load::<Self>(conn)
igalic (Migrated from github.com) commented 2019-08-27 14:17:47 +00:00

is this guaranteed to be such?
do we have a create date anywhere?

is this guaranteed to be such? do we have a create date anywhere?
trinity-1686a reviewed 2019-08-27 14:26:11 +00:00
@ -66,0 +67,4 @@
medias::table
.filter(medias::owner_id.eq(owner))
.order(medias::id.desc())
.load::<Self>(conn)
Author
Owner

we don't have date, and the ids we use are monotonic counter, unless we overflow that 64b signed counter (not likely to happen)

we don't have date, and the ids we use are monotonic counter, unless we overflow that 64b signed counter (not likely to happen)
igalic (Migrated from github.com) reviewed 2019-08-27 14:27:16 +00:00
@ -66,0 +67,4 @@
medias::table
.filter(medias::owner_id.eq(owner))
.order(medias::id.desc())
.load::<Self>(conn)
igalic (Migrated from github.com) commented 2019-08-27 14:27:16 +00:00

i wonder if anyone expects that editing a media pushes it to the top again…

i wonder if anyone expects that editing a media pushes it to the top again…
elegaanz (Migrated from github.com) reviewed 2019-08-27 14:29:40 +00:00
@ -66,0 +67,4 @@
medias::table
.filter(medias::owner_id.eq(owner))
.order(medias::id.desc())
.load::<Self>(conn)
elegaanz (Migrated from github.com) commented 2019-08-27 14:29:39 +00:00

We can't edit media information for the moment, so…

We can't edit media information for the moment, so…
igalic (Migrated from github.com) reviewed 2019-08-27 14:36:43 +00:00
@ -66,0 +67,4 @@
medias::table
.filter(medias::owner_id.eq(owner))
.order(medias::id.desc())
.load::<Self>(conn)
igalic (Migrated from github.com) commented 2019-08-27 14:36:43 +00:00

well then… pushes [resolve] button

well then… *pushes [resolve] button*
elegaanz (Migrated from github.com) reviewed 2019-08-27 20:31:19 +00:00
elegaanz (Migrated from github.com) left a comment

Ideally, it should be done for the paginated version too, so that /media lists them in the correct order.

Ideally, it should be done for the paginated version too, so that `/media` lists them in the correct order.
igalic (Migrated from github.com) approved these changes 2019-08-28 08:50:38 +00:00
igalic (Migrated from github.com) left a comment

👍

:+1:
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Plume/Plume#660
No description provided.