(accountId)
| 1328 | } |
| 1329 | |
| 1330 | async function deleteHotmailAccount(accountId) { |
| 1331 | const state = await getState(); |
| 1332 | const accounts = normalizeHotmailAccounts(state.hotmailAccounts); |
| 1333 | const nextAccounts = accounts.filter((account) => account.id !== accountId); |
| 1334 | await syncHotmailAccounts(nextAccounts); |
| 1335 | |
| 1336 | if (state.currentHotmailAccountId === accountId) { |
| 1337 | await setState({ currentHotmailAccountId: null }); |
| 1338 | if (isHotmailProvider(state)) { |
| 1339 | await setEmailState(null); |
| 1340 | } |
| 1341 | broadcastDataUpdate({ currentHotmailAccountId: null }); |
| 1342 | } |
| 1343 | } |
| 1344 | |
| 1345 | async function deleteHotmailAccounts(mode = 'all') { |
| 1346 | const state = await getState(); |
no test coverage detected