8000 Fixed broken chat show case page by kumarpalsinh25 · Pull Request #3011 · acterglobal/a3 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fixed broken chat show case page #3011

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,10 @@

@override
TimelineEventItem? inReplyToEvent() => mockIsReplyToEvent;

@override
FfiListFfiString readUsers() => MockFfiListFfiString(mockStrings: []);

Check warning on line 81 in app/lib/features/chat_ui_showcase/mocks/convo/timeline/mock_timeline_event_item.dart

View check run for this annotation

Codecov / codecov/patch

app/lib/features/chat_ui_showcase/mocks/convo/timeline/mock_timeline_event_item.dart#L80-L81

Added lines #L80 - L81 were not covered by tests

@override

Check warning on line 83 in app/lib/features/chat_ui_showcase/mocks/convo/timeline/mock_timeline_event_item.dart

View check run for this annotation

Codecov / codecov/patch

app/lib/features/chat_ui_showcase/mocks/convo/timeline/mock_timeline_event_item.dart#L83

Added line #L83 was not covered by tests
int? receiptTs(String userId) => 1744018801000;
}
54 changes: 27 additions & 27 deletions packages/rust_sdk/lib/acter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -398,33 +398,6 @@ Uint8List createUint8ListFromInt(int value) {
return uint8List;
}

class FfiConverterBool {
static bool lift(int value) {
return value == 1;
}

static int lower(bool value) {
return value ? 1 : 0;
}

static LiftRetVal<bool> read(Uint8List buf) {
return LiftRetVal(FfiConverterBool.lift(buf.first), 1);
}

static RustBuffer lowerIntoRustBuffer(bool value) {
return toRustBuffer(Uint8List.fromList([FfiConverterBool.lower(value)]));
}

static int allocationSize([bool value = false]) {
return 1;
}

static int write(bool value, Uint8List buf) {
buf.setAll(0, [value ? 1 : 0]);
return allocationSize();
}
}

class FfiConverterString {
static String lift(RustBuffer buf) {
return utf8.decoder.convert(buf.asUint8List());
Expand Down Expand Up @@ -504,6 +477,33 @@ class FfiConverterOptionalString {
}
}

class FfiConverterBool {
static bool lift(int value) {
return value == 1;
}

static int lower(bool value) {
return value ? 1 : 0;
}

static LiftRetVal<bool> read(Uint8List buf) {
return LiftRetVal(FfiConverterBool.lift(buf.first), 1);
}

static RustBuffer lowerIntoRustBuffer(bool value) {
return toRustBuffer(Uint8List.fromList([FfiConverterBool.lower(value)]));
}

static int allocationSize([bool value = false]) {
return 1;
}

static int write(bool value, Uint8List buf) {
buf.setAll(0, [value ? 1 : 0]);
return allocationSize();
}
}

class FfiConverterOptionalBool {
static bool? lift(RustBuffer buf) {
return FfiConverterOptionalBool.read(buf.asUint8List()).value;
Expand Down
Loading
Loading
0