MoreConfirm: move UserStore to top
This commit is contained in:
parent
9b232664aa
commit
6f23ff1a0d
1 changed files with 2 additions and 1 deletions
|
|
@ -24,6 +24,7 @@ const dialog = findByProps("show", "confirm", "close");
|
|||
const relationshipManager = findByProps("addRelationship");
|
||||
const callManager = findByProps("handleStartCall");
|
||||
const actionSheetManager = findByProps("hideActionSheet");
|
||||
const UserStore = findByStoreName("UserStore");
|
||||
|
||||
export default new class MoreConfirm {
|
||||
patches = [] as (() => void)[];
|
||||
|
|
@ -52,7 +53,7 @@ export default new class MoreConfirm {
|
|||
|
||||
this.patches.push(patcher.instead("addRelationship", relationshipManager, (args, orig) => {
|
||||
if (typeof args[0] !== "object" || !args[0].userId) return orig.apply(this, args);
|
||||
const { username, discriminator } = findByStoreName("UserStore").getUser(args[0].userId);
|
||||
const { username, discriminator } = UserStore.getUser(args[0].userId);
|
||||
|
||||
// This is hacky, but it *works*
|
||||
const hideASInterval = setInterval(() => actionSheetManager.hideActionSheet(), 100);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue