mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
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:
commit
aef6bf559a
5 changed files with 31 additions and 6 deletions
|
|
@ -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' },
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
11
packages/db/migrations/0130.do.update_continue_reading_filter.sql
Executable file
11
packages/db/migrations/0130.do.update_continue_reading_filter.sql
Executable 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;
|
||||
11
packages/db/migrations/0130.undo.update_continue_reading_filter.sql
Executable file
11
packages/db/migrations/0130.undo.update_continue_reading_filter.sql
Executable 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;
|
||||
|
|
@ -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'
|
||||
|
|
|
|||
Loading…
Reference in a new issue