diff --git a/src/components/account.jsx b/src/components/account.jsx index 87feb00f..1c5e3ca5 100644 --- a/src/components/account.jsx +++ b/src/components/account.jsx @@ -6,7 +6,7 @@ import emojifyText from '../utils/emojify-text'; import enhanceContent from '../utils/enhance-content'; import handleContentLinks from '../utils/handle-content-links'; import shortenNumber from '../utils/shorten-number'; -import states from '../utils/states'; +import states, { hideAllModals } from '../utils/states'; import store from '../utils/store'; import Avatar from './avatar'; @@ -218,7 +218,12 @@ function Account({ account, onClose }) { )}
-
+ {
+ hideAllModals();
+ }}
+ >
Posts
diff --git a/src/utils/states.js b/src/utils/states.js
index 06daef98..3e1bc33b 100644
--- a/src/utils/states.js
+++ b/src/utils/states.js
@@ -43,6 +43,14 @@ subscribe(states.settings, () => {
);
});
+export function hideAllModals() {
+ states.showCompose = false;
+ states.showSettings = false;
+ states.showAccount = false;
+ states.showDrafts = false;
+ states.showMediaModal = false;
+}
+
export function saveStatus(status, opts) {
const { override, skipThreading } = Object.assign(
{ override: true, skipThreading: false },