This commit is contained in:
Ian VanSchooten 2024-10-29 13:32:47 -04:00 committed by GitHub
commit 92fd38b43d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -54,6 +54,7 @@ class MainActivity: FlutterActivity() {
}
override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
super.configureFlutterEngine(flutterEngine)
appContext = context
//TODO: Initializing in the constructor leads to a context lacking info we need, figure out the right way to do this
sites = Sites(flutterEngine)
@ -99,7 +100,7 @@ class MainActivity: FlutterActivity() {
apiClient = APIClient(context)
ContextCompat.registerReceiver(context, refreshReceiver, IntentFilter(ACTION_REFRESH_SITES), RECEIVER_NOT_EXPORTED)
ContextCompat.registerReceiver(context, refreshReceiver, IntentFilter(ACTION_REFRESH_SITES), ContextCompat.RECEIVER_NOT_EXPORTED)
enqueueDNUpdater()
}

View File

@ -93,7 +93,7 @@ class Site {
this.rawConfig = rawConfig;
this.lastManagedUpdate = lastManagedUpdate;
_updates = EventChannel('net.defined.nebula/$id');
_updates = EventChannel('net.defined.nebula/${this.id}');
_updates.receiveBroadcastStream().listen((d) {
try {
_updateFromJson(d);