Merge branch 'krille/redaction-events-in-timeline' into 'main'
fix: Add redaction events to timeline See merge request famedly/company/frontend/famedlysdk!950
This commit is contained in:
commit
712d2cfbf6
|
|
@ -1,3 +1,7 @@
|
||||||
|
## [0.8.2] - 04nd Feb 2022
|
||||||
|
- fix: Add redaction events to timeline
|
||||||
|
- fix: Resize image with compute by using const class arguments
|
||||||
|
|
||||||
## [0.8.1] - 03nd Feb 2022
|
## [0.8.1] - 03nd Feb 2022
|
||||||
- refactor: Implement on history received in timeline
|
- refactor: Implement on history received in timeline
|
||||||
- fix: null-safety issues with widgets
|
- fix: null-safety issues with widgets
|
||||||
|
|
|
||||||
|
|
@ -286,7 +286,8 @@ class Timeline {
|
||||||
));
|
));
|
||||||
onChange?.call(index);
|
onChange?.call(index);
|
||||||
}
|
}
|
||||||
} else if (status.isRemoved) {
|
}
|
||||||
|
if (status.isRemoved) {
|
||||||
final i = _findEvent(event_id: eventUpdate.content['event_id']);
|
final i = _findEvent(event_id: eventUpdate.content['event_id']);
|
||||||
if (i < events.length) {
|
if (i < events.length) {
|
||||||
removeAggregatedEvent(events[i]);
|
removeAggregatedEvent(events[i]);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
name: matrix
|
name: matrix
|
||||||
description: Matrix Dart SDK
|
description: Matrix Dart SDK
|
||||||
version: 0.8.1
|
version: 0.8.2
|
||||||
homepage: https://famedly.com
|
homepage: https://famedly.com
|
||||||
repository: https://gitlab.com/famedly/company/frontend/famedlysdk.git
|
repository: https://gitlab.com/famedly/company/frontend/famedlysdk.git
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -146,12 +146,12 @@ void main() {
|
||||||
await Future.delayed(Duration(milliseconds: 50));
|
await Future.delayed(Duration(milliseconds: 50));
|
||||||
|
|
||||||
expect(updateCount, 3);
|
expect(updateCount, 3);
|
||||||
expect(insertList, [0, 0]);
|
expect(insertList, [0, 0, 0]);
|
||||||
expect(insertList.length, timeline.events.length);
|
expect(insertList.length, timeline.events.length);
|
||||||
expect(changeList, [1]);
|
expect(changeList, [1]);
|
||||||
expect(removeList, []);
|
expect(removeList, []);
|
||||||
expect(timeline.events.length, 2);
|
expect(timeline.events.length, 3);
|
||||||
expect(timeline.events[1].redacted, true);
|
expect(timeline.events[2].redacted, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('Send message', () async {
|
test('Send message', () async {
|
||||||
|
|
@ -160,7 +160,7 @@ void main() {
|
||||||
await Future.delayed(Duration(milliseconds: 50));
|
await Future.delayed(Duration(milliseconds: 50));
|
||||||
|
|
||||||
expect(updateCount, 5);
|
expect(updateCount, 5);
|
||||||
expect(insertList, [0, 0, 0]);
|
expect(insertList, [0, 0, 0, 0]);
|
||||||
expect(insertList.length, timeline.events.length);
|
expect(insertList.length, timeline.events.length);
|
||||||
final eventId = timeline.events[0].eventId;
|
final eventId = timeline.events[0].eventId;
|
||||||
expect(eventId.startsWith('\$event'), true);
|
expect(eventId.startsWith('\$event'), true);
|
||||||
|
|
@ -183,7 +183,7 @@ void main() {
|
||||||
await Future.delayed(Duration(milliseconds: 50));
|
await Future.delayed(Duration(milliseconds: 50));
|
||||||
|
|
||||||
expect(updateCount, 6);
|
expect(updateCount, 6);
|
||||||
expect(insertList, [0, 0, 0]);
|
expect(insertList, [0, 0, 0, 0]);
|
||||||
expect(insertList.length, timeline.events.length);
|
expect(insertList.length, timeline.events.length);
|
||||||
expect(timeline.events[0].eventId, eventId);
|
expect(timeline.events[0].eventId, eventId);
|
||||||
expect(timeline.events[0].status, EventStatus.synced);
|
expect(timeline.events[0].status, EventStatus.synced);
|
||||||
|
|
@ -215,7 +215,7 @@ void main() {
|
||||||
await Future.delayed(Duration(milliseconds: 50));
|
await Future.delayed(Duration(milliseconds: 50));
|
||||||
|
|
||||||
expect(updateCount, 13);
|
expect(updateCount, 13);
|
||||||
expect(insertList, [0, 0, 0, 0, 0, 1, 2]);
|
expect(insertList, [0, 0, 0, 0, 0, 0, 1, 2]);
|
||||||
expect(insertList.length, timeline.events.length);
|
expect(insertList.length, timeline.events.length);
|
||||||
expect(changeList, [1, 0, 0, 0, 1, 2]);
|
expect(changeList, [1, 0, 0, 0, 1, 2]);
|
||||||
expect(removeList, []);
|
expect(removeList, []);
|
||||||
|
|
@ -231,10 +231,10 @@ void main() {
|
||||||
|
|
||||||
expect(updateCount, 14);
|
expect(updateCount, 14);
|
||||||
|
|
||||||
expect(insertList, [0, 0, 0, 0, 0, 1, 2]);
|
expect(insertList, [0, 0, 0, 0, 0, 0, 1, 2]);
|
||||||
expect(changeList, [1, 0, 0, 0, 1, 2]);
|
expect(changeList, [1, 0, 0, 0, 1, 2]);
|
||||||
expect(removeList, [0]);
|
expect(removeList, [0]);
|
||||||
expect(timeline.events.length, 6);
|
expect(timeline.events.length, 7);
|
||||||
expect(timeline.events[0].status, EventStatus.error);
|
expect(timeline.events[0].status, EventStatus.error);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -278,7 +278,7 @@ void main() {
|
||||||
|
|
||||||
expect(updateCount, 17);
|
expect(updateCount, 17);
|
||||||
|
|
||||||
expect(insertList, [0, 0, 0, 0, 0, 1, 2, 0]);
|
expect(insertList, [0, 0, 0, 0, 0, 0, 1, 2, 0]);
|
||||||
expect(changeList, [1, 0, 0, 0, 1, 2, 0, 0]);
|
expect(changeList, [1, 0, 0, 0, 1, 2, 0, 0]);
|
||||||
expect(removeList, [0]);
|
expect(removeList, [0]);
|
||||||
expect(timeline.events.length, 1);
|
expect(timeline.events.length, 1);
|
||||||
|
|
@ -293,7 +293,7 @@ void main() {
|
||||||
await Future.delayed(Duration(milliseconds: 50));
|
await Future.delayed(Duration(milliseconds: 50));
|
||||||
|
|
||||||
expect(updateCount, 20);
|
expect(updateCount, 20);
|
||||||
expect(insertList, [0, 0, 0, 0, 0, 1, 2, 0]);
|
expect(insertList, [0, 0, 0, 0, 0, 0, 1, 2, 0]);
|
||||||
expect(historyRequestList, []);
|
expect(historyRequestList, []);
|
||||||
expect(timeline.events.length, 3);
|
expect(timeline.events.length, 3);
|
||||||
expect(timeline.events[0].eventId, '3143273582443PhrSn:example.org');
|
expect(timeline.events[0].eventId, '3143273582443PhrSn:example.org');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue