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
This commit is contained in:
commit
5c719d8038
2 changed files with 39 additions and 11 deletions
|
@ -18,18 +18,18 @@
|
|||
|
||||
import { Settings } from "@api/Settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import { runtimeHashMessageKey } from "@utils/intlHash";
|
||||
import { Logger } from "@utils/Logger";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { findByPropsLazy } from "@webpack";
|
||||
import { MessageStore } from "@webpack/common";
|
||||
import { i18n, MessageStore } from "@webpack/common";
|
||||
import { Message } from "discord-types/general";
|
||||
|
||||
const RelationshipStore = findByPropsLazy("getRelationships", "isBlocked");
|
||||
|
||||
interface MessageDeleteProps {
|
||||
collapsedReason: {
|
||||
message: string;
|
||||
};
|
||||
// i18n message i18n.t["+FcYMz"] if deleted, with args
|
||||
collapsedReason: () => any
|
||||
}
|
||||
|
||||
export default definePlugin({
|
||||
|
@ -102,6 +102,11 @@ export default definePlugin({
|
|||
},
|
||||
|
||||
shouldHide(props: MessageDeleteProps) {
|
||||
return !props?.collapsedReason?.message.includes("deleted");
|
||||
try {
|
||||
return props.collapsedReason() === i18n.t[runtimeHashMessageKey("BLOCKED_MESSAGE_COUNT")]();
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue