Skip to content

Commit

Permalink
fix(Logcat): 更新布局结构,添加Portal.Host以优化组件渲染
Browse files Browse the repository at this point in the history
  • Loading branch information
thoulee21 committed Jan 9, 2025
1 parent f011572 commit e52907c
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/pages/logcat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export const Logcat = () => {
), []);

return (
<>
<Portal.Host>
<Animated.FlatList
ref={logsRef}
data={logLines}
Expand All @@ -176,6 +176,7 @@ export const Logcat = () => {
<Portal>
<FAB
icon="arrow-down"
variant="surface"
style={styles.fab}
onPress={() => {
if (logsRef.current) {
Expand Down Expand Up @@ -206,18 +207,22 @@ export const Logcat = () => {
<Button
textColor={appTheme.colors.outline}
onPress={() => setDialogVisible(false)}
>Cancel</Button>
>
Cancel
</Button>
<Button
textColor={appTheme.colors.error}
onPress={() => {
clearLogs();
setDialogVisible(false);
}}
>OK</Button>
>
OK
</Button>
</Dialog.Actions>
</Dialog>
</Portal>
</>
</Portal.Host>
);
};

Expand Down

0 comments on commit e52907c

Please sign in to comment.