Merge zjs81/dev into ez_share_urlimage_PR

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
ZIERandCopilot committed 2026-10-13 10:16:13 +02:00
commit 4000c49213
152 files changed
+28635 -8600

No files matched your search

+3 -2
View File
@@ -621,6 +621,7 @@ void main() {
() async {
final store = ChannelMessageStore()..publicKeyHex = '1234567890';
final channelIndex = 1;
const channelId = '0123456789abcdef';
final rawPath = Uint8List(64)
..[0] = 0xBB
@@ -640,11 +641,11 @@ void main() {
final prefs = PrefsManager.instance;
await prefs.setString(
'${store.keyFor}$channelIndex',
'${store.keyFor}_$channelId',
jsonEncode(messageJson),
);
final messages = await store.loadChannelMessages(channelIndex);
final messages = await store.loadChannelMessages(channelId);
expect(messages, hasLength(1));
expect(messages.first.pathLength, equals(1));
expect(
+6 -4
View File
@@ -36,6 +36,8 @@ ChannelMessage _ch(
channelIndex: 0,
);
const _channelId = '0123456789abcdef';
void main() {
final base = DateTime(2026, 10, 1, 12);
@@ -127,10 +129,10 @@ void main() {
await _init();
final store = ChannelMessageStore()..setPublicKeyHex = _device;
final received = base.add(const Duration(seconds: 42));
await store.saveChannelMessages(0, [
await store.saveChannelMessages(_channelId, [
_ch('one', timestamp: base, receivedAt: received),
]);
final loaded = await store.loadChannelMessages(0);
final loaded = await store.loadChannelMessages(_channelId);
expect(loaded.single.receivedAt, received);
expect(loaded.single.timestamp, base);
});
@@ -167,14 +169,14 @@ void main() {
'plainText': true,
};
await _init({
'channel_messages_${_device.substring(0, 10)}0': jsonEncode([
'channel_messages_${_device.substring(0, 10)}_$_channelId': jsonEncode([
record('old', past),
record('ahead', future),
]),
});
final store = ChannelMessageStore()..setPublicKeyHex = _device;
final before = DateTime.now();
final loaded = await store.loadChannelMessages(0);
final loaded = await store.loadChannelMessages(_channelId);
expect(loaded, hasLength(2));
expect(
loaded[0].receivedAt.millisecondsSinceEpoch,