Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filtering out already existing tags #444

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

th8m0z
Copy link
Contributor

@th8m0z th8m0z commented Feb 5, 2024

I've made it possible to filter out already set tags in the book editing view. I did not get the chance to extensively test it, because the current version fails with this error upon adding or editing a book:

SqfliteDatabaseException (DatabaseException(Error Domain=FMDatabase Code=1 "table booksTable has no column named readings" UserInfo={NSLocalizedDescription=table booksTable has no column named readings}) sql 'INSERT INTO booksTable

Can add a separate issue soon.

@mateusz-bak
Copy link
Owner

mateusz-bak commented Feb 5, 2024

Great @th8m0z !

Now readings filed should be added in the database version 7. This should work if you uninstall the app and install clean. But now I'm a bit scared that the updated didn't work.

I did some changes in in #436 , especially here with database change: https://github.com/mateusz-bak/openreads-android/pull/436/files#diff-6d075ff4a7e267a6a1e94238a2c9794cb4f63b4c0e9d8431295d8f80038b13ff

After thisI did #440 that added readings column in the db but I didn't upgrade the db version, so I hope this is caused by this.

@th8m0z
Copy link
Contributor Author

th8m0z commented Feb 5, 2024

Yes, reinstalling solved it for me thanks. Will make some more edits to my implementation as right now it's only filtering when tags of the book are already saved, not when the user has just put them in.

@th8m0z
Copy link
Contributor Author

th8m0z commented Feb 27, 2024

Hey again, filtering tags even when the book is not saved finally worked, the solution was to just trigger a reload via calling an empty setState after the tag is added.

@mateusz-bak
Copy link
Owner

Great! Can you fix the merge confilicts?

@th8m0z
Copy link
Contributor Author

th8m0z commented Feb 29, 2024

This should work, I think. Tried via the Github editor.

EDIT: GitHub editor doesn't seem to work, I made a mistake during the merge. I'll do this via VSCode.

EDIT 2: Should be fixed now

@th8m0z
Copy link
Contributor Author

th8m0z commented Feb 29, 2024

Or is the publication year field no longer relevant?

@mateusz-bak
Copy link
Owner

Or is the publication year field no longer relevant?

It is, what's the conflict there?

@th8m0z
Copy link
Contributor Author

th8m0z commented Mar 1, 2024

With the newest commit, everything should be fine

@mateusz-bak mateusz-bak self-requested a review March 2, 2024 10:42
Copy link
Owner

@mateusz-bak mateusz-bak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found one issue: When you deselect a tag it is not shown in the propositions.

@th8m0z
Copy link
Contributor Author

th8m0z commented Mar 4, 2024

I'll look into it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants