-
-
Notifications
You must be signed in to change notification settings - Fork 439
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
Fixed: Create only one reader and use it everywhere. #3624
base: main
Are you sure you want to change the base?
Conversation
e31df7b
to
8040c4e
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3624 +/- ##
============================================
- Coverage 53.03% 52.98% -0.06%
- Complexity 1307 1316 +9
============================================
Files 292 293 +1
Lines 10992 11065 +73
Branches 1458 1472 +14
============================================
+ Hits 5830 5863 +33
- Misses 4198 4231 +33
- Partials 964 971 +7 ☔ View full report in Codecov by Sentry. |
8040c4e
to
ab38adf
Compare
@MohitMaliFtechiz I had only a quick overview and my feelings are a bit mixed... I don't have a definitive opinion, but none of history, notes or bookmarks should actually still deal - at this level fd/path - with the ZIM files. The ZIM UUID (or an other internal ID) should be alone to attach notes/bookmarks/... to the rest and then get - from a central interface - all other book related details (like the filehandler, reader, ...) The central library should probably be handled as singleton or similar. |
ab38adf
to
b70c4ad
Compare
da37eaf
to
425880a
Compare
The architecture is weak, you don't need to open a file with libkiwix to know if it will be a success or not. So don't do it. If you really need a method Exactly the same kind of misconception like I have explained in length in #3649 (which has not been updated following my instructions). We are running out of time. in addition, I see no reason why we have two different class to open a handle a ZIM via path or fd, it should be one class with two differrent constructors. |
@kelson42 We are not opening the file/fileDescriptor in libkiwix to check if it can open or not in libkiwix.
I have done this to make it a well-structured/separate concern and reduce the complexity of methods inside the class since both have different ways to open and manage the ZIM files. If you want to make it one class so okay I am making the changes. |
786e862
to
2df6cc8
Compare
@MohitMaliDeveloper small conflicts are here. @kelson42 what do you think about the @MohitMaliDeveloper latest comment? |
2df6cc8
to
4b91091
Compare
4b91091
to
3986c0a
Compare
@gouri-panda All the conflicts and project compilation errors have been resolved. |
3986c0a
to
1c0e026
Compare
151f0c2
to
da051e0
Compare
da051e0
to
3434529
Compare
…elper class to handle all the creation of fileHandler whether we have created the ZimFileReader via filePath or fileDescriptor.
* Fixed MimeTypeTest.
…`ZimReaderSource`. * Now, we have a unified class for opening the ZIM file via path/fd. The file can be opened using the `ZimReaderSource` class with different constructors for path/fd.
* Improved the test cases for saving/migrating bookmarks in libkiwix. * Improved libkiwix bookmark saving/retrieving according to one reader.
…ser opens te ZIM file via deep linking.
Fixes #3536
zimFile
, andassetFileDescriptor
and using it for all the features. We have created a helper class to handle all the creation offilehandler
whether we have opened the ZIM File viaFileDescriptor
orFilePath
. It handles all the related details inside it and avoids the rewriting of code(one for filePath, and the second for fileDescriptor) which is bug-prone like we have faced in Fixed, the search is not working in dwds app. #3535.canOpenInLibkiwix()
which ensures that the zim file can be opened in libkiwix or not before passing it to the libkiwix to avoid any crash thrown by the libkiwix see Added file picker in play store variant #3636 (comment).