Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
Latropos committed Oct 16, 2024
1 parent b134e00 commit 6145a15
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type NativeUpdate = {
export function createUpdatesContainer() {
const jsUpdates = makeMutable<Array<JsUpdate>>([]);
const nativeSnapshots = makeMutable<Array<NativeUpdate>>([]);
const brokenNativeSnapshotsOnFabric = makeMutable(false);
const unimplementedNativeSnapshotsOnFabric = makeMutable(false);

function _updateNativeSnapshot(updateInfos: JsUpdate[], jsUpdateIndex: number): void {
'worklet';
Expand Down Expand Up @@ -52,6 +52,7 @@ export function createUpdatesContainer() {

function _updateJsSnapshot(newUpdates: JsUpdate[]): void {
'worklet';

jsUpdates.modify(updates => {
for (const update of newUpdates) {
updates.push(update);
Expand Down Expand Up @@ -93,7 +94,7 @@ export function createUpdatesContainer() {
// TODO Implement native snapshots for layout animations on Fabric
_updateNativeSnapshot([{ tag, update }], jsUpdates.value.length - 1);
} else {
brokenNativeSnapshotsOnFabric.value = true;
unimplementedNativeSnapshotsOnFabric.value = true;
}
jsUpdates.modify(updates => {
updates.push({
Expand Down Expand Up @@ -160,7 +161,7 @@ export function createUpdatesContainer() {
}

async function getNativeSnapshots(component?: TestComponent, propsNames: string[] = []): Promise<SingleViewSnapshot> {
if (brokenNativeSnapshotsOnFabric.value) {
if (unimplementedNativeSnapshotsOnFabric.value) {
return [];
}
const nativeSnapshotsCount = nativeSnapshots.value.length;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe('withDecay animation, test various config', () => {
{ velocity: 900, clamp: [0, 150], rubberBandEffect: true },
{ velocity: 2000, clamp: [0, 150], rubberBandEffect: true },
{ velocity: 2000, clamp: [0, 150], rubberBandEffect: true, rubberBandFactor: 2 },
] as Array<WithDecayConfig>)('Config ${0}', async config => {
] as Array<WithDecayConfig>)('Config %p', async config => {
const snapshotName = ('decay_' +
Object.entries(config)
.map(([key, val]) => {
Expand Down

0 comments on commit 6145a15

Please sign in to comment.