@magicred-1/react-native-lxmf 0.2.53 → 0.2.56

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.
@@ -8,7 +8,7 @@ import expo.modules.kotlin.modules.ModuleDefinition
8
8
  import org.json.JSONArray
9
9
 
10
10
  private const val TAG = "LxmfModule"
11
- private const val POLL_INTERVAL_MS = 80L
11
+ private const val POLL_INTERVAL_MS = 16L
12
12
 
13
13
  class LxmfModule : Module() {
14
14
  private val pollHandler = Handler(Looper.getMainLooper())
@@ -119,18 +119,23 @@ export default function ConversationScreen() {
119
119
  // Refresh when new message arrives for this thread
120
120
  useEffect(() => {
121
121
  const latest = events[0];
122
- if (!latest) return;
123
- if (latest.type === 'messageReceived' && latest.source === address) {
122
+ if (!latest || latest.type !== 'messageReceived') return;
123
+ const forThisThread = isGroupThread
124
+ ? latest.groupDest === address
125
+ : latest.source === address && !latest.groupDest;
126
+ if (forThisThread) {
124
127
  loadHistory();
125
128
  markRead(address ?? '');
126
129
  }
127
- }, [events, address, loadHistory, markRead]);
130
+ }, [events, address, isGroupThread, loadHistory, markRead]);
128
131
 
129
132
  // Build merged, sorted, deduped bubble list
130
133
  const bubbles = useMemo((): BubbleMsg[] => {
131
134
  const sqlKeys = new Set(sqlMsgs.map(m => String(m.id)));
132
135
  const liveExtra: BubbleMsg[] = events
133
- .filter(e => e.type === 'messageReceived' && e.source === address)
136
+ .filter(e => e.type === 'messageReceived' && (
137
+ isGroupThread ? e.groupDest === address : e.source === address && !e.groupDest
138
+ ))
134
139
  .filter(e => !sqlKeys.has(String(e.id)))
135
140
  .map(e => ({
136
141
  key: `live-${e.source}-${e.timestamp ?? Date.now()}`,
@@ -8,32 +8,32 @@
8
8
  <key>BinaryPath</key>
9
9
  <string>liblxmf_rn.a</string>
10
10
  <key>LibraryIdentifier</key>
11
- <string>ios-arm64_x86_64-simulator</string>
11
+ <string>ios-arm64</string>
12
12
  <key>LibraryPath</key>
13
13
  <string>liblxmf_rn.a</string>
14
14
  <key>SupportedArchitectures</key>
15
15
  <array>
16
16
  <string>arm64</string>
17
- <string>x86_64</string>
18
17
  </array>
19
18
  <key>SupportedPlatform</key>
20
19
  <string>ios</string>
21
- <key>SupportedPlatformVariant</key>
22
- <string>simulator</string>
23
20
  </dict>
24
21
  <dict>
25
22
  <key>BinaryPath</key>
26
23
  <string>liblxmf_rn.a</string>
27
24
  <key>LibraryIdentifier</key>
28
- <string>ios-arm64</string>
25
+ <string>ios-arm64_x86_64-simulator</string>
29
26
  <key>LibraryPath</key>
30
27
  <string>liblxmf_rn.a</string>
31
28
  <key>SupportedArchitectures</key>
32
29
  <array>
33
30
  <string>arm64</string>
31
+ <string>x86_64</string>
34
32
  </array>
35
33
  <key>SupportedPlatform</key>
36
34
  <string>ios</string>
35
+ <key>SupportedPlatformVariant</key>
36
+ <string>simulator</string>
37
37
  </dict>
38
38
  </array>
39
39
  <key>CFBundlePackageType</key>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magicred-1/react-native-lxmf",
3
- "version": "0.2.53",
3
+ "version": "0.2.56",
4
4
  "description": "LXMF Reticulum mesh networking for React Native + Expo",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",