8092 Commits

Author SHA1 Message Date
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
MohitMaliFtechiz
153765491a Removed the default scanning behavior upon launching the LocalLibraryFragment.
* Now, scanning the storage only occurs when the user explicitly requests it. When the user attempts to refresh the list, the storage is scanned to identify ZIM files. This approach prevents unnecessary scanning when users frequently navigate to other screens.
2024-02-05 21:00:05 +01:00
MohitMaliFtechiz
ab1f9bad6b Improved the scanning of ZIM files.
* Excluding the "data," "obb," and "Trash" folders from scanning is justified for several reasons. The "Trash" folder contains deleted files, making it unnecessary for scanning. Additionally,
the "data" and "obb" folders are specifically designed for the
app's private directory, and users usually do not store ZIM files there.
Most file managers prohibit direct copying of files into these directories. Therefore, scanning these folders is not essential. Moreover, such scans consume time, given the presence of numerous files written by other apps, which are irrelevant to our application.
2024-02-05 21:00:05 +01:00
Kelson
9b3bfa4fe6
Merge pull request #3687 from kiwix/AddedTestCasesForNotesFragment
Added test cases for notes.
2024-02-03 16:44:16 +01:00
MohitMaliFtechiz
894a8e559e Added test cases for notes.
* We identified an issue where opening notes crashes the application if the particular ZIM file does not exist. To test this scenario, we have added corresponding test cases.
* These test cases cover both scenarios – when the ZIM file is deleted and when it is present.
2024-02-03 14:17:35 +01:00
Kelson
796c5a000f
Merge pull request #3688 from kiwix/Fix#3623
Fixed: Inconsistent Visibility Behavior: Text and Button Overlay When Opening Tabs.
2024-02-03 14:16:47 +01:00
MohitMaliFtechiz
cfcb429da3 Fixed: Inconsistent Visibility Behavior: Text and Button Overlay When Opening Tabs.
* Fixed the tab icon showing when there is no ZIM file is opened in the reader which causing the unexpected UI behaviour.
* Fixed "Read Aloud" menu item is showing when we close all tabs(which means currently no ZIM file is opened in the reader) so showing this button is redundant.
2024-02-03 14:16:30 +01:00
Kelson
0fafa8520b
Merge pull request #3690 from kiwix/Fix#3555
Fixed some `TypographyQuotes` errors in our main English version.
2024-02-02 19:42:45 +01:00
MohitMaliFtechiz
7accb4a651 Fixed some TypographyQuotes error in our main english version. 2024-02-01 17:37:46 +05:30