Merge pull request #2900 from omnivore-app/fix/web/continue-reading

update the filter value to use is:reading of the Continue Reading filter
This commit is contained in:
Hongbo Wu 2023-10-11 10:42:06 +08:00 committed by GitHub
commit aef6bf559a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 31 additions and 6 deletions

View file

@ -155,7 +155,10 @@ const createDefaultFiltersForUser =
async (userId: string): Promise<Filter[]> => {
const defaultFilters = [
{ name: 'Inbox', filter: 'in:inbox' },
{ name: 'Continue Reading', filter: 'in:inbox sort:read-desc is:unread' },
{
name: 'Continue Reading',
filter: 'in:inbox sort:read-desc is:reading',
},
{ name: 'Non-Feed Items', filter: 'in:library' },
{ name: 'Highlights', filter: 'has:highlights mode:highlights' },
{ name: 'Unlabeled', filter: 'no:label' },

View file

@ -313,7 +313,7 @@ async def main():
ES_USERNAME, ES_PASSWORD), retry_on_timeout=True)
try:
updated_user_ids = []
# updated_user_ids = []
print(await es_client.info())
@ -454,8 +454,8 @@ async def main():
library_items.append(library_item)
library_items_original_ids.append(doc_id)
if user_id not in updated_user_ids:
updated_user_ids.append(user_id)
# if user_id not in updated_user_ids:
# updated_user_ids.append(user_id)
# convert labels to postgres format
if 'labels' in source:
@ -551,7 +551,7 @@ async def main():
print('Migration complete', END_TIME)
await assert_data(db_conn, es_client, updated_user_ids, uploaded_files)
# await assert_data(db_conn, es_client, updated_user_ids, uploaded_files)
except Exception as err:
print('Migration error', err)
finally:

View file

@ -0,0 +1,11 @@
-- Type: DO
-- Name: update_continue_reading_filter
-- Description: Update the filter value in the Continue Reading filter
BEGIN;
UPDATE omnivore.filters
SET filter = 'in:inbox sort:read-desc is:reading'
WHERE name = 'Continue Reading' AND default_filter = true;
COMMIT;

View file

@ -0,0 +1,11 @@
-- Type: UNDO
-- Name: update_continue_reading_filter
-- Description: Update the filter value in the Continue Reading filter
BEGIN;
UPDATE omnivore.filters
SET filter = 'in:inbox sort:read-desc is:unread'
WHERE name = 'Continue Reading' AND default_filter = true;
COMMIT;

View file

@ -167,7 +167,7 @@ export const EmptyLibrary = (props: EmptyLibraryProps) => {
switch (props.searchTerm) {
case 'in:inbox':
return 'inbox'
case 'in:inbox sort:read-desc is:unread':
case 'in:inbox sort:read-desc is:reading':
return 'continue'
case 'in:library':
return 'non-feed'