@magicred-1/react-native-lxmf 0.2.35 → 0.2.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/app.plugin.js CHANGED
@@ -23,7 +23,7 @@ function withLxmfPermissions(config) {
23
23
  return c;
24
24
  });
25
25
 
26
- // iOS BLE usage descriptions
26
+ // iOS BLE usage descriptions + background modes required for background scanning/advertising
27
27
  config = withInfoPlist(config, (c) => {
28
28
  c.modResults.NSBluetoothAlwaysUsageDescription =
29
29
  c.modResults.NSBluetoothAlwaysUsageDescription ||
@@ -31,6 +31,13 @@ function withLxmfPermissions(config) {
31
31
  c.modResults.NSBluetoothPeripheralUsageDescription =
32
32
  c.modResults.NSBluetoothPeripheralUsageDescription ||
33
33
  'Used for LXMF mesh networking via BLE';
34
+ // Required for CoreBluetooth state restoration and background BLE operation.
35
+ // Without these entries the OS terminates BLE scanning/advertising when the
36
+ // app goes to background, breaking the Reticulum mesh.
37
+ const bg = c.modResults.UIBackgroundModes || [];
38
+ if (!bg.includes('bluetooth-central')) bg.push('bluetooth-central');
39
+ if (!bg.includes('bluetooth-peripheral')) bg.push('bluetooth-peripheral');
40
+ c.modResults.UIBackgroundModes = bg;
34
41
  return c;
35
42
  });
36
43
 
@@ -26,6 +26,8 @@ export default function TabLayout() {
26
26
  },
27
27
  tabBarLabelStyle: { fontSize: 11, fontWeight: '600' },
28
28
  }}>
29
+ {/* Hide the redirect shim from the tab bar */}
30
+ <Tabs.Screen name="index" options={{ href: null }} />
29
31
  <Tabs.Screen
30
32
  name="conversations"
31
33
  options={{ title: 'Messages', tabBarIcon: iconConversations }}
@@ -1,6 +1,5 @@
1
1
  import { useCallback, useState } from 'react';
2
2
  import {
3
- Alert,
4
3
  Modal,
5
4
  Pressable,
6
5
  ScrollView,
@@ -26,7 +25,7 @@ function Row({ label, value, onAction, actionLabel }: Readonly<{
26
25
  <Text style={S.rowLabel}>{label}</Text>
27
26
  <Text selectable style={S.rowValue}>{value}</Text>
28
27
  </View>
29
- {onAction && actionLabel && (
28
+ {!!(onAction && actionLabel) && (
30
29
  <Pressable style={({ pressed }) => [S.actionBtn, pressed && { opacity: 0.7 }]} onPress={onAction}>
31
30
  <Text style={S.actionBtnText}>{actionLabel}</Text>
32
31
  </Pressable>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magicred-1/react-native-lxmf",
3
- "version": "0.2.35",
3
+ "version": "0.2.37",
4
4
  "description": "LXMF Reticulum mesh networking for React Native + Expo",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",