8300 Commits

Author SHA1 Message Date
Kelson
1f078634ae
Merge pull request #3653 from kiwix/Fix#3109
Use libkiwix to store bookmarks
2024-02-07 11:02:02 +01:00
MohitMaliFtechiz
81994805b7 Upgraded java-libkiwix to 2.0.0
* Re-enabled test case for migrating bookmarks more then 512 to test it properly on API level 24.
2024-02-07 11:44:56 +05:30
MohitMaliFtechiz
1460e0d4e5 Fixed Migration test was failing on the API level 24. 2024-02-07 11:44:28 +05:30
MohitMaliFtechiz
ed2a9e0ec9 Fixed the failing LibkiwixBookmarkTest on Android 33 and 30. 2024-02-07 11:44:16 +05:30
MohitMaliFtechiz
50f92beeb1 Fixed the failing LibkiwixBookmarkTest.
* Enhanced the process of adding books to the library to prevent unnecessary data loading from libkiwix.
* Released the memory occupied by bookmarks and archives to resolve potential issues when running migrations on lower-end devices.
2024-02-07 11:44:08 +05:30
MohitMaliFtechiz
99cf75bf59 Improved the large data migration.
* Refined test cases to thoroughly assess the migration process.
* Enhanced the migration logic to effectively manage large datasets during migration.
* Optimized the Bookmark functionality to minimize unnecessary data loading on libkiwix. Retrieving data from libkiwix is now performed only when there is a change in the bookmark, reducing redundant data fetches. Otherwise, the previously loaded data is returned to minimize unnecessary resource access.
2024-02-07 11:44:00 +05:30
MohitMaliFtechiz
efd8caf244 Enhanced the migration process to handle exceptions more effectively. 2024-02-07 11:43:47 +05:30
MohitMaliFtechiz
f45e321655 Refactored the test cases.
* Improved the instrumentation test cases.
* Improved the migration test case.
2024-02-07 11:43:37 +05:30
MohitMaliFtechiz
e866dd29b5 Writing bookmarks and library data to a file in the background to avoid impacting application performance. 2024-02-07 11:43:26 +05:30
MohitMali
60966b9a52 Getting zimFilePath efficiently for LibkiwixBookmarkItem.
* Removed unused imports.
2024-02-07 11:42:43 +05:30
MohitMali
8666675acc Storing bookmarks/library inside our app-specific directory 2024-02-07 11:35:41 +05:30
MohitMali
ecc0d4b484 Removed unnecessary comments 2024-02-07 11:35:32 +05:30
MohitMali
0d48e23da5 Instead of creating an archive object for every book and retrieving the favicon from it, we are now speeding up the process by directly taking the favicon from the book, as the issue at https://github.com/kiwix/java-libkiwix/issues/73 has been resolved. 2024-02-07 11:35:21 +05:30
MohitMali
d821d5a07b Fixed path and improved the logs 2024-02-07 11:35:13 +05:30
MohitMali
aaa9cc368c Added logs while reading reading the bookmarks/library data, and added logs before writing the library in file. 2024-02-07 11:35:06 +05:30
MohitMali
6c5afa9413 The writing of the library to a file when retrieving bookmarks for the current book has been removed because adding the book to the library is unnecessary, as we have not saved any bookmarks yet.
* We now write bookmarks and the library on the main thread instead of saving them in the background thread to prevent any data loss.
2024-02-07 11:34:57 +05:30
MohitMali
1f3cfd6739 Fixed, compilation error 2024-02-07 11:34:49 +05:30
MohitMali
a3af901ef6 Resolved bookmark saving issue, which causes the bug when we try to retrieve the saved bookmarks.
* Enhanced the `isBookMarkExist` method, addressing a bug that prevented the addition of new bookmarks for the same file. The method has been refactored for improved functionality.
* In the debug version, added informative logs to provide developers with insights into the bookmark-saving functionality.
2024-02-07 11:34:41 +05:30
MohitMali
a78c4562f2 Removed the unnecessary wrapper classes of libkiwix from the codebase since we don't need these classes as saving/deleting functionality will be tested in java-libkiwix.
* Added instrumentation test case for testing the UI part with libkiwix bookmark functionality.
2024-02-07 11:34:33 +05:30
MohitMaliFtechiz
94a529cdf9 Introducing the writeFile method of the Library class allows us to save the library, which contains information about books, their file paths, and favicons, into a file.
* We now save this library information into a file named `library.txt` and subsequently read from it to retrieve file paths and favicons.
* The test cases have been refactored to accommodate this new functionality.
* The `ObjectBoxToLibkiwiMigrator` code has also been enhanced. With this change, we now save books in the library for their favicon and zimFilePath, resulting in a refactor and improvement of this class's functionality and its associated test cases.
* The process of writing bookmarks and library data to file has been enhanced. Now, this is performed asynchronously in a background thread to mitigate potential data loss.
* Additionally, several other improvements have been made throughout the codebase.
2024-02-07 11:34:21 +05:30
MohitMali
07e40ee3ac Improved LibkiwixBookTest and added new ObjectBoxToLibkiwixMigratorTest cases 2024-02-07 11:33:34 +05:30
MohitMali
3d7a4af7d3 Fixed application crash while running application on the emulators. 2024-02-07 11:33:27 +05:30
MohitMali
429502af19 Refactored unit coverage test cases for testing bookmarks with LibkiwixBookmarks. 2024-02-07 11:33:16 +05:30
MohitMali
19085d69bb Fixed after delete/save bookmark list is not updating.
* We introduced a Flowable list in LibkiwixBookmarks to observe live changes on the UI. Previously, the UI was not updating after deleting bookmarks on the BookmarkScreen, and toggling bookmarks in the reader screen was also not reflecting the changes. To address this, we created a Flowable list and are now observing it whenever bookmarks are added or removed in the library.
2024-02-07 11:32:58 +05:30
MohitMali
7c23207225 Fixed detekt errors 2024-02-07 11:32:50 +05:30
MohitMali
b2c1c1ed5d Improved seleted items method for avoid duplicacy 2024-02-07 11:32:42 +05:30
MohitMali
e85b7176d3 Migrating bookmarks from objectbox to libkiwix 2024-02-07 11:32:34 +05:30
MohitMali
0c750fcaf0 Fixed all bookmarks automatically selected if we select only one bookmark 2024-02-07 11:32:25 +05:30
MohitMali
9d69aebb9b Improved saving bookmark, add book to the libkiwix library if not already added. 2024-02-07 11:32:13 +05:30
MohitMali
7a375e415b Fixed bookmark not redable from file if there is no book added to the library 2024-02-07 11:32:05 +05:30
MohitMali
c384849631 Improved url loading for current book 2024-02-07 11:31:54 +05:30
MohitMali
d68c890e8f Save bookmark when it does not exist in the file since bookmarks is now written in a file with libkiwix 2024-02-07 11:31:34 +05:30
MohitMali
88e30e19fd Refactored the code to display saved bookmarks in the bookmarks screen, improved the delete functionality in the bookmark screen, and also refactored the add/delete bookmark functionality in the reader fragment. 2024-02-07 11:31:25 +05:30
MohitMali
de900fda6f Implemented Save/Delete functionality with libkiwix. 2024-02-07 11:31:18 +05:30
MohitMali
627851a127 Fixed ObjectBoxToLibkiwixMigrator implementation not found 2024-02-07 11:31:08 +05:30
MohitMali
45531afc80 Created saved deleted feature and implemented the functionality, created flowables to perform bookmarks operation on background thread for better user experience. 2024-02-07 11:30:59 +05:30
MohitMali
98556246e5 Storing Bookmarks via libkiwix instead of Objectbox 2024-02-07 11:30:50 +05:30
MohitMali
da3241bea0 Created LibkiwixBooks to store and retrieve bookmarks 2024-02-07 11:30:42 +05:30
MohitMali
4fe6d11596 Created ObjectBox to libkiwix migrator for Bookmarks. 2024-02-07 11:30:32 +05:30
Kelson
816d9d59b8
Merge pull request #3670 from kiwix/translatewiki
Localisation updates from https://translatewiki.net.
2024-02-06 18:44:49 +01:00
translatewiki.net
d733ee8812 Localisation updates from https://translatewiki.net. 2024-02-06 18:44:03 +01:00
Kelson
32ed9118e5
Merge pull request #3695 from kiwix/Fix3684
Fixed: Can't download 4+ gb files.
2024-02-06 18:42:36 +01:00
MohitMaliFtechiz
d1eff9c7e7 Fixed: Can't download 4+ gb files.
* A few Samsung devices use the `f2fs` file system, such as the `Samsung Galaxy Note 10` and `Samsung s23 ultra`. Therefore, we have added the f2fs file system to the support 4GB filesystem list because this file system type allows the writing of files larger than 4GB.
2024-02-06 18:10:14 +05:30
Kelson
4b0e473f0e
Merge pull request #3694 from kiwix/Fix#3693
Upgraded `java-libkiwix` to 2.0.0
2024-02-06 10:59:52 +01:00
MohitMaliFtechiz
23ede348cc Upgraded java-libkiwix to 2.0.0
* A new version of java-libkiwix has been released so we are using the new version of java-libkiwix in our project.
2024-02-06 12:51:24 +05:30
Kelson
ba327da5b5
Merge pull request #3674 from kiwix/Fix#3646
Improved the scanning of ZIM files.
2024-02-05 21:00:26 +01:00
MohitMaliFtechiz
3cb5d8acf5 Fixed minor UI issue. 2024-02-05 21:00:05 +01:00
MohitMaliFtechiz
b86e87ffd5 Increase height of progress bar to properly show to the user. 2024-02-05 21:00:05 +01:00
MohitMaliFtechiz
57800a8da7 Fixed FileSearchTest, StorageObserverTest, and ZimManageViewModelTest test that are failing after this change. 2024-02-05 21:00:05 +01:00
MohitMaliFtechiz
13b0ab0519 Displaying the scanning progress to the user:
* We have enhanced our scanning process to provide real-time progress updates, allowing users to track how much time is required to complete the operation.
2024-02-05 21:00:05 +01:00