1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-29 22:48:10 +02:00

Mobile: Resolves #10824: Allow adjusting the default note viewer font size (#11633)

This commit is contained in:
Henry Heino
2025-01-18 04:43:07 -08:00
committed by GitHub
parent dc7871b655
commit dab2438df0
6 changed files with 26 additions and 3 deletions

View File

@@ -25,6 +25,7 @@ interface Props {
noteBody: string;
noteMarkupLanguage: MarkupLanguage;
themeId: number;
fontSize: number;
highlightedKeywords: string[];
noteResources: Record<string, ResourceInfo>;
@@ -82,7 +83,7 @@ const useRerenderHandler = (props: Props) => {
const effectDependencies = [
props.noteBody, props.noteMarkupLanguage, props.renderer, props.highlightedKeywords,
props.noteHash, props.noteResources, props.themeId, props.paddingBottom, lastResourceLoadCounter,
createEditPopupSyntax, destroyEditPopupSyntax, pluginSettingKeys,
createEditPopupSyntax, destroyEditPopupSyntax, pluginSettingKeys, props.fontSize,
];
const previousDeps = usePrevious(effectDependencies, []);
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
@@ -149,8 +150,9 @@ const useRerenderHandler = (props: Props) => {
theme: JSON.stringify({
bodyPaddingTop: '0.8em',
bodyPaddingBottom: props.paddingBottom,
...theme,
noteViewerFontSize: props.fontSize,
}),
codeTheme: theme.codeThemeCss,