-
Notifications
You must be signed in to change notification settings - Fork 5
Fix for updating objects count and size when deleting objects inside folder #827
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
Conversation
| obj.containerID = container.id; | ||
| obj.tokens = isSegmentsContainer ? [] : tokenize(obj.name); | ||
| }); | ||
| await state.db.objects.bulkPut(objects).catch(() => {}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's nice to get rid of this :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
|
Could you explain what was wrong with the previous logic, and how you solved it? |
|
I was using some bootstrap nav item class which was not responsive on screen resizing. I need to add some other nav class element to make it responsive. Things are not fixed yet :) I am working on it. |
Did you mean to comment on #790? |
@csc-felipe Because of this existing containers weren't put into the database or updated in any way. Instead, we needed to check if the container already exists in database, and perform an update on the existing container using it's internal key. Replacing existing entries in the database would've worked if the The new version actually checks if the old entries are in the database, and just updates them if need be. After giving this a bit more thought removing the |
|
Thanks for explaining! Makes me wonder why did I make the incremental ID as primary key. I might have not realized that we could use Indeed, I'm relieved that |
|
Thanks @sampsapenna for helping explain this very comprehensively! 💯 |
Description
Deleting objects inside a folder should now update the folder's items count and size correctly.
Related issues
Fixes #743
Type of change
Changes Made
store.jsTesting