mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-01-23 00:56:23 +01:00
Fix #55
This commit is contained in:
parent
20e569da0c
commit
fa3ee31cd3
2 changed files with 15 additions and 2 deletions
|
@ -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}>
|
||||
|
|
|
@ -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 },
|
||||
|
|
Loading…
Reference in a new issue