Commit graph

1287 commits

Author SHA1 Message Date
Moustapha Kodjo Amadou
6b70fff6cc
Merge pull request #638 from 686udjie/main
add a force landscapre mode on mobile
2026-01-05 12:11:33 +01:00
NBA2K1
922582b270 Fix share params to avoid Text file
- avoids extra text file
- simplify RenderBox lookup
2026-01-04 20:25:13 +01:00
686udjie
79ee4b4fc8 add a force landscapre mode on mobile 2026-01-01 19:48:57 +02:00
NBA2K1
c8328fa347 improve performance of helper method
- compare integers instead of Strings
- cache results per day
2025-12-30 02:44:45 +01:00
NBA2K1
a63f0d67bd Extract helper methods
for better readability
2025-12-30 02:41:47 +01:00
NBA2K1
2c92d74a03 Fix invalid selection
Don't show manga calendar if manga is hidden.
2025-12-30 02:04:06 +01:00
NBA2K1
a2a10a799d Hide items in Calendar
When the user has hidden Manga or Anime or Novel, hide the buttons in the calendar.
2025-12-30 01:37:30 +01:00
NBA2K1
ba77c5baea Reduce Code Duplication
And add comments
2025-12-30 01:15:36 +01:00
NBA2K1
4e2d8b0038 Fix category rearrange bug
When rearranging categories in the Manga library, all categories in Anime and Novel were being deleted.
2025-12-30 00:27:49 +01:00
NBA2K1
821cbfa0dd Make function async
_updateCategoriesOrder() is now async
2025-12-29 23:38:17 +01:00
NBA2K1
4fb9f0a9df remove redundant things 2025-12-29 23:20:08 +01:00
NBA2K1
1ac605e30a Use the localized extension 2025-12-29 23:20:08 +01:00
NBA2K1
9efd76581f Group related functions using an extension
- new file item_type_filters.dart for the hiddenItemTypes function.
- reduces code duplication in statistics_screen, categories_screen and base_library_tab_screen
2025-12-29 23:19:31 +01:00
NBA2K1
7664e38cfd Fix "Show extensions" Button
The "Show extensions" Button was not working properly when categories were hidden.
An Exception would throw:
```
_AssertionError ('package:flutter/src/material/tab_controller.dart': Failed assertion: line 202 pos 12: 'value >= 0 && (value < length || length == 0)': is not true.)
```
And jump to the end of the tab list regardless of where you clicked the button.
2025-12-29 05:02:43 +01:00
NBA2K1
42f1dcff92 Reduce Code Duplication
- Extract localizedItemType() from `base_library_tab_screen.dart`
- Add localizedSources() and localizedExtensions() for browse_screen.dart
- Reduce if-statements in statistics_screen.dart
- Reduce if-statements in categories_screen.dart
- Reduce if-statements in browse_screen.dart
2025-12-29 04:59:06 +01:00
NBA2K1
86fb19ecb2 Refactor tabbed screens into base class
Reduce duplication
2025-12-29 03:28:04 +01:00
NBA2K1
bdcd28488e Same with history_screen.dart
- remove hideItems parameter
- Make TabBar and TabBarView cleaner
2025-12-29 01:58:49 +01:00
NBA2K1
30e6d50210 Make TabBar and TabBarView cleaner
Use the _visibleTabTypes list instead of the repeated if-statements.
2025-12-29 01:34:05 +01:00
NBA2K1
66b508d65d Cleanup
- Change _tabList String-list to be a list of ItemType
- Change its name to _visibleTabTypes
- Use that list in getCurrentItemType(), instead of creating a new list
2025-12-29 01:13:26 +01:00
NBA2K1
004885d557 Return library updater if library empty 2025-12-29 01:00:01 +01:00
NBA2K1
e463cce61a Make getCurrentItemType() readable
The previous version was just unnecessarily complicated, hard to read.
New version is very easy to read.
2025-12-29 00:38:33 +01:00
NBA2K1
67a83c0e6a Cleanup
Use getCurrentItemType() method to determine the ItemType of the current tab instead of the conditional with `_tabBarController.index`, which doesn't take into account that there could be hidden tabs.
2025-12-28 23:42:45 +01:00
NBA2K1
da566d3d0b remove hideItems parameter
No need to pass hideItems down, they all can use the top hideItems variable. It's never changed.
2025-12-28 23:16:29 +01:00
NBA2K1
c911594e73 Add logging and detailed botToast, remove doWhile
- Use the logger to log failed updates

- After the update-botToast another botToast is being spawned to show exactly which manga(s) couldn't be updated.

- Remove the doWhile loop because it is unnecessary. The condition of mangaList.length == numbers is always true, meaning it only runs once.
2025-12-28 23:08:54 +01:00
NBA2K1
9bd8a62d31 Reduce Code Duplication
Extract the `_updateLibrary()` function from `updates_screen.dart` and `library_screen.dart` to a top-level function in `libray_updater.dart`.
2025-12-28 22:59:44 +01:00
Moustapha Kodjo Amadou
344533aeb1 fix: show chanded source preference for mihon source 2025-12-23 19:18:18 +01:00
Moustapha Kodjo Amadou
e40e1b8fe6 fix: improve handling of proxy server URL in dialog 2025-12-23 18:32:04 +01:00
Moustapha Kodjo Amadou
e342fe16fb
Merge pull request #632 from NBA2K1/path-optimizations
Path optimizations
2025-12-18 17:09:33 +01:00
Moustapha Kodjo Amadou
390e6fed46
Merge pull request #629 from NBA2K1/main
Add log switch to about-menu
2025-12-18 17:05:01 +01:00
Moustapha Kodjo Amadou
19a051b660 feat: add updatePageCropImage method for chapter page cropping 2025-12-18 17:03:06 +01:00
NBA2K1
5f7ea7fcf4 reduce code duplication
Use the `formattedFileSize()` function instead of `_formatBytes()`
2025-12-17 22:25:45 +01:00
NBA2K1
0f83899bac remove unnecessary calls
.trimLeft().trimRight() after trim() is unnecessary.
2025-12-17 21:34:45 +01:00
NBA2K1
a078b59678 Use floor() instead of round()
- Using round() will push values up too early.
Example: log(999) / log(1024) = 0.999
.round() = 1.
Result: 0.98 kB instead of 999 B

- Use correct units, as base1024 = KiB, MiB, etc. and base1000 = kB, MB, GB, ...
2025-12-17 21:24:26 +01:00
NBA2K1
0ed8ee2cd2 Move cacheDir creation to storage_provider
- Move the cacheDir creation to storage_provider from `others.dart`, `custom_extended_image_provider.dart` and `storage_usage.dart`.

- Use the correct directory, `getApplicationCacheDirectory()` instead of the `getTemporaryDirectory()` (which is being deleted by the OS regularly) for cache files.

- remove the `_cacheDownloadPath` from `storage_usage.dart` as the path is never being created in the first place, so using that path in `clearCache()` and `_getTotalDiskSpace()` is unnecessary.
2025-12-17 20:55:41 +01:00
NBA2K1
67dee18776 remove redundant import 2025-12-17 20:43:23 +01:00
Moustapha Kodjo Amadou
76645d97c1 fix: improve error handling for Cloudflare bypass failures 2025-12-14 14:01:40 +01:00
Moustapha Kodjo Amadou
8fe910900b + 2025-12-14 13:17:47 +01:00
Moustapha Kodjo Amadou
1e469614d9 Chapter jump fix in vertical continuous mode 2025-12-14 13:16:19 +01:00
NBA2K1
284fccd1ef Add log-switch to app.
- New switch in More > Settings > About
"Enable logging".

When ON, it inits the AppLogger and shows the "Share app logs" button below.
When OFF, it disposes the AppLogger and hides the "Share app logs" button.
It also prevents the AppLogger from init.

OFF by default.

- added localizations accordingly.
2025-12-13 00:42:50 +01:00
Moustapha Kodjo Amadou
fc49b33826 feat(user-agent): add default user agent setting 2025-12-10 14:14:51 +01:00
Moustapha Kodjo Amadou
23e41373dc conditionally show Android proxy server option and update notes 2025-12-10 13:42:34 +01:00
Moustapha Kodjo Amadou
6e4d3dd52e feat(server): add server check before starting 2025-12-10 13:38:15 +01:00
Moustapha Kodjo Amadou
1b708d6884 feat(server): integrate MExtensionServer 2025-12-08 15:14:12 +01:00
Moustapha Kodjo Amadou
da7c32f71e
Merge pull request #614 from hndrbrm/add_always_on_top_on_anime_player_view
Add new feature: Always On Top on the anime player view.
2025-12-05 17:15:05 +01:00
Moustapha Kodjo Amadou
e48c475fcb refactor(statistics): update statistics provider to use functional provider pattern 2025-12-05 17:03:51 +01:00
Moustapha Kodjo Amadou
4e9af30e8e feat(reader): add page indicator, app bar, bottom bar, gesture handler, and settings modal
- PageIndicator widget to display current page and total pages.
- Created ReaderAppBar for navigation and chapter information.
- ReaderBottomBar for page navigation and settings access.
- Added ReaderGestureHandler for managing tap zones and gestures.
- ReaderSettingsModal for user-configurable settings.
2025-12-05 16:54:10 +01:00
Whiskas101
04267b7a50 fix: updated statistics to use async fetch from db 2025-11-30 14:37:48 +05:30
hndrbrm
91b8c08658 Make the AlwaysOnTopStateMixin private for least scope principal. 2025-11-29 17:36:06 +07:00
hndrbrm
a6df770275 Add new feature: Always On Top on the anime player view. 2025-11-29 17:11:14 +07:00
Moustapha Kodjo Amadou
9b5bae831e fix #613 2025-11-29 06:38:45 +01:00
Moustapha Kodjo Amadou
958e91ac9a
Merge pull request #612 from NBA2K1/main
Various fixes
2025-11-29 06:29:15 +01:00
NBA2K1
30c74423ad dispose in correct order 2025-11-29 02:57:25 +01:00
NBA2K1
c7e648a6d9 remove redundant calls 2025-11-29 01:36:34 +01:00
NBA2K1
33152fc035 Fix ProviderDisposedException
[ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: Cannot use the Ref of totalChapterCacheSizeStateProvider after it has been disposed. This typically happens if:
- A provider rebuilt, but the previous "build" was still pending and is still performing operations.
  You should therefore either use `ref.onDispose` to cancel pending work, or
  check `ref.mounted` after async gaps or anything that could invalidate the provider.
- You tried to use Ref inside `onDispose` or other life-cycles.
  This is not supported, as the provider is already being disposed.

#0      Ref._throwIfInvalidUsage (package:riverpod/src/core/ref.dart:220:7)
ref.dart:220
#1      AnyNotifier.state= (package:riverpod/src/core/provider/notifier_provider.dart:91:9)
notifier_provider.dart:91
#2      TotalChapterCacheSizeState.build.<anonymous closure> (package:mangayomi/modules/more/data_and_storage/providers/storage_usage.dart:17:42)
storage_usage.dart:17
#3      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:948:45)
future_impl.dart:948
#4      Future._propagateToListeners (dart:async/future_impl.dart:977:13)
future_impl.dart:977
#5      Future._completeWithValue (dart:async/future_impl.dart:720:5)
future_impl.dart:720
<asynchronous suspension>
2025-11-29 01:31:22 +01:00
NBA2K1
5fdbf530cb stopCfResolutionWebviewServer()
Stop the cf server on app exit
2025-11-29 00:18:13 +01:00
NBA2K1
5c34dcab9a Start Cloudflare resolution after app starts
- Defer the Cloudflare resolution webserver until after runApp().

- await said function
2025-11-28 23:59:37 +01:00
hndrbrm
cc84c33c25 Fix: Reverse icon for toggling the Extension. 2025-11-29 05:41:54 +07:00
NBA2K1
e0ecc94869 remove redundant calls
trimLeft() and trimRight() after trim() do nothing
2025-11-28 23:33:32 +01:00
Moustapha Kodjo Amadou
57fcb9e1c9 chore: update dependencies 2025-11-28 14:31:39 +01:00
Moustapha Kodjo Amadou
485696ea3f fix: enhance error message 2025-11-25 16:55:31 +01:00
Moustapha Kodjo Amadou
b6eb5f2f3f refactor: remove old layout migration code 2025-11-25 16:51:49 +01:00
Moustapha Kodjo Amadou
c2a1e5ee17 fix: improve error handling for backup restoration 2025-11-25 16:51:29 +01:00
Moustapha Kodjo Amadou
26362fe556 refactor: replace await for loop with listen for message handling 2025-11-25 15:35:29 +01:00
Moustapha Kodjo Amadou
405c3d8e35 fix 2025-11-25 15:34:38 +01:00
Moustapha Kodjo Amadou
ee46f8a8bc
Merge pull request #605 from Whiskas101/fix/memory-leak
Fix memory leaks in manga reader_view.dart
2025-11-25 15:32:00 +01:00
Moustapha Kodjo Amadou
f06df9b3b1 feat: implement CF resolution server 2025-11-25 14:53:22 +01:00
Moustapha Kodjo Amadou
1d81906c4f refactor: update message handling in GetIsolateService to use listen instead of for loop 2025-11-25 14:06:47 +01:00
Moustapha Kodjo Amadou
6a099415db refactor: simplify filter parsing logic & pass client cookie to mihon server 2025-11-24 16:59:21 +01:00
Whiskas101
9e9ffb4e79 fix: forgot to make cropBorder provider autoDispose 2025-11-21 14:25:16 +05:30
Whiskas101
18e8abce94 fix: dangling objects, removed old state provider for getPagesNumber 2025-11-20 22:24:27 +05:30
Whiskas101
20f8f1ad7c refactor: moved state provider into a non-closure based provider 2025-11-20 22:14:34 +05:30
Moustapha Kodjo Amadou
f2fbaf5ec5 refactor 2025-11-20 15:17:31 +01:00
Moustapha Kodjo Amadou
afc4c620f8 fix: prevent error when scrolling without clients 2025-11-12 17:04:38 +01:00
Moustapha Kodjo Amadou
29fe96151d fix: enable logger usage in isolate service 2025-11-12 17:02:06 +01:00
Moustapha Kodjo Amadou
daa205044f fix: improve layout and styling in manga detail view and chapter list tile 2025-11-12 15:23:17 +01:00
Moustapha Kodjo Amadou
a8f78d41fb fix: update directory handling for macOS 2025-11-12 11:45:27 +01:00
Moustapha Kodjo Amadou
db729ba6da + 2025-11-11 15:33:23 +01:00
Moustapha Kodjo Amadou
a9c8320f20 refactor: simplify CustomFloatingActionBtn and remove unnecessary width calculations 2025-11-11 15:27:12 +01:00
Moustapha Kodjo Amadou
beedb6e3b9 refactor 2025-11-11 15:14:32 +01:00
Moustapha Kodjo Amadou
1f21a75762 refactor: replace getExtensionService with getIsolateService for page and video list retrieval 2025-11-11 14:51:10 +01:00
Moustapha Kodjo Amadou
4940c18cbf improve cover image handling message 2025-11-11 14:25:45 +01:00
Moustapha Kodjo Amadou
b0baddc333 feat: add link tap functionality to ExpandableText widget 2025-11-11 14:04:50 +01:00
Moustapha Kodjo Amadou
fd615bd44b refactor: streamline archive import process and enhance cover image handling 2025-11-11 13:13:35 +01:00
Moustapha Kodjo Amadou
75d5013179 fix: ensure keepAlive is called in AutoBackupLocationState build method 2025-11-11 10:38:58 +01:00
Moustapha Kodjo Amadou
0903b9d7e3 refactor: improve code structure and enhance UI elements in the code editor and manga detail view 2025-11-11 10:38:27 +01:00
Moustapha Kodjo Amadou
494e31e396 adjust 2025-11-10 14:38:29 +01:00
Moustapha Kodjo Amadou
79ca3b2e39 + 2025-11-09 01:22:44 +01:00
Moustapha Kodjo Amadou
b8fffca2b3 Refactor an fix 2025-11-09 01:15:27 +01:00
Moustapha Kodjo Amadou
251d7266f5 Remove unnecessary padding from HTML content in reader view 2025-11-09 00:37:35 +01:00
Moustapha Kodjo Amadou
c19974d6d1 fix 2025-11-09 00:11:23 +01:00
Moustapha Kodjo Amadou
749b35083e Initialize rpcShowReadingWatchingProgress to false 2025-11-08 23:57:32 +01:00
Moustapha Kodjo Amadou
099805b21c Fix author display logic to handle empty author names 2025-11-08 23:45:04 +01:00
Moustapha Kodjo Amadou
b42e0ad4bd + 2025-11-08 23:43:01 +01:00
Moustapha Kodjo Amadou
93298c7376 fix novel download and improve HTML content processing 2025-11-08 23:37:22 +01:00
Moustapha Kodjo Amadou
dee1a8635c Refactor 2025-11-08 22:13:24 +01:00
Moustapha Kodjo Amadou
d35192629b Add keepAlive calls in Synching and SyncServer build methods 2025-11-08 22:04:57 +01:00
Moustapha Kodjo Amadou
c649525145 Fix directory deletion logic to check existence before deletion 2025-11-08 21:54:15 +01:00
Moustapha Kodjo Amadou
24849cc000
Merge pull request #517 from NBA2K1/Correct-directory
Standardize Folder Structure on Windows, Linux, iOS & macOS
2025-11-08 21:47:07 +01:00
Moustapha Kodjo Amadou
65e7d16062 Add Japanese localization and code refactor 2025-11-08 21:40:19 +01:00
Moustapha Kodjo Amadou
85ed2c50af Add more translations 2025-11-08 21:25:15 +01:00