diff --git a/android/app/src/main/kotlin/io/rebble/cobble/bluetooth/DeviceTransport.kt b/android/app/src/main/kotlin/io/rebble/cobble/bluetooth/DeviceTransport.kt index 6a05f84d..b343b9ce 100644 --- a/android/app/src/main/kotlin/io/rebble/cobble/bluetooth/DeviceTransport.kt +++ b/android/app/src/main/kotlin/io/rebble/cobble/bluetooth/DeviceTransport.kt @@ -61,8 +61,8 @@ class DeviceTransport @Inject constructor( } btDevice?.type == BluetoothDevice.DEVICE_TYPE_LE -> { // LE only device BlueLEDriver( - context, - protocolHandler + context = context, + protocolHandler = protocolHandler ) { flutterPreferences.shouldActivateWorkaround(it) } diff --git a/android/app/src/main/kotlin/io/rebble/cobble/bridges/common/ScanFlutterBridge.kt b/android/app/src/main/kotlin/io/rebble/cobble/bridges/common/ScanFlutterBridge.kt index 8936bb96..193adf78 100644 --- a/android/app/src/main/kotlin/io/rebble/cobble/bridges/common/ScanFlutterBridge.kt +++ b/android/app/src/main/kotlin/io/rebble/cobble/bridges/common/ScanFlutterBridge.kt @@ -3,6 +3,7 @@ package io.rebble.cobble.bridges.common import io.rebble.cobble.BuildConfig import io.rebble.cobble.bluetooth.scan.BleScanner import io.rebble.cobble.bluetooth.scan.ClassicScanner +import io.rebble.cobble.bluetooth.toPigeon import io.rebble.cobble.bridges.FlutterBridge import io.rebble.cobble.bridges.ui.BridgeLifecycleController import io.rebble.cobble.pigeons.Pigeons diff --git a/android/app/src/main/kotlin/io/rebble/cobble/datasources/FlutterPreferences.kt b/android/app/src/main/kotlin/io/rebble/cobble/datasources/FlutterPreferences.kt index e5de830c..f8b8b61e 100644 --- a/android/app/src/main/kotlin/io/rebble/cobble/datasources/FlutterPreferences.kt +++ b/android/app/src/main/kotlin/io/rebble/cobble/datasources/FlutterPreferences.kt @@ -91,7 +91,7 @@ private inline fun SharedPreferences.flow( val listener = SharedPreferences .OnSharedPreferenceChangeListener { sharedPreferences: SharedPreferences, - changedKey: String -> + changedKey: String? -> if (changedKey == key) { trySend(mapper(sharedPreferences, key)).isSuccess diff --git a/lib/ui/home/tabs/store_tab.dart b/lib/ui/home/tabs/store_tab.dart index 87c81167..ed02f4bc 100644 --- a/lib/ui/home/tabs/store_tab.dart +++ b/lib/ui/home/tabs/store_tab.dart @@ -9,14 +9,18 @@ class StoreTab extends StatefulWidget implements CobbleScreen { } class _StoreTabState extends State { + late WebViewController controller; + @override + void initState() { + super.initState(); + controller = WebViewController() + ..setJavaScriptMode(JavaScriptMode.unrestricted) + ..loadRequest(Uri.parse('https://store-beta.rebble.io/?native=true&platform=android')); + } @override Widget build(BuildContext context) { return CobbleScaffold.tab( - child: WebView( - initialUrl: - "https://store-beta.rebble.io/?native=true&platform=android", - javascriptMode: JavascriptMode.unrestricted, - ), + child: WebViewWidget(controller: controller), ); } }