feeds-fun 1.24.2 → 1.25.1
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
|
@@ -41,11 +41,6 @@
|
|
|
41
41
|
|
|
42
42
|
return properties.entries.every((entryId) => {
|
|
43
43
|
const entry = entriesStore.entries[entryId];
|
|
44
|
-
if (entry.publishedAt === null) {
|
|
45
|
-
// we do not expect publishedAt to be null here
|
|
46
|
-
// but just in case we treat such entries as old ones
|
|
47
|
-
return true;
|
|
48
|
-
}
|
|
49
44
|
return entry.publishedAt.getTime() < Date.now() - properties.period.seconds * 1000;
|
|
50
45
|
});
|
|
51
46
|
});
|
package/src/logic/types.ts
CHANGED
|
@@ -129,7 +129,7 @@ export class Entry {
|
|
|
129
129
|
readonly score: number;
|
|
130
130
|
readonly scoreContributions: {[key: string]: number};
|
|
131
131
|
readonly scoreToZero: number;
|
|
132
|
-
publishedAt: Date
|
|
132
|
+
readonly publishedAt: Date;
|
|
133
133
|
body: string | null;
|
|
134
134
|
|
|
135
135
|
constructor({
|
|
@@ -152,7 +152,7 @@ export class Entry {
|
|
|
152
152
|
markers: e.Marker[];
|
|
153
153
|
score: number;
|
|
154
154
|
scoreContributions: {[key: string]: number};
|
|
155
|
-
publishedAt: Date
|
|
155
|
+
publishedAt: Date;
|
|
156
156
|
body: string | null;
|
|
157
157
|
}) {
|
|
158
158
|
this.id = id;
|
|
@@ -200,7 +200,7 @@ export function entryFromJSON(
|
|
|
200
200
|
markers: string[];
|
|
201
201
|
score: number;
|
|
202
202
|
scoreContributions: {[key: number]: number};
|
|
203
|
-
publishedAt: string
|
|
203
|
+
publishedAt: string;
|
|
204
204
|
body: string | null;
|
|
205
205
|
},
|
|
206
206
|
tagsMapping: {[key: number]: string}
|
|
@@ -227,7 +227,7 @@ export function entryFromJSON(
|
|
|
227
227
|
score: rawEntry.score,
|
|
228
228
|
// map keys from int to string
|
|
229
229
|
scoreContributions: contributions,
|
|
230
|
-
publishedAt:
|
|
230
|
+
publishedAt: new Date(rawEntry.publishedAt),
|
|
231
231
|
|
|
232
232
|
body: rawEntry.body
|
|
233
233
|
});
|
package/src/stores/entries.ts
CHANGED
|
@@ -96,10 +96,6 @@ export const useEntriesStore = defineStore("entriesStore", () => {
|
|
|
96
96
|
entry.body = existingEntry.body;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
if (entry.publishedAt === null && existingEntry.publishedAt !== null) {
|
|
100
|
-
entry.publishedAt = existingEntry.publishedAt;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
99
|
if (!updateTags) {
|
|
104
100
|
entry.tags = _.cloneDeep(existingEntry.tags);
|
|
105
101
|
}
|