move profileeventenvelope unwrapping to lcg

This commit is contained in:
erinn 2021-03-16 15:51:21 -07:00
parent 62736cefea
commit 98d0e56475
5 changed files with 12 additions and 20 deletions

View File

@ -38,7 +38,7 @@ class CwtchNotifier {
break;
case "PeerStateChange":
ContactInfoState contact = profileCN.getProfile(data["ProfileOnion"]).contactList.getContact(data["RemotePeer"]);
if (contact == null) {
if (contact == null) {//todo: stopgap, as lc-g is supposed to handle this
print("PSC -> adding "+data["ProfileOnion"]+" :: " + data["RemotePeer"]);
profileCN.getProfile(data["ProfileOnion"]).contactList.add(ContactInfoState(
profileOnion: data["ProfileOnion"],

View File

@ -100,12 +100,7 @@ class CwtchFfi implements Cwtch {
await Isolate.spawn(_checkAppbusEvents, _receivePort.sendPort);
_receivePort.listen((message) {
var env = jsonDecode(message);
if (env["EventType"] != null) {//check if env["EventType"] exists
cwtchNotifier.handleMessage(env["EventType"], env["Data"]);
} else {//if not, use env["profile"]
env["Event"]["Data"]["ProfileOnion"] = env["Profile"];
cwtchNotifier.handleMessage(env["Event"]["EventType"], env["Event"]["Data"]);
}
cwtchNotifier.handleMessage(env["EventType"], env["Data"]);
});
}

View File

@ -2,6 +2,8 @@
// Generated file. Do not edit.
//
// clang-format off
#include "generated_plugin_registrant.h"

View File

@ -2,6 +2,8 @@
// Generated file. Do not edit.
//
// clang-format off
#ifndef GENERATED_PLUGIN_REGISTRANT_
#define GENERATED_PLUGIN_REGISTRANT_

View File

@ -115,7 +115,7 @@ packages:
name: flutter_lokalise
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.3"
version: "0.1.4"
flutter_test:
dependency: "direct dev"
description: flutter
@ -132,7 +132,7 @@ packages:
name: freezed_annotation
url: "https://pub.dartlang.org"
source: hosted
version: "0.7.1"
version: "0.12.0"
http:
dependency: transitive
description:
@ -195,7 +195,7 @@ packages:
name: nested
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.4"
version: "1.0.0"
package_info_plus:
dependency: "direct main"
description:
@ -286,7 +286,7 @@ packages:
name: pedantic
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0"
version: "1.11.0"
platform:
dependency: transitive
description:
@ -355,13 +355,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
string_unescape:
dependency: transitive
description:
name: string_unescape
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.1"
term_glyph:
dependency: transitive
description:
@ -396,7 +389,7 @@ packages:
name: win32
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "2.0.4"
xdg_directories:
dependency: transitive
description:
@ -412,5 +405,5 @@ packages:
source: hosted
version: "2.2.1"
sdks:
dart: ">=2.12.0-259.9.beta <3.0.0"
dart: ">=2.12.0 <3.0.0"
flutter: ">=1.20.0"