mirror of
https://github.com/kodjodevf/mangayomi.git
synced 2026-03-11 17:25:32 +00:00
fixed android screen
- adjusted show_text - fixed exception for android update screen
This commit is contained in:
parent
608fc525fb
commit
1db55b8018
5 changed files with 31 additions and 19 deletions
Binary file not shown.
|
|
@ -690,6 +690,7 @@ void Function() botToast(
|
||||||
],
|
],
|
||||||
bool onlyOne = true,
|
bool onlyOne = true,
|
||||||
bool? themeDark,
|
bool? themeDark,
|
||||||
|
bool showIcon = true,
|
||||||
}) {
|
}) {
|
||||||
final context = navigatorKey.currentState?.context;
|
final context = navigatorKey.currentState?.context;
|
||||||
final assets = [
|
final assets = [
|
||||||
|
|
@ -703,12 +704,14 @@ void Function() botToast(
|
||||||
duration: Duration(seconds: second),
|
duration: Duration(seconds: second),
|
||||||
animationDuration: Duration(milliseconds: animationDuration),
|
animationDuration: Duration(milliseconds: animationDuration),
|
||||||
animationReverseDuration: Duration(milliseconds: animationDuration),
|
animationReverseDuration: Duration(milliseconds: animationDuration),
|
||||||
leading: (_) => Image.asset(
|
leading: showIcon
|
||||||
|
? (_) => Image.asset(
|
||||||
(themeDark == null
|
(themeDark == null
|
||||||
? (assets..shuffle()).first
|
? (assets..shuffle()).first
|
||||||
: assets[themeDark ? 0 : 1]),
|
: assets[themeDark ? 0 : 1]),
|
||||||
height: 25,
|
height: 25,
|
||||||
),
|
)
|
||||||
|
: null,
|
||||||
title: (_) => Text(title, style: TextStyle(fontSize: fontSize)),
|
title: (_) => Text(title, style: TextStyle(fontSize: fontSize)),
|
||||||
trailing: hasCloudFlare
|
trailing: hasCloudFlare
|
||||||
? (_) => OutlinedButton.icon(
|
? (_) => OutlinedButton.icon(
|
||||||
|
|
|
||||||
|
|
@ -373,7 +373,16 @@ class _AnimeStreamPageState extends riv.ConsumerState<AnimeStreamPage>
|
||||||
if (value.ref.format == generated.mpv_format.MPV_FORMAT_STRING) {
|
if (value.ref.format == generated.mpv_format.MPV_FORMAT_STRING) {
|
||||||
final text = value.ref.u.string.cast<Utf8>().toDartString();
|
final text = value.ref.u.string.cast<Utf8>().toDartString();
|
||||||
if (text.isEmpty) break;
|
if (text.isEmpty) break;
|
||||||
botToast(text);
|
botToast(
|
||||||
|
text,
|
||||||
|
alignY: -0.99,
|
||||||
|
second: 2,
|
||||||
|
dismissDirections: const [
|
||||||
|
DismissDirection.vertical,
|
||||||
|
DismissDirection.horizontal,
|
||||||
|
],
|
||||||
|
showIcon: false,
|
||||||
|
);
|
||||||
nativePlayer.setProperty("user-data/aniyomi/show_text", "");
|
nativePlayer.setProperty("user-data/aniyomi/show_text", "");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -25,9 +25,9 @@ class DownloadFileScreen extends ConsumerStatefulWidget {
|
||||||
class _DownloadFileScreenState extends ConsumerState<DownloadFileScreen> {
|
class _DownloadFileScreenState extends ConsumerState<DownloadFileScreen> {
|
||||||
int _total = 0;
|
int _total = 0;
|
||||||
int _received = 0;
|
int _received = 0;
|
||||||
late http.StreamedResponse _response;
|
http.StreamedResponse? _response;
|
||||||
final List<int> _bytes = [];
|
final List<int> _bytes = [];
|
||||||
late StreamSubscription<List<int>>? _subscription;
|
StreamSubscription<List<int>>? _subscription;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
|
|
@ -131,8 +131,8 @@ class _DownloadFileScreenState extends ConsumerState<DownloadFileScreen> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_response = await http.Client().send(http.Request('GET', Uri.parse(url)));
|
_response = await http.Client().send(http.Request('GET', Uri.parse(url)));
|
||||||
_total = _response.contentLength ?? 0;
|
_total = _response?.contentLength ?? 0;
|
||||||
_subscription = _response.stream.listen((value) {
|
_subscription = _response?.stream.listen((value) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_bytes.addAll(value);
|
_bytes.addAll(value);
|
||||||
_received += value.length;
|
_received += value.length;
|
||||||
|
|
|
||||||
16
pubspec.lock
16
pubspec.lock
|
|
@ -1164,7 +1164,7 @@ packages:
|
||||||
description:
|
description:
|
||||||
path: media_kit
|
path: media_kit
|
||||||
ref: HEAD
|
ref: HEAD
|
||||||
resolved-ref: "08e91da7229c818a25822b3cd3d77415d5f2af36"
|
resolved-ref: "58c7aaf631e9cfeaed622074b19f81464fb51bec"
|
||||||
url: "https://github.com/Schnitzel5/media-kit.git"
|
url: "https://github.com/Schnitzel5/media-kit.git"
|
||||||
source: git
|
source: git
|
||||||
version: "1.2.0"
|
version: "1.2.0"
|
||||||
|
|
@ -1173,7 +1173,7 @@ packages:
|
||||||
description:
|
description:
|
||||||
path: "libs/android/media_kit_libs_android_video"
|
path: "libs/android/media_kit_libs_android_video"
|
||||||
ref: HEAD
|
ref: HEAD
|
||||||
resolved-ref: "08e91da7229c818a25822b3cd3d77415d5f2af36"
|
resolved-ref: "58c7aaf631e9cfeaed622074b19f81464fb51bec"
|
||||||
url: "https://github.com/Schnitzel5/media-kit.git"
|
url: "https://github.com/Schnitzel5/media-kit.git"
|
||||||
source: git
|
source: git
|
||||||
version: "1.3.7"
|
version: "1.3.7"
|
||||||
|
|
@ -1182,7 +1182,7 @@ packages:
|
||||||
description:
|
description:
|
||||||
path: "libs/ios/media_kit_libs_ios_video"
|
path: "libs/ios/media_kit_libs_ios_video"
|
||||||
ref: HEAD
|
ref: HEAD
|
||||||
resolved-ref: "08e91da7229c818a25822b3cd3d77415d5f2af36"
|
resolved-ref: "58c7aaf631e9cfeaed622074b19f81464fb51bec"
|
||||||
url: "https://github.com/Schnitzel5/media-kit.git"
|
url: "https://github.com/Schnitzel5/media-kit.git"
|
||||||
source: git
|
source: git
|
||||||
version: "1.1.4"
|
version: "1.1.4"
|
||||||
|
|
@ -1191,7 +1191,7 @@ packages:
|
||||||
description:
|
description:
|
||||||
path: "libs/linux/media_kit_libs_linux"
|
path: "libs/linux/media_kit_libs_linux"
|
||||||
ref: HEAD
|
ref: HEAD
|
||||||
resolved-ref: "08e91da7229c818a25822b3cd3d77415d5f2af36"
|
resolved-ref: "58c7aaf631e9cfeaed622074b19f81464fb51bec"
|
||||||
url: "https://github.com/Schnitzel5/media-kit.git"
|
url: "https://github.com/Schnitzel5/media-kit.git"
|
||||||
source: git
|
source: git
|
||||||
version: "1.2.1"
|
version: "1.2.1"
|
||||||
|
|
@ -1200,7 +1200,7 @@ packages:
|
||||||
description:
|
description:
|
||||||
path: "libs/macos/media_kit_libs_macos_video"
|
path: "libs/macos/media_kit_libs_macos_video"
|
||||||
ref: HEAD
|
ref: HEAD
|
||||||
resolved-ref: "08e91da7229c818a25822b3cd3d77415d5f2af36"
|
resolved-ref: "58c7aaf631e9cfeaed622074b19f81464fb51bec"
|
||||||
url: "https://github.com/Schnitzel5/media-kit.git"
|
url: "https://github.com/Schnitzel5/media-kit.git"
|
||||||
source: git
|
source: git
|
||||||
version: "1.1.4"
|
version: "1.1.4"
|
||||||
|
|
@ -1209,7 +1209,7 @@ packages:
|
||||||
description:
|
description:
|
||||||
path: "libs/universal/media_kit_libs_video"
|
path: "libs/universal/media_kit_libs_video"
|
||||||
ref: HEAD
|
ref: HEAD
|
||||||
resolved-ref: "08e91da7229c818a25822b3cd3d77415d5f2af36"
|
resolved-ref: "58c7aaf631e9cfeaed622074b19f81464fb51bec"
|
||||||
url: "https://github.com/Schnitzel5/media-kit.git"
|
url: "https://github.com/Schnitzel5/media-kit.git"
|
||||||
source: git
|
source: git
|
||||||
version: "1.0.6"
|
version: "1.0.6"
|
||||||
|
|
@ -1218,7 +1218,7 @@ packages:
|
||||||
description:
|
description:
|
||||||
path: "libs/windows/media_kit_libs_windows_video"
|
path: "libs/windows/media_kit_libs_windows_video"
|
||||||
ref: HEAD
|
ref: HEAD
|
||||||
resolved-ref: "08e91da7229c818a25822b3cd3d77415d5f2af36"
|
resolved-ref: "58c7aaf631e9cfeaed622074b19f81464fb51bec"
|
||||||
url: "https://github.com/Schnitzel5/media-kit.git"
|
url: "https://github.com/Schnitzel5/media-kit.git"
|
||||||
source: git
|
source: git
|
||||||
version: "1.0.11"
|
version: "1.0.11"
|
||||||
|
|
@ -1227,7 +1227,7 @@ packages:
|
||||||
description:
|
description:
|
||||||
path: media_kit_video
|
path: media_kit_video
|
||||||
ref: HEAD
|
ref: HEAD
|
||||||
resolved-ref: "08e91da7229c818a25822b3cd3d77415d5f2af36"
|
resolved-ref: "58c7aaf631e9cfeaed622074b19f81464fb51bec"
|
||||||
url: "https://github.com/Schnitzel5/media-kit.git"
|
url: "https://github.com/Schnitzel5/media-kit.git"
|
||||||
source: git
|
source: git
|
||||||
version: "1.3.0"
|
version: "1.3.0"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue