pull/54/head
Lim Chee Aun 2023-02-02 10:30:16 +08:00
rodzic 20e569da0c
commit fa3ee31cd3
2 zmienionych plików z 15 dodań i 2 usunięć

Wyświetl plik

@ -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 }) {
</div>
)}
<p class="stats">
<Link to={`/a/${id}`} onClick={onClose}>
<Link
to={`/a/${id}`}
onClick={() => {
hideAllModals();
}}
>
Posts
<br />
<b title={statusesCount}>

Wyświetl plik

@ -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 },