Skip to content

Fix #444 + Kitsu detail change + episode/chapter name marquee effect #445

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

Merged
merged 10 commits into from
Apr 22, 2025

Conversation

NBA2K1
Copy link
Contributor

@NBA2K1 NBA2K1 commented Apr 21, 2025

  • Kitsu tracker now displays the ì character correctly.
  • Kitsu detail now shows "Start date" and "Finish date" like MAL tracker, instead of "01 Jan 1970"

image

  • Marquee effect for episode/chapter names when they are too long to fit in the line.
    Before:
    image

After:
https://github.com/user-attachments/assets/32fc90d0-61a1-4d5b-94f6-91bb8e675d8f

NBA2K1 added 8 commits April 21, 2025 19:05
Instead of "01 Jan 1970" show "Start date" and "Finish Date" on kitsu. Just like MyAnimeList
- Tracker Kitsu now displays "ì" correctly
- Removed a lot of code duplication in Kitsu.
title text scroll (like a marquee effect) when the chapter/episode name is too long.
```
[ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: Bad state: Cannot use "ref" after the widget was disposed.
#0      ConsumerStatefulElement._assertNotDisposed (package:flutter_riverpod/src/consumer.dart:550:7)
consumer.dart:550
#1      ConsumerStatefulElement.read (package:flutter_riverpod/src/consumer.dart:619:5)
consumer.dart:619
#2      _MainScreenState.initState.<anonymous closure>.<anonymous closure> (package:mangayomi/modules/main_view/main_screen.dart:70:13)
main_screen.dart:70
#3      _Timer._runTimers (dart:isolate-patch/timer_impl.dart:410:19)
timer_impl.dart:410
#4      _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:441:5)
timer_impl.dart:441
#5      _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:194:12)
isolate_patch.dart:194
```
```
════════ Exception caught by widgets library ═══════════════════════════════════
The following UnsupportedError was thrown building CircularProgressIndicator(100.0%, dependencies: [InheritedCupertinoTheme, _InheritedTheme, _LocalizationsScope-[GlobalKey#3b6da]], state: _CircularProgressIndicatorState#8c03b(ticker inactive)):
Unsupported operation: Infinity or NaN toInt

The relevant error-causing widget was:
    CircularProgressIndicator CircularProgressIndicator (package:mangayomi/modules/manga/reader/widgets/circular_progress_indicator_animate_rotate.dart:56:27)
```
At line 963, when scrolling too fast in manga reader and page didn't load before.
```
═══════ Exception caught by foundation library ════════════════════════════════
The following StateError was thrown while dispatching notifications for ValueNotifier<Iterable<ItemPosition>>:
Bad state: No element
```
@NBA2K1
Copy link
Contributor Author

NBA2K1 commented Apr 22, 2025

Fixed 3 different exceptions:
1.

[ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: Bad state: Cannot use "ref" after the widget was disposed.
#0      ConsumerStatefulElement._assertNotDisposed (package:flutter_riverpod/src/consumer.dart:550:7)
consumer.dart:550
https://github.com/kodjodevf/mangayomi/pull/1      ConsumerStatefulElement.read (package:flutter_riverpod/src/consumer.dart:619:5)
consumer.dart:619
https://github.com/kodjodevf/mangayomi/pull/2      _MainScreenState.initState.<anonymous closure>.<anonymous closure> (package:mangayomi/modules/main_view/main_screen.dart:70:13)
main_screen.dart:70
https://github.com/kodjodevf/mangayomi/issues/3      _Timer._runTimers (dart:isolate-patch/timer_impl.dart:410:19)
timer_impl.dart:410
https://github.com/kodjodevf/mangayomi/pull/4      _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:441:5)
timer_impl.dart:441
https://github.com/kodjodevf/mangayomi/pull/5      _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:194:12)
isolate_patch.dart:194
════════ Exception caught by widgets library ═══════════════════════════════════
The following UnsupportedError was thrown building CircularProgressIndicator(100.0%, dependencies: [InheritedCupertinoTheme, _InheritedTheme, _LocalizationsScope-[GlobalKey#3b6da]], state: _CircularProgressIndicatorState#8c03b(ticker inactive)):
Unsupported operation: Infinity or NaN toInt

The relevant error-causing widget was:
    CircularProgressIndicator CircularProgressIndicator (package:mangayomi/modules/manga/reader/widgets/circular_progress_indicator_animate_rotate.dart:56:27)
  1. In reader_view.dart at line 963, when scrolling too fast in manga reader and page didn't load before.
═══════ Exception caught by foundation library ════════════════════════════════
The following StateError was thrown while dispatching notifications for ValueNotifier<Iterable<ItemPosition>>:
Bad state: No element
  • re-added check if System theme has been changed (main.dart)
  • New theme_provider, instead of doing everything in the main.dart

NBA2K1 added 2 commits April 22, 2025 04:55
Flutter already knows how to switch the theme automatically.
No need to listen to onPlatformBrightnessChanged.
This works on cold start.
Works when app is running and system theme changes.
And works when backup was done on different system theme and restore is being done on different system theme.
@kodjodevf kodjodevf merged commit 00d9b83 into kodjodevf:main Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants