fix(mobile): translation hydration
This commit is contained in:
parent
c601752e55
commit
113cb6d886
|
|
@ -15,7 +15,7 @@ class TranslationServiceStatic implements Resetable {
|
|||
// Remove translations created before the last 7 days
|
||||
const translationsToClean = translations.filter(
|
||||
(translation) =>
|
||||
new Date(translation.createdAt) > new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
|
||||
new Date(translation.createdAt) < new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
|
||||
)
|
||||
await db.delete(translationsTable).where(
|
||||
inArray(
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ class TranslationActions implements Hydratable {
|
|||
}
|
||||
|
||||
upsertManyInSession(translations: TranslationModel[]) {
|
||||
translations.forEach((translation) => {
|
||||
immerSet((state) => {
|
||||
immerSet((state) => {
|
||||
translations.forEach((translation) => {
|
||||
if (!state.data[translation.entryId]) {
|
||||
state.data[translation.entryId] = {}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue