make OfflineStorage use base64Ext for storing customIds #7429

we now store custom id entities in the offline storage, which means we need to
make sure storing ranges and comparing ids works for them. in order to achieve
that, we decided to store the normally base64Url-encoded, not lexicographically
sortable ids in the sortable base64Ext format.

the Offline Storage needs to use the "converted" base64Ext ids internally everywhere
for custom id types, but give out ranges and entities in the "raw" base64Url format and
take raw ids as parameters.

to make this easier, we implement the conversion in the public CacheStorage::getRangeForList
implementation and use the private OfflineStorage::getRange method internally.
This commit is contained in:
nig 2024-08-23 13:00:37 +02:00 committed by FajindraII
parent 06a9476e78
commit 9fc3669a61
19 changed files with 254 additions and 95 deletions

View file

@ -216,7 +216,6 @@ export class UserListView implements UpdatableSettingsViewer {
private makeListModel(): ListModel<GroupInfo> {
const listModel = new ListModel<GroupInfo>({
topId: GENERATED_MAX_ID,
sortCompare: compareGroupInfos,
fetch: async (startId) => {
if (startId !== GENERATED_MAX_ID) {