Skip to content

Commit 1457047

Browse files
refactor: rename persistence methods from persist/restore to save/load
1 parent 1cd538c commit 1457047

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/sds/src/message_channel/persistent_history.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export class PersistentHistory implements ILocalHistory {
4747
this.memory = new MemLocalHistory();
4848
this.storage = options.storage ?? getDefaultHistoryStorage();
4949
this.storageKey = `${HISTORY_STORAGE_PREFIX}${options.storageKeyPrefix}:${options.channelId}`;
50-
this.restore();
50+
this.load();
5151
}
5252

5353
public get length(): number {
@@ -56,7 +56,7 @@ export class PersistentHistory implements ILocalHistory {
5656

5757
public push(...items: ContentMessage[]): number {
5858
const length = this.memory.push(...items);
59-
this.persist();
59+
this.save();
6060
return length;
6161
}
6262

@@ -97,7 +97,7 @@ export class PersistentHistory implements ILocalHistory {
9797
return this.memory.findIndex(predicate, thisArg);
9898
}
9999

100-
private persist(): void {
100+
private save(): void {
101101
if (!this.storage) {
102102
return;
103103
}
@@ -111,7 +111,7 @@ export class PersistentHistory implements ILocalHistory {
111111
}
112112
}
113113

114-
private restore(): void {
114+
private load(): void {
115115
if (!this.storage) {
116116
return;
117117
}

0 commit comments

Comments
 (0)