From 0fa09f9948937a9eca713f3cdd389a0170f8263a Mon Sep 17 00:00:00 2001
From: thororen1234 <78185467+thororen1234@users.noreply.github.com>
Date: Wed, 23 Jul 2025 20:32:23 -0400
Subject: [PATCH] SearchFix: Fix Patch
---
src/equicordplugins/searchFix/index.tsx | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/src/equicordplugins/searchFix/index.tsx b/src/equicordplugins/searchFix/index.tsx
index 6108bee35..5e9fa8120 100644
--- a/src/equicordplugins/searchFix/index.tsx
+++ b/src/equicordplugins/searchFix/index.tsx
@@ -19,17 +19,34 @@
import { EquicordDevs } from "@utils/constants";
import definePlugin from "@utils/types";
+function settingsComponent() {
+ return (
+
+
+
+ This fix isn't perfect, so you may have to reload the search bar to fix issues.
+
+
+ Discord only allows a max offset of 5000 (this is what causes the magnifying glass error).
+ This means that you can only see precisely 5000 messages into the past, and 5000 messages into the future (when sorting by old).
+ This plugin just jumps to the opposite sorting method to try get around Discord's restriction,
+ but if there is a large search result, and you try to view a message that is unobtainable with both methods of sorting,
+ the plugin will simply show offset 0 (either newest or oldest message depending on the sorting method).
+
+ );
+}
+
export default definePlugin({
name: "SearchFix",
description: 'Fixes the annoying "We dropped the magnifying glass!" error.',
- settingsAboutComponent: () => This fix isn't perfect, so you may have to reload the search bar to fix issues. Discord only allows a max offset of 5000 (this is what causes the magnifying glass error). This means that you can only see precisely 5000 messages into the past, and 5000 messages into the future (when sorting by old). This plugin just jumps to the opposite sorting method to try get around Discord's restriction, but if there is a large search result, and you try to view a message that is unobtainable with both methods of sorting, the plugin will simply show offset 0 (either newest or oldest message depending on the sorting method).,
+ settingsAboutComponent: () => settingsComponent(),
authors: [EquicordDevs.Jaxx],
patches: [
{
find: '"SearchStore",',
replacement: {
- match: /(\i)\.offset=null!=\((\i)=(\i)\.offset\)\?(\i):0/i,
- replace: "$self.main($3), $1.offset = null != ($2 = $3.offset) ? $4 : 0"
+ match: /\i\.searchResultsQuery=(\i)/,
+ replace: "$&,$self.main($1)"
}
}
],