Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Steinmetz <richard@steinmetz.cloud>2021-03-30 12:06:02 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2021-04-09 15:33:54 +0300
commitd4e4817e92602b9c973dac1a36080dc40cafdb56 (patch)
treea49e06b84e7c5447babf235eb338bffdb39317cc /src/store/getters.js
parent578463d48edb111881ba268eeb8395d147842a30 (diff)
Normalize envelope tags in vuex store
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
Diffstat (limited to 'src/store/getters.js')
-rw-r--r--src/store/getters.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/store/getters.js b/src/store/getters.js
index 3b75c5699..611b0f96a 100644
--- a/src/store/getters.js
+++ b/src/store/getters.js
@@ -69,4 +69,11 @@ export const getters = {
const envelopes = thread.map(id => state.envelopes[id])
return sortBy(prop('dateInt'), envelopes)
},
+ getEnvelopeTags: (state) => (id) => {
+ const tags = state.envelopes[id]?.tags ?? []
+ return tags.map((tagId) => state.tags[tagId])
+ },
+ getTag: (state) => (id) => {
+ return state.tags[id]
+ },
}