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? themeDark,
|
||||
bool showIcon = true,
|
||||
}) {
|
||||
final context = navigatorKey.currentState?.context;
|
||||
final assets = [
|
||||
|
|
@ -703,12 +704,14 @@ void Function() botToast(
|
|||
duration: Duration(seconds: second),
|
||||
animationDuration: Duration(milliseconds: animationDuration),
|
||||
animationReverseDuration: Duration(milliseconds: animationDuration),
|
||||
leading: (_) => Image.asset(
|
||||
leading: showIcon
|
||||
? (_) => Image.asset(
|
||||
(themeDark == null
|
||||
? (assets..shuffle()).first
|
||||
: assets[themeDark ? 0 : 1]),
|
||||
height: 25,
|
||||
),
|
||||
)
|
||||
: null,
|
||||
title: (_) => Text(title, style: TextStyle(fontSize: fontSize)),
|
||||
trailing: hasCloudFlare
|
||||
? (_) => OutlinedButton.icon(
|
||||
|
|
|
|||
|
|
@ -373,7 +373,16 @@ class _AnimeStreamPageState extends riv.ConsumerState<AnimeStreamPage>
|
|||
if (value.ref.format == generated.mpv_format.MPV_FORMAT_STRING) {
|
||||
final text = value.ref.u.string.cast<Utf8>().toDartString();
|
||||
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", "");
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -25,9 +25,9 @@ class DownloadFileScreen extends ConsumerStatefulWidget {
|
|||
class _DownloadFileScreenState extends ConsumerState<DownloadFileScreen> {
|
||||
int _total = 0;
|
||||
int _received = 0;
|
||||
late http.StreamedResponse _response;
|
||||
http.StreamedResponse? _response;
|
||||
final List<int> _bytes = [];
|
||||
late StreamSubscription<List<int>>? _subscription;
|
||||
StreamSubscription<List<int>>? _subscription;
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
|
|
@ -131,8 +131,8 @@ class _DownloadFileScreenState extends ConsumerState<DownloadFileScreen> {
|
|||
return;
|
||||
}
|
||||
_response = await http.Client().send(http.Request('GET', Uri.parse(url)));
|
||||
_total = _response.contentLength ?? 0;
|
||||
_subscription = _response.stream.listen((value) {
|
||||
_total = _response?.contentLength ?? 0;
|
||||
_subscription = _response?.stream.listen((value) {
|
||||
setState(() {
|
||||
_bytes.addAll(value);
|
||||
_received += value.length;
|
||||
|
|
|
|||
16
pubspec.lock
16
pubspec.lock
|
|
@ -1164,7 +1164,7 @@ packages:
|
|||
description:
|
||||
path: media_kit
|
||||
ref: HEAD
|
||||
resolved-ref: "08e91da7229c818a25822b3cd3d77415d5f2af36"
|
||||
resolved-ref: "58c7aaf631e9cfeaed622074b19f81464fb51bec"
|
||||
url: "https://github.com/Schnitzel5/media-kit.git"
|
||||
source: git
|
||||
version: "1.2.0"
|
||||
|
|
@ -1173,7 +1173,7 @@ packages:
|
|||
description:
|
||||
path: "libs/android/media_kit_libs_android_video"
|
||||
ref: HEAD
|
||||
resolved-ref: "08e91da7229c818a25822b3cd3d77415d5f2af36"
|
||||
resolved-ref: "58c7aaf631e9cfeaed622074b19f81464fb51bec"
|
||||
url: "https://github.com/Schnitzel5/media-kit.git"
|
||||
source: git
|
||||
version: "1.3.7"
|
||||
|
|
@ -1182,7 +1182,7 @@ packages:
|
|||
description:
|
||||
path: "libs/ios/media_kit_libs_ios_video"
|
||||
ref: HEAD
|
||||
resolved-ref: "08e91da7229c818a25822b3cd3d77415d5f2af36"
|
||||
resolved-ref: "58c7aaf631e9cfeaed622074b19f81464fb51bec"
|
||||
url: "https://github.com/Schnitzel5/media-kit.git"
|
||||
source: git
|
||||
version: "1.1.4"
|
||||
|
|
@ -1191,7 +1191,7 @@ packages:
|
|||
description:
|
||||
path: "libs/linux/media_kit_libs_linux"
|
||||
ref: HEAD
|
||||
resolved-ref: "08e91da7229c818a25822b3cd3d77415d5f2af36"
|
||||
resolved-ref: "58c7aaf631e9cfeaed622074b19f81464fb51bec"
|
||||
url: "https://github.com/Schnitzel5/media-kit.git"
|
||||
source: git
|
||||
version: "1.2.1"
|
||||
|
|
@ -1200,7 +1200,7 @@ packages:
|
|||
description:
|
||||
path: "libs/macos/media_kit_libs_macos_video"
|
||||
ref: HEAD
|
||||
resolved-ref: "08e91da7229c818a25822b3cd3d77415d5f2af36"
|
||||
resolved-ref: "58c7aaf631e9cfeaed622074b19f81464fb51bec"
|
||||
url: "https://github.com/Schnitzel5/media-kit.git"
|
||||
source: git
|
||||
version: "1.1.4"
|
||||
|
|
@ -1209,7 +1209,7 @@ packages:
|
|||
description:
|
||||
path: "libs/universal/media_kit_libs_video"
|
||||
ref: HEAD
|
||||
resolved-ref: "08e91da7229c818a25822b3cd3d77415d5f2af36"
|
||||
resolved-ref: "58c7aaf631e9cfeaed622074b19f81464fb51bec"
|
||||
url: "https://github.com/Schnitzel5/media-kit.git"
|
||||
source: git
|
||||
version: "1.0.6"
|
||||
|
|
@ -1218,7 +1218,7 @@ packages:
|
|||
description:
|
||||
path: "libs/windows/media_kit_libs_windows_video"
|
||||
ref: HEAD
|
||||
resolved-ref: "08e91da7229c818a25822b3cd3d77415d5f2af36"
|
||||
resolved-ref: "58c7aaf631e9cfeaed622074b19f81464fb51bec"
|
||||
url: "https://github.com/Schnitzel5/media-kit.git"
|
||||
source: git
|
||||
version: "1.0.11"
|
||||
|
|
@ -1227,7 +1227,7 @@ packages:
|
|||
description:
|
||||
path: media_kit_video
|
||||
ref: HEAD
|
||||
resolved-ref: "08e91da7229c818a25822b3cd3d77415d5f2af36"
|
||||
resolved-ref: "58c7aaf631e9cfeaed622074b19f81464fb51bec"
|
||||
url: "https://github.com/Schnitzel5/media-kit.git"
|
||||
source: git
|
||||
version: "1.3.0"
|
||||
|
|
|
|||
Loading…
Reference in a new issue