Future-Scholars / paperlib

An open-source academic paper management tool.
https://paperlib.app
GNU General Public License v3.0
1.56k stars 67 forks source link

[Bug] Sort key bug #613

Open nvv1d opened 2 months ago

nvv1d commented 2 months ago

Why did I suddenly get this error? everything was perfect and then: RealmError RealmError: Cannot sort on key path 'feed': property 'PaperEntity.feed' does not exist. ...

Can't access anything in the app.

GeoffreyChen777 commented 2 months ago

Try to close and reopen paperlib?

nvv1d commented 2 months ago

I did, I even uninstalled and reinstalled it. Same error.

GeoffreyChen777 commented 2 months ago

What is your OS, windows? macOS?

nvv1d commented 2 months ago

I'm on Windows 11.

GeoffreyChen777 commented 2 months ago

Go to %APPDATA%/paperlib/. There is a file config.json. Open it, check mainviewSortBy, sidebarSortBy.

nvv1d commented 2 months ago

"sidebarSortBy": "name",

"mainviewSortBy": "feed",

not sure what to check but here they are.

GeoffreyChen777 commented 2 months ago

"mainviewSortBy": "feed", -> "mainviewSortBy": "addTime"

Then reopen paperlib.

nvv1d commented 2 months ago

Worked like a charm. Thank you. But why did this happen?

GeoffreyChen777 commented 2 months ago

It's a bug, when you sort the feed view by feed name, but never switch back to the library view before you close the paperlib, the mainviewSortBy will never restore. You cannot sort the main view with feed as the key.