~tsileo/microblog.pub-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
4 3

[PATCH microblog.pub 0/1] Order by is_pinned before published date

Details
Message ID
<166192562030.6087.14244328189960952195-0@git.sr.ht>
DKIM signature
missing
Download raw message
Hi @~tsileo,

I am surprised this actually works, but it seems to fix
https://todo.sr.ht/~tsileo/microblog.pub/18 - adding the extra 'order
by', ensures that my pinned post appears first, meanwhile all the other
posts are still ordered by published date beneath it. Thoughts?

Miguel Jacq (1):
  Ensure pinned posts appear on front page before others

 app/main.py | 1 +
 1 file changed, 1 insertion(+)

-- 
2.34.4

[PATCH microblog.pub 1/1] Ensure pinned posts appear on front page before others

Details
Message ID
<166192562030.6087.14244328189960952195-1@git.sr.ht>
In-Reply-To
<166192562030.6087.14244328189960952195-0@git.sr.ht> (view parent)
DKIM signature
missing
Download raw message
Patch: +1 -0
From: Miguel Jacq <mig@mig5.net>

---
 app/main.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/main.py b/app/main.py
index e29f2f3..fe4f9ec 100644
--- a/app/main.py
+++ b/app/main.py
@@ -281,6 +281,7 @@ async def index(
                ),
            ),
        )
        .order_by(models.OutboxObject.is_pinned.desc())
        .order_by(models.OutboxObject.ap_published_at.desc())
        .offset(page_offset)
        .limit(page_size)
-- 
2.34.4

[microblog.pub/patches/.build.yml] build success

builds.sr.ht <builds@sr.ht>
Details
Message ID
<CMJZKALF35AN.09WGKXZ3Y36K@cirno2>
In-Reply-To
<166192562030.6087.14244328189960952195-1@git.sr.ht> (view parent)
DKIM signature
missing
Download raw message
microblog.pub/patches/.build.yml: SUCCESS in 4m38s

[Order by is_pinned before published date][0] from [~mig5][1]

[0]: https://lists.sr.ht/~tsileo/microblog.pub-devel/patches/35039
[1]: mig@mig5.net

✓ #835255 SUCCESS microblog.pub/patches/.build.yml https://builds.sr.ht/~tsileo/job/835255
Details
Message ID
<93c84bb3-cb4e-4f2b-a103-0907ecd877b2@www.fastmail.com>
In-Reply-To
<166192562030.6087.14244328189960952195-0@git.sr.ht> (view parent)
DKIM signature
missing
Download raw message
Not filtering by pinned posts is an oversight, this seems reasonable/the right way to do it.

Thanks!
Reply to thread Export thread (mbox)