feat: update onboarding flow

This commit is contained in:
2024-01-12 10:12:06 +07:00
parent 2c8571ecc7
commit e0d4c53098
10 changed files with 468 additions and 115 deletions

View File

@@ -73,7 +73,7 @@ export function useRichContent(content: string) {
const words = text.split(/( |\n)/);
const urls = [...getUrls(text)];
if (storage.settings.media && !storage.settings.lowPowerMode) {
if (storage.settings.media && !storage.settings.lowPower) {
images = urls.filter((word) =>
IMAGES.some((el) => {
const url = new URL(word);
@@ -238,9 +238,9 @@ export function useRichContent(content: string) {
parsedContent[0] = parsedContent[0].trimStart();
}
return { parsedContent };
return parsedContent;
} catch (e) {
console.warn("[parser] parse failed: ", e);
return { parsedContent };
return parsedContent;
}
}