From 78f5cb00b4ad00f80c282046d4edb577d0964878 Mon Sep 17 00:00:00 2001

From: =?UTF-8?q?Jaakko=20Kera=CC=88nen?= jaakko.keranen@iki.fi

Date: Mon, 15 Jan 2024 10:19:38 +0200

Subject: [PATCH 1/1] Added setting to hide flairs in feeds


50_bubble.py | 5 ++++-

model.py | 1 +

settings.py | 5 +++++

3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/50_bubble.py b/50_bubble.py

index b9df3e6..4ac3b30 100644

--- a/50_bubble.py

+++ b/50_bubble.py

@@ -257,6 +257,9 @@ Bubble is open source:

         return f'=> /dashboard {self.user.avatar} {self.user.name}{notifs}{mode}\n'

     def feed_flair(self, post, context):

         flair = User.render_flair(post.poster_flair,

                                   context,

                                   abbreviate=True,

@@ -349,7 +352,7 @@ Bubble is open source:

             # Activity feeds use ts_comment timestamps, so the post author's name is at the top

             # because the meta line is associated with the latest comment instead.

             if is_activity_feed and sub:

             src = f'=> {post_path} {post_icon} {post_label}{rotation}\n'

diff --git a/model.py b/model.py

index 95114ed..7e03236 100644

--- a/model.py

+++ b/model.py

@@ -286,6 +286,7 @@ class User:

 HOME_NO_USERS_FEED_FLAG = 0x0080

 HOME_USERS_FEED_FLAG    = 0x0100

 COMPOSER_SPLIT_FLAG     = 0x0200

 FEED_MASK = HOME_FOLLOWED_FEED_FLAG | HOME_USERS_FEED_FLAG | HOME_NO_USERS_FEED_FLAG

diff --git a/settings.py b/settings.py

index c75a597..ba71d96 100644

--- a/settings.py

+++ b/settings.py

@@ -496,6 +496,10 @@ def make_settings_page(session):

     db.update_user(user, flags=(user.flags ^ User.SHORT_PREVIEW_FLAG))

     return 30, './display'

 elif req.path == session.path + 'settings/flat':

     db.update_user(user, flags=(user.flags ^ User.HOME_FLAT_FEED_FLAG))

     return 30, './display'

@@ -842,6 +846,7 @@ def make_settings_page(session):

     page += '## Display\n\n'

     page += f'=> /settings/short-preview {CHECKS[nonzero(user.flags & User.SHORT_PREVIEW_FLAG)]} Short post previews\n'

     page += f"\n=> /settings/all-rotation {CHECKS[is_zero(user.flags & User.DISABLE_ROTATION_FLAG)]} Rotate posts by subspace in All Posts\n"

     if user.flags & User.DISABLE_ROTATION_FLAG:

         page += 'The All Posts feed shows every post individually, even when one subspace has several posts per day.\n'

--

2.25.1

Proxy Information
Original URL
gemini://git.skyjake.fi/bubble/main/patch/78f5cb00b4ad00f80c282046d4edb577d0964878.patch
Status Code
Success (20)
Meta
text/plain
Capsule Response Time
77.195144 milliseconds
Gemini-to-HTML Time
2.186376 milliseconds

This content has been proxied by September (3851b).