mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 13:25:12 +00:00
fix(android): fix edge-to-edge (#12453)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added the ability to retrieve the system navigation bar height on Android devices. - **Bug Fixes** - Removed duplicate internal code to improve stability. - **Chores** - Removed the dependency on the edge-to-edge support package and related configuration and code. - Updated configuration to adjust margins for edge-to-edge layouts. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -40,7 +40,6 @@ import {
|
||||
import { App as CapacitorApp } from '@capacitor/app';
|
||||
import { Keyboard } from '@capacitor/keyboard';
|
||||
import { StatusBar, Style } from '@capacitor/status-bar';
|
||||
import { EdgeToEdge } from '@capawesome/capacitor-android-edge-to-edge-support';
|
||||
import { InAppBrowser } from '@capgo/inappbrowser';
|
||||
import { Framework, FrameworkRoot, getCurrentStore } from '@toeverything/infra';
|
||||
import { OpClient } from '@toeverything/infra/op';
|
||||
@@ -329,9 +328,6 @@ const ThemeProvider = () => {
|
||||
? Style.Light
|
||||
: Style.Default,
|
||||
}).catch(console.error);
|
||||
EdgeToEdge.setBackgroundColor({
|
||||
color: resolvedTheme === 'dark' ? '#000000' : '#F5F5F5',
|
||||
}).catch(console.error);
|
||||
AffineTheme.onThemeChanged({
|
||||
darkMode: resolvedTheme === 'dark',
|
||||
}).catch(console.error);
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
export interface AffineThemePlugin {
|
||||
onThemeChanged(options: { darkMode: boolean }): Promise<void>;
|
||||
getSystemNaviBarHeight(): Promise<{ height: number }>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user