fix: old document edgelessColorTheme shows auto but always render white (#8666)

Fix issue [AF-1593](https://linear.app/affine-design/issue/AF-1593).
This commit is contained in:
akumatus
2024-11-01 09:55:29 +00:00
parent aa2f6b7739
commit 7e71395c8e

View File

@@ -107,7 +107,9 @@ function createThemeExtension(framework: FrameworkProvider) {
if (cache) return cache;
const appTheme$ = framework.get(AppThemeService).appTheme.theme$;
const docTheme$ = doc.properties$.map(props => props.edgelessColorTheme);
const docTheme$ = doc.properties$.map(
props => props.edgelessColorTheme || 'system'
);
const theme$: Observable<ColorScheme> = combineLatest([
appTheme$,
docTheme$,