@magicred-1/react-native-lxmf 0.2.52 → 0.2.55
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/android/src/main/jniLibs/arm64-v8a/liblxmf_rn.so +0 -0
- package/android/src/main/jniLibs/arm64-v8a/{librns_embedded_ffi-630e5a8ed01ab93c.so → librns_embedded_ffi-63f85457d5f44f7a.so} +0 -0
- package/android/src/main/jniLibs/armeabi-v7a/liblxmf_rn.so +0 -0
- package/android/src/main/jniLibs/armeabi-v7a/{librns_embedded_ffi-be390e7ba73bf3fa.so → librns_embedded_ffi-f94a84b8bd1e7d77.so} +0 -0
- package/android/src/main/jniLibs/x86_64/liblxmf_rn.so +0 -0
- package/android/src/main/jniLibs/x86_64/{librns_embedded_ffi-3682c970fb2eccee.so → librns_embedded_ffi-b611c2fb89e0150d.so} +0 -0
- package/android/src/main/kotlin/expo/modules/lxmf/LxmfModule.kt +1 -1
- package/example/app/conversation/[address].tsx +9 -4
- package/ios/RustCore/liblxmf_rn.xcframework/Info.plist +5 -5
- package/ios/RustCore/liblxmf_rn.xcframework/ios-arm64/liblxmf_rn.a +0 -0
- package/ios/RustCore/liblxmf_rn.xcframework/ios-arm64_x86_64-simulator/liblxmf_rn.a +0 -0
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -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 =
|
|
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
|
-
|
|
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' &&
|
|
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-
|
|
11
|
+
<string>ios-arm64_x86_64-simulator</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>
|
|
17
18
|
</array>
|
|
18
19
|
<key>SupportedPlatform</key>
|
|
19
20
|
<string>ios</string>
|
|
21
|
+
<key>SupportedPlatformVariant</key>
|
|
22
|
+
<string>simulator</string>
|
|
20
23
|
</dict>
|
|
21
24
|
<dict>
|
|
22
25
|
<key>BinaryPath</key>
|
|
23
26
|
<string>liblxmf_rn.a</string>
|
|
24
27
|
<key>LibraryIdentifier</key>
|
|
25
|
-
<string>ios-
|
|
28
|
+
<string>ios-arm64</string>
|
|
26
29
|
<key>LibraryPath</key>
|
|
27
30
|
<string>liblxmf_rn.a</string>
|
|
28
31
|
<key>SupportedArchitectures</key>
|
|
29
32
|
<array>
|
|
30
33
|
<string>arm64</string>
|
|
31
|
-
<string>x86_64</string>
|
|
32
34
|
</array>
|
|
33
35
|
<key>SupportedPlatform</key>
|
|
34
36
|
<string>ios</string>
|
|
35
|
-
<key>SupportedPlatformVariant</key>
|
|
36
|
-
<string>simulator</string>
|
|
37
37
|
</dict>
|
|
38
38
|
</array>
|
|
39
39
|
<key>CFBundlePackageType</key>
|
|
Binary file
|
|
Binary file
|