Merge remote-tracking branch 'upstream/dev' into dev

# Conflicts:
#	eslint.config.mjs
#	package.json
#	pnpm-lock.yaml
#	src/components/PluginSettings/index.tsx
#	src/plugins/imageZoom/index.tsx
#	src/plugins/messageLogger/index.tsx
#	src/plugins/pictureInPicture/index.tsx
#	src/plugins/serverInfo/GuildInfoModal.tsx
#	src/plugins/whoReacted/index.tsx
This commit is contained in:
thororen1234 2025-01-04 17:57:05 -05:00
commit f8879cc801
114 changed files with 2092 additions and 893 deletions

View file

@ -324,7 +324,7 @@ export default definePlugin({
);
e.toolbar = [
<ErrorBoundary noop={true}>
<ErrorBoundary noop={true} key={"MessageLoggerEnhanced"} >
<OpenLogsButton />
</ErrorBoundary>,
e.toolbar,

View file

@ -24,8 +24,10 @@ export class LimitedMap<K, V> {
set(key: K, value: V) {
if (settings.store.cacheLimit > 0 && this.map.size >= settings.store.cacheLimit) {
// delete the first entry
this.map.delete(this.map.keys().next().value);
const firstKey = this.map.keys().next().value;
if (firstKey !== undefined) {
this.map.delete(firstKey);
}
}
this.map.set(key, value);
}