Remove setting, add persistence

This commit is contained in:
binwiederhier
2023-07-08 15:14:35 -04:00
parent ce01a66ff3
commit b7679c7826
6 changed files with 60 additions and 67 deletions

View File

@@ -192,6 +192,10 @@ const MarkdownContainer = styled("div")`
ol {
padding-inline: 1rem;
}
img {
max-width: 100%;
}
`;
const MarkdownContent = ({ content }) => {
@@ -205,17 +209,11 @@ const MarkdownContent = ({ content }) => {
};
const NotificationBody = ({ notification }) => {
const markdownAlwaysEnabled = useLiveQuery(async () => prefs.markdownAlwaysEnabled());
// TODO: check notification content-type when implemented on the server
const displayAsMarkdown = markdownAlwaysEnabled;
const displayAsMarkdown = notification.content_type === "text/markdown";
const formatted = formatMessage(notification);
if (displayAsMarkdown) {
return <MarkdownContent content={formatted} />;
}
return autolink(formatted);
};