Update Tor Image
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
Sarah Jamie Lewis 2021-04-13 15:53:15 -07:00
parent a56a1e1f89
commit b3db2d0ef6
8 changed files with 87 additions and 5 deletions

1
.gitignore vendored
View File

@ -44,3 +44,4 @@ libCwtch.so
android/cwtch/cwtch.aar
coverage
test/failures
.gradle

View File

@ -157,6 +157,9 @@ class MainActivity: FlutterActivity() {
val jsonEvent = (call.argument("jsonEvent") as? String) ?: "";
Cwtch.sendAppEvent(jsonEvent);
}
"ResetTor" -> {
Cwtch.resetTor();
}
else -> result.notImplemented()
}
}

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 622 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

@ -39,7 +39,7 @@ class CwtchNotifier {
savePeerHistory: data["saveConversationHistory"],
numMessages: int.parse(data["numMessages"]),
numUnread: int.parse(data["unread"]),
lastMessageTime: DateTime.now(),//show at the top of the contact list even if no messages yet
lastMessageTime: DateTime.now(), //show at the top of the contact list even if no messages yet
));
break;
case "PeerStateChange":

View File

@ -2,6 +2,7 @@ import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:flutter_app/settings.dart';
import 'package:flutter_app/torstatus.dart';
import 'package:flutter_app/views/torstatusview.dart';
import 'package:flutter_app/widgets/passwordfield.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
@ -37,9 +38,11 @@ class _ProfileMgrViewState extends State<ProfileMgrView> {
actions: [
IconButton(
icon: Image(
image: AssetImage("assets/core/Tor_icon.png"),
image: AssetImage(Provider.of<TorStatus>(context).progress == 100 ? "assets/core/Tor_icon.png" : "assets/core/Tor_icon_error.png"),
filterQuality: FilterQuality.low,
isAntiAlias: false,
color: Provider.of<Settings>(context).theme.mainTextColor(),
colorBlendMode: BlendMode.srcIn,
),
onPressed: _pushTorStatus),
IconButton(icon: Icon(Icons.bug_report_outlined), onPressed: _setLoggingLevelDebug),
@ -86,8 +89,8 @@ class _ProfileMgrViewState extends State<ProfileMgrView> {
void _pushTorStatus() {
Navigator.of(context).push(MaterialPageRoute<void>(
builder: (BuildContext context) {
return Provider(
create: (_) => Provider.of<FlwtchState>(context, listen: false),
return MultiProvider(
providers: [Provider.value(value: Provider.of<FlwtchState>(context))],
child: TorStatusView(),
);
},

View File

@ -45,7 +45,12 @@ class _TorStatusView extends State<TorStatusView> {
child: Column(children: [
ListTile(
leading: Image(
image: AssetImage("assets/core/Tor_icon.png"),
image: AssetImage(torStatus.progress == 100 ? "assets/core/Tor_icon.png" : "assets/core/Tor_icon_error.png"),
filterQuality: FilterQuality.low,
isAntiAlias: false,
// Color the onion per the text color...
color: Provider.of<Settings>(context).theme.mainTextColor(),
colorBlendMode: BlendMode.srcIn,
),
title: Text("Tor Status"),
subtitle: Text(torStatus.progress == 100 ? AppLocalizations.of(context).networkStatusOnline : torStatus.status),