Merge 9ccc9ae986
into 1ecd008824
This commit is contained in:
commit
84b8cc4c72
|
@ -54,12 +54,11 @@ class MainActivity: FlutterActivity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
|
override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
|
||||||
|
super.configureFlutterEngine(flutterEngine)
|
||||||
appContext = context
|
appContext = context
|
||||||
//TODO: Initializing in the constructor leads to a context lacking info we need, figure out the right way to do this
|
//TODO: Initializing in the constructor leads to a context lacking info we need, figure out the right way to do this
|
||||||
sites = Sites(flutterEngine)
|
sites = Sites(flutterEngine)
|
||||||
|
|
||||||
GeneratedPluginRegistrant.registerWith(flutterEngine)
|
|
||||||
|
|
||||||
ui = MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL)
|
ui = MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL)
|
||||||
ui!!.setMethodCallHandler { call, result ->
|
ui!!.setMethodCallHandler { call, result ->
|
||||||
when(call.method) {
|
when(call.method) {
|
||||||
|
@ -99,7 +98,7 @@ class MainActivity: FlutterActivity() {
|
||||||
|
|
||||||
apiClient = APIClient(context)
|
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()
|
enqueueDNUpdater()
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,7 +93,7 @@ class Site {
|
||||||
this.rawConfig = rawConfig;
|
this.rawConfig = rawConfig;
|
||||||
this.lastManagedUpdate = lastManagedUpdate;
|
this.lastManagedUpdate = lastManagedUpdate;
|
||||||
|
|
||||||
_updates = EventChannel('net.defined.nebula/$id');
|
_updates = EventChannel('net.defined.nebula/${this.id}');
|
||||||
_updates.receiveBroadcastStream().listen((d) {
|
_updates.receiveBroadcastStream().listen((d) {
|
||||||
try {
|
try {
|
||||||
_updateFromJson(d);
|
_updateFromJson(d);
|
||||||
|
|
Loading…
Reference in New Issue