feeds-fun 1.20.4 → 1.20.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/logic/api.ts
CHANGED
|
@@ -114,10 +114,10 @@ export async function getLastCollectionEntries({
|
|
|
114
114
|
return entries;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
export async function getEntriesByIds({ids
|
|
117
|
+
export async function getEntriesByIds({ids}: {ids: t.EntryId[]}) {
|
|
118
118
|
const response = await post({
|
|
119
119
|
url: API_GET_ENTRIES_BY_IDS,
|
|
120
|
-
data: {ids: ids
|
|
120
|
+
data: {ids: ids}
|
|
121
121
|
});
|
|
122
122
|
|
|
123
123
|
const entries = [];
|
package/src/stores/entries.ts
CHANGED
|
@@ -80,21 +80,28 @@ export const useEntriesStore = defineStore("entriesStore", () => {
|
|
|
80
80
|
|
|
81
81
|
// We bulk update entries to avoid performance degradation
|
|
82
82
|
// on triggering multiple reactivity updates for each entry
|
|
83
|
-
function registerEntries(newEntries: t.Entry[]) {
|
|
83
|
+
function registerEntries({newEntries, updateTags}: {newEntries: t.Entry[]; updateTags: boolean}) {
|
|
84
84
|
let delta: {[key: t.EntryId]: t.Entry} = {};
|
|
85
85
|
|
|
86
86
|
for (const entry of newEntries) {
|
|
87
87
|
if (entry.id in entries.value) {
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
let existingEntry = entries.value[entry.id];
|
|
89
|
+
|
|
90
|
+
if (entry.body === null && existingEntry.body !== null) {
|
|
91
|
+
entry.body = existingEntry.body;
|
|
90
92
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
+
|
|
94
|
+
if (!updateTags) {
|
|
95
|
+
entry.tags = _.cloneDeep(existingEntry.tags);
|
|
93
96
|
}
|
|
94
97
|
}
|
|
95
98
|
delta[entry.id] = entry;
|
|
96
99
|
}
|
|
97
100
|
|
|
101
|
+
if (_.isEmpty(delta)) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
|
|
98
105
|
entries.value = {...entries.value, ...delta};
|
|
99
106
|
}
|
|
100
107
|
|
|
@@ -144,7 +151,10 @@ export const useEntriesStore = defineStore("entriesStore", () => {
|
|
|
144
151
|
|
|
145
152
|
const report = [];
|
|
146
153
|
|
|
147
|
-
registerEntries(
|
|
154
|
+
registerEntries({
|
|
155
|
+
newEntries: loadedEntries,
|
|
156
|
+
updateTags: true
|
|
157
|
+
});
|
|
148
158
|
|
|
149
159
|
for (const entry of loadedEntries) {
|
|
150
160
|
report.push(entry.id);
|
|
@@ -202,9 +212,12 @@ export const useEntriesStore = defineStore("entriesStore", () => {
|
|
|
202
212
|
// Because we have no approach to control which tags to exclude because of minTagCount filter
|
|
203
213
|
// This method loads an additional info for a subset of entries
|
|
204
214
|
// => we have no clear tag statistics on the backend
|
|
205
|
-
const loadedEntries = await api.getEntriesByIds({ids: ids
|
|
215
|
+
const loadedEntries = await api.getEntriesByIds({ids: ids});
|
|
206
216
|
|
|
207
|
-
registerEntries(
|
|
217
|
+
registerEntries({
|
|
218
|
+
newEntries: loadedEntries,
|
|
219
|
+
updateTags: false
|
|
220
|
+
});
|
|
208
221
|
|
|
209
222
|
requestedEntries.value = {};
|
|
210
223
|
}
|
|
@@ -23,6 +23,13 @@
|
|
|
23
23
|
</template>
|
|
24
24
|
|
|
25
25
|
<template #side-menu-item-3>
|
|
26
|
+
Show tags
|
|
27
|
+
<config-selector
|
|
28
|
+
:values="e.MinNewsTagCountProperties"
|
|
29
|
+
v-model:property="globalSettings.minTagCount" />
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<template #side-menu-item-4>
|
|
26
33
|
Show read
|
|
27
34
|
|
|
28
35
|
<config-flag
|