Closed MohitMaliFtechiz closed 1 year ago
My bad! This is the libkiwix feature for only getting the current zim file bookmarks lib.getBookmarks(true);
if we pass false
then it starts reading the full bookmark file.
for only getting the current zim file bookmarks
This is not exactly true.
true
means that it only return "valid" bookmarks. In this context, a bookmark is considered valid if it is about a book actually stored in the library.
As you create a new library without books, there is no valid bookmark.
Manager
is unable to read the bookmarks from the file if we have not added thebook
to the library for which book we have saved the bookmarks in that file.e.g. First I added two books to the library and saved some bookmarks to a file and after that, I closed the application, now I reopened the application and tried to load the bookmarks from that file but it did not read any bookmarks from this file, and return nothing, but if I again add same book to the library then it starts reading the bookmarks from that file for this added book but still not reading the other bookmarks which we had saved for other books. But here it should read all the bookmarks from the file without adding the book to the library as bookmarks are independent.
Steps to reproduce the behavior
you can add these test cases in the
test.java
class for testing, create abookmark.txt
file inside test package add these bookmarks to that file, and run the test cases.