courrier multi account restore compose
This commit is contained in:
parent
188895da1b
commit
daf1fd5e92
@ -724,6 +724,16 @@ export default function CourrierPage() {
|
||||
}
|
||||
}, [selectedAccount, expandedAccounts]);
|
||||
|
||||
// On page load/refresh, expand all accounts so their folders are always visible
|
||||
useEffect(() => {
|
||||
// Expand all real accounts (not loading-account) on load/refresh
|
||||
const expanded: Record<string, boolean> = {};
|
||||
accounts.forEach(a => {
|
||||
if (a.id !== 'loading-account') expanded[a.id] = true;
|
||||
});
|
||||
setExpandedAccounts(expanded);
|
||||
}, [accounts]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<SimplifiedLoadingFix />
|
||||
@ -780,7 +790,6 @@ export default function CourrierPage() {
|
||||
onClick={() => setAccountsDropdownOpen(!accountsDropdownOpen)}
|
||||
>
|
||||
<span>Accounts</span>
|
||||
{accountsDropdownOpen ? <ChevronUp className="h-4 w-4" /> : <ChevronDown className="h-4 w-4" />}
|
||||
</Button>
|
||||
<Button
|
||||
variant="ghost"
|
||||
@ -1031,16 +1040,6 @@ export default function CourrierPage() {
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
)}
|
||||
{account.id !== 'loading-account' && (
|
||||
<button
|
||||
type="button"
|
||||
className="ml-1 text-gray-400 hover:text-gray-600 cursor-pointer flex items-center justify-center h-5 w-5"
|
||||
tabIndex={-1}
|
||||
onClick={e => { e.stopPropagation(); setExpandedAccounts(prev => ({ ...prev, [account.id]: !prev[account.id] })); }}
|
||||
>
|
||||
{expandedAccounts[account.id] ? <ChevronUp className="h-3 w-3" /> : <ChevronDown className="h-3 w-3" />}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
{/* Show folders for any expanded account */}
|
||||
{expandedAccounts[account.id] && account.folders && account.folders.length > 0 && (
|
||||
|
||||
Loading…
Reference in New Issue
Block a user