Cache thread avatars
This change adds the AvatarsDB class, which lets the threadListAvatars
feature interact with a cache of thread avatars.
This is an implementation of points 1 and 2 in the "Idea" section of the
following doc: go/eu7T9m (public link available in the linked bug). The
doc includes a rationale for this change and what it does.
Bug: 2
Change-Id: Ida9fcd909e3bd4a552361317b9013cb8734272a6
diff --git a/package-lock.json b/package-lock.json
index 03df080..21767d8 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -8,6 +8,10 @@
"name": "twpowertools",
"version": "0.0.0",
"license": "MIT",
+ "dependencies": {
+ "idb": "^6.1.2",
+ "poll-until-promise": "^3.6.1"
+ },
"devDependencies": {
"copy-webpack-plugin": "^9.0.1",
"json5": "^2.2.0",
@@ -769,6 +773,11 @@
"node": ">=10.17.0"
}
},
+ "node_modules/idb": {
+ "version": "6.1.2",
+ "resolved": "https://registry.npmjs.org/idb/-/idb-6.1.2.tgz",
+ "integrity": "sha512-1DNDVu3yDhAZkFDlJf0t7r+GLZ248F5pTAtA7V0oVG3yjmV125qZOx3g0XpAEkGZVYQiFDAsSOnGet2bhugc3w=="
+ },
"node_modules/ignore": {
"version": "5.1.8",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz",
@@ -1188,6 +1197,11 @@
"node": ">=8"
}
},
+ "node_modules/poll-until-promise": {
+ "version": "3.6.1",
+ "resolved": "https://registry.npmjs.org/poll-until-promise/-/poll-until-promise-3.6.1.tgz",
+ "integrity": "sha512-m9awH+xxzFJ+SI3McCO+eQl2qoTYqE9Ql50Mf0oxHzdkrhzd4XdleRsLgPRqbZMqTkAip7XGia026wbZ00y59w=="
+ },
"node_modules/process": {
"version": "0.11.10",
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
@@ -2343,6 +2357,11 @@
"integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==",
"dev": true
},
+ "idb": {
+ "version": "6.1.2",
+ "resolved": "https://registry.npmjs.org/idb/-/idb-6.1.2.tgz",
+ "integrity": "sha512-1DNDVu3yDhAZkFDlJf0t7r+GLZ248F5pTAtA7V0oVG3yjmV125qZOx3g0XpAEkGZVYQiFDAsSOnGet2bhugc3w=="
+ },
"ignore": {
"version": "5.1.8",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz",
@@ -2650,6 +2669,11 @@
"find-up": "^4.0.0"
}
},
+ "poll-until-promise": {
+ "version": "3.6.1",
+ "resolved": "https://registry.npmjs.org/poll-until-promise/-/poll-until-promise-3.6.1.tgz",
+ "integrity": "sha512-m9awH+xxzFJ+SI3McCO+eQl2qoTYqE9Ql50Mf0oxHzdkrhzd4XdleRsLgPRqbZMqTkAip7XGia026wbZ00y59w=="
+ },
"process": {
"version": "0.11.10",
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",