diff options
| author | Fuwn <[email protected]> | 2026-02-10 02:30:54 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-02-10 02:30:54 -0800 |
| commit | c5c8b3d6b561ebc73b28c83d4a1e6938ea859d4a (patch) | |
| tree | 86d6077ce8b2b95a935f234d4c185ceb390b2b16 /supabase/schema.sql | |
| parent | fix: exclude hidden feeds from unread counts (diff) | |
| download | asa.news-c5c8b3d6b561ebc73b28c83d4a1e6938ea859d4a.tar.xz asa.news-c5c8b3d6b561ebc73b28c83d4a1e6938ea859d4a.zip | |
fix: exclude hidden feeds from total/folder unread counts only
Reverts the DB-level filter so individual hidden feeds still show
their own unread badge. Filters client-side in totalUnreadCount
and getFolderUnreadCount instead.
Diffstat (limited to 'supabase/schema.sql')
| -rw-r--r-- | supabase/schema.sql | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/supabase/schema.sql b/supabase/schema.sql index 449976e..506c127 100644 --- a/supabase/schema.sql +++ b/supabase/schema.sql @@ -2,7 +2,7 @@ -- PostgreSQL database dump -- --- \restrict W2cBW1TPQUb3U4lgbznQs959iNXBLp2VCiLY9C9QxhpgmdbQT0imaeM9WBwSLF7 +-- \restrict 0mmsTcufp2FI3XpIMChzPAZKFqddFPKhI5BSvb2hP6z6YzXtiBKaTn2Wpanvc7Q -- Dumped from database version 17.6 -- Dumped by pg_dump version 17.6 @@ -818,8 +818,7 @@ CREATE OR REPLACE FUNCTION "public"."get_unread_counts"() RETURNS TABLE("feed_id SELECT e.feed_id, COUNT(*) AS unread_count FROM entries e INNER JOIN subscriptions s ON s.feed_id = e.feed_id AND s.user_id = auth.uid() - WHERE s.hidden_from_timeline = false - AND NOT EXISTS ( + WHERE NOT EXISTS ( SELECT 1 FROM user_entry_states ues WHERE ues.entry_id = e.id AND ues.user_id = auth.uid() @@ -3720,5 +3719,5 @@ ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON TAB -- PostgreSQL database dump complete -- --- \unrestrict W2cBW1TPQUb3U4lgbznQs959iNXBLp2VCiLY9C9QxhpgmdbQT0imaeM9WBwSLF7 +-- \unrestrict 0mmsTcufp2FI3XpIMChzPAZKFqddFPKhI5BSvb2hP6z6YzXtiBKaTn2Wpanvc7Q |