mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-18 02:47:03 -04:00
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:
commit
f8879cc801
114 changed files with 2092 additions and 893 deletions
|
@ -324,7 +324,7 @@ export default definePlugin({
|
|||
);
|
||||
|
||||
e.toolbar = [
|
||||
<ErrorBoundary noop={true}>
|
||||
<ErrorBoundary noop={true} key={"MessageLoggerEnhanced"} >
|
||||
<OpenLogsButton />
|
||||
</ErrorBoundary>,
|
||||
e.toolbar,
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue