order media so that latest added are top #660

已合并
Plume_migration_agent 已将来自 feature/621 的 2 提交合并入 master 2019-08-28 09:37:04 +00:00
管理员

partial fix for #621

partial fix for #621
codecov[bot] 评论于 2019-08-27 14:00:21 +00:00 (从 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 (从 github.com 迁移) 评审于 2019-08-27 14:17:58 +00:00
igalic (从 github.com 迁移) 留下了一条评论

@ -66,0 +67,4 @@
medias::table
.filter(medias::owner_id.eq(owner))
.order(medias::id.desc())
.load::<Self>(conn)
igalic (从 github.com 迁移) 评论于 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 评审于 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)
作者
管理员

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 (从 github.com 迁移) 评审于 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 (从 github.com 迁移) 评论于 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 (从 github.com 迁移) 评审于 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 (从 github.com 迁移) 评论于 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 (从 github.com 迁移) 评审于 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 (从 github.com 迁移) 评论于 2019-08-27 14:36:43 +00:00

well then… pushes [resolve] button

well then… *pushes [resolve] button*
elegaanz (从 github.com 迁移) 评审于 2019-08-27 20:31:19 +00:00
elegaanz (从 github.com 迁移) 留下了一条评论

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 (从 github.com 迁移)2019-08-28 08:50:38 +00:00 批准此合并请求
igalic (从 github.com 迁移) 留下了一条评论

👍

:+1:
登录 并参与到对话中。
无评审员
未选择里程碑
暂无项目
未指派成员
2 位参与者
通知
到期时间
到期日期无效或超出范围。请使用“yyyy-mm-dd”格式。

未设置到期时间。

依赖工单

没有设置依赖项。

引用:Plume/Plume#660
没有提供说明。