Merge pull request #670 from cypherstack/ui-fixes

update animation and rust version for epiccash
This commit is contained in:
julian-CStack 2023-09-20 19:18:57 -06:00 committed by GitHub
commit e125d01a3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 22 additions and 14 deletions

View file

@ -246,9 +246,17 @@ class _TorAnimatedButtonState extends ConsumerState<TorAnimatedButton>
}
}
Future<void> _playConnecting() async {
Future<void> _playPlug() async {
await _play(
from: "connecting-start",
from: "0.0",
to: "connecting-start",
repeat: false,
);
}
Future<void> _playConnecting({double? start}) async {
await _play(
from: start?.toString() ?? "connecting-start",
to: "connecting-end",
repeat: true,
);
@ -256,7 +264,7 @@ class _TorAnimatedButtonState extends ConsumerState<TorAnimatedButton>
Future<void> _playConnectingDone() async {
await _play(
from: "connecting-end",
from: "${controller1.value}",
to: "connected-start",
repeat: false,
);
@ -285,7 +293,7 @@ class _TorAnimatedButtonState extends ConsumerState<TorAnimatedButton>
required bool repeat,
}) async {
final composition = await _completer.future;
final start = composition.getMarker(from)!.start;
final start = double.tryParse(from) ?? composition.getMarker(from)!.start;
final end = composition.getMarker(to)!.start;
controller1.value = start;
@ -326,7 +334,6 @@ class _TorAnimatedButtonState extends ConsumerState<TorAnimatedButton>
@override
Widget build(BuildContext context) {
// TODO: modify size (waiting for updated onion lottie animation file)
final width = MediaQuery.of(context).size.width / 1.5;
return TorSubscription(
@ -343,6 +350,7 @@ class _TorAnimatedButtonState extends ConsumerState<TorAnimatedButton>
break;
case TorConnectionStatus.connecting:
await _playPlug();
await _playConnecting();
break;
}

View file

@ -4,7 +4,7 @@ set -e
# libepiccash requires old rust
source ../rust_version.sh
set_rust_to_1680
set_rust_to_1671
mkdir build
. ./config.sh

View file

@ -4,7 +4,7 @@ set -e
# libepiccash requires old rust
source ../rust_version.sh
set_rust_to_1680
set_rust_to_1671
# ensure ios rust triples are there
rustup target add aarch64-apple-ios

View file

@ -4,7 +4,7 @@ set -e
# libepiccash requires old rust
source ../rust_version.sh
set_rust_to_1680
set_rust_to_1671
# for arm
# flutter-elinux clean

View file

@ -4,7 +4,7 @@ set -e
# libepiccash requires old rust
source ../rust_version.sh
set_rust_to_1680
set_rust_to_1671
(cd ../../crypto_plugins/flutter_liblelantus/scripts/macos && ./build_all.sh ) &
(cd ../../crypto_plugins/flutter_libepiccash/scripts/macos && ./build_all.sh ) &

View file

@ -1,10 +1,10 @@
#!/bin/sh
set_rust_to_1680() {
if rustup toolchain list | grep -q "1.68.0"; then
rustup default 1.68.0
set_rust_to_1671() {
if rustup toolchain list | grep -q "1.67.1"; then
rustup default 1.67.1
else
echo "Rust version 1.68.0 is not installed. Please install it using 'rustup install 1.68.0'." >&2
echo "Rust version 1.67.1 is not installed. Please install it using 'rustup install 1.67.1'." >&2
exit 1
fi
}

View file

@ -4,7 +4,7 @@ set -e
# libepiccash requires old rust
source ../rust_version.sh
set_rust_to_1680
set_rust_to_1671
mkdir -p build
(cd ../../crypto_plugins/flutter_libepiccash/scripts/windows && ./build_all.sh ) &