mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
these don't return a promise anymore
This commit is contained in:
parent
37690cffe3
commit
d5a52c32d6
@ -58,11 +58,11 @@ export class PendingEventStore {
|
|||||||
|
|
||||||
add(pendingEvent) {
|
add(pendingEvent) {
|
||||||
pendingEvent.key = encodeKey(pendingEvent.roomId, pendingEvent.queueIndex);
|
pendingEvent.key = encodeKey(pendingEvent.roomId, pendingEvent.queueIndex);
|
||||||
return this._eventStore.add(pendingEvent);
|
this._eventStore.add(pendingEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
update(pendingEvent) {
|
update(pendingEvent) {
|
||||||
return this._eventStore.put(pendingEvent);
|
this._eventStore.put(pendingEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
getAll() {
|
getAll() {
|
||||||
|
@ -27,11 +27,11 @@ export class SessionStore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
set(key, value) {
|
set(key, value) {
|
||||||
return this._sessionStore.put({key, value});
|
this._sessionStore.put({key, value});
|
||||||
}
|
}
|
||||||
|
|
||||||
add(key, value) {
|
add(key, value) {
|
||||||
return this._sessionStore.add({key, value});
|
this._sessionStore.add({key, value});
|
||||||
}
|
}
|
||||||
|
|
||||||
remove(key) {
|
remove(key) {
|
||||||
|
@ -238,7 +238,7 @@ export class TimelineEventStore {
|
|||||||
entry.key = encodeKey(entry.roomId, entry.fragmentId, entry.eventIndex);
|
entry.key = encodeKey(entry.roomId, entry.fragmentId, entry.eventIndex);
|
||||||
entry.eventIdKey = encodeEventIdKey(entry.roomId, entry.event.event_id);
|
entry.eventIdKey = encodeEventIdKey(entry.roomId, entry.event.event_id);
|
||||||
// TODO: map error? or in idb/store?
|
// TODO: map error? or in idb/store?
|
||||||
return this._timelineStore.add(entry);
|
this._timelineStore.add(entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Updates the entry into the store with the given [roomId, eventKey] combination.
|
/** Updates the entry into the store with the given [roomId, eventKey] combination.
|
||||||
@ -247,7 +247,7 @@ export class TimelineEventStore {
|
|||||||
* @return {Promise<>} a promise resolving to undefined if the operation was successful, or a StorageError if not.
|
* @return {Promise<>} a promise resolving to undefined if the operation was successful, or a StorageError if not.
|
||||||
*/
|
*/
|
||||||
update(entry) {
|
update(entry) {
|
||||||
return this._timelineStore.put(entry);
|
this._timelineStore.put(entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
get(roomId, eventKey) {
|
get(roomId, eventKey) {
|
||||||
|
@ -62,11 +62,11 @@ export class TimelineFragmentStore {
|
|||||||
// like give them meaning depending on range. not for now probably ...
|
// like give them meaning depending on range. not for now probably ...
|
||||||
add(fragment) {
|
add(fragment) {
|
||||||
fragment.key = encodeKey(fragment.roomId, fragment.id);
|
fragment.key = encodeKey(fragment.roomId, fragment.id);
|
||||||
return this._store.add(fragment);
|
this._store.add(fragment);
|
||||||
}
|
}
|
||||||
|
|
||||||
update(fragment) {
|
update(fragment) {
|
||||||
return this._store.put(fragment);
|
this._store.put(fragment);
|
||||||
}
|
}
|
||||||
|
|
||||||
get(roomId, fragmentId) {
|
get(roomId, fragmentId) {
|
||||||
|
Loading…
Reference in New Issue
Block a user