fix: respect service enabled
Signed-off-by: Sebastian <krupinski01@gmail.com>
This commit is contained in:
@@ -69,7 +69,7 @@ const handleFolderRenamed = (updatedFolder: CollectionObject) => {
|
||||
|
||||
// Computed: all folders for validation
|
||||
const allFolders = computed(() =>
|
||||
servicesStore.services.flatMap(service =>
|
||||
servicesStore.servicesEnabled.flatMap(service =>
|
||||
collectionsStore.collectionsForService(service.provider, service.identifier),
|
||||
)
|
||||
)
|
||||
@@ -83,7 +83,7 @@ interface ServiceGroup {
|
||||
const serviceGroups = computed(() => {
|
||||
const groups: ServiceGroup[] = []
|
||||
|
||||
servicesStore.services.forEach(service => {
|
||||
servicesStore.servicesEnabled.forEach(service => {
|
||||
groups.push({
|
||||
service,
|
||||
loading: mailStore.isServiceFolderLoading(service.provider, service.identifier),
|
||||
@@ -119,7 +119,7 @@ const serviceGroups = computed(() => {
|
||||
/>
|
||||
|
||||
<!-- Empty state -->
|
||||
<v-list-item v-if="servicesStore.services.length === 0">
|
||||
<v-list-item v-if="servicesStore.servicesEnabled.length === 0">
|
||||
<v-list-item-title class="text-center text-medium-emphasis">
|
||||
No mail accounts configured
|
||||
</v-list-item-title>
|
||||
|
||||
@@ -46,8 +46,8 @@ const {
|
||||
const { mailSync, entitiesStore } = mailStore
|
||||
|
||||
const lastSyncLabel = computed(() => {
|
||||
if (!mailSync.lastSync.value) return ''
|
||||
return `(Last: ${new Date(mailSync.lastSync.value).toLocaleTimeString()})`
|
||||
if (!mailSync.lastSync) return ''
|
||||
return `(Last: ${new Date(mailSync.lastSync).toLocaleTimeString()})`
|
||||
})
|
||||
|
||||
// Initialize
|
||||
|
||||
@@ -73,7 +73,7 @@ export const useMailStore = defineStore('mailStore', () => {
|
||||
try {
|
||||
await servicesStore.list()
|
||||
|
||||
const services = [...servicesStore.services]
|
||||
const services = [...servicesStore.servicesEnabled]
|
||||
services.forEach(service => {
|
||||
void loadFoldersForService(service,{ selectInbox: true })
|
||||
})
|
||||
@@ -184,7 +184,7 @@ export const useMailStore = defineStore('mailStore', () => {
|
||||
}
|
||||
|
||||
// Always track inboxes for each account (for new-mail notifications)
|
||||
servicesStore.services.forEach(service => {
|
||||
servicesStore.servicesEnabled.forEach(service => {
|
||||
const inboxes = collectionsStore.collectionsForService(service.provider, service.identifier).filter(
|
||||
c =>
|
||||
String(c.service) === String(service.identifier) &&
|
||||
|
||||
Reference in New Issue
Block a user