Skip to content

Commit

Permalink
Merge pull request #20
Browse files Browse the repository at this point in the history
fix-header-buttons-disappearing
  • Loading branch information
sampie777 authored Nov 7, 2022
2 parents 0f80826 + 30e5638 commit 86e8953
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
8 changes: 1 addition & 7 deletions source/gui/screens/documents/document/SingleDocument.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ const SingleDocument: React.FC<NativeStackScreenProps<ParamList, "Document">> =
const onBlur = () => {
keepScreenAwake(false);
setDocument(undefined);
navigation.setOptions({
title: ""
});
};

useEffect(() => {
Expand All @@ -78,7 +75,7 @@ const SingleDocument: React.FC<NativeStackScreenProps<ParamList, "Document">> =
setTimeout(() => scrollToTop(), 150);
}, [document?.id]);

useEffect(() => {
React.useLayoutEffect(() => {
if (document === undefined) {
navigation.setOptions({
title: ""
Expand Down Expand Up @@ -109,9 +106,6 @@ const SingleDocument: React.FC<NativeStackScreenProps<ParamList, "Document">> =
}

setDocument(newDocument);
navigation.setOptions({
title: newDocument?.name
});
};

const animate = () => {
Expand Down
4 changes: 0 additions & 4 deletions source/gui/screens/songs/song/SongDisplayScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,6 @@ const SongDisplayScreen: React.FC<ComponentProps> = ({ route, navigation }) => {
const onBlur = () => {
keepScreenAwake(false);
setSong(undefined);
navigation.setOptions({
title: "",
headerRight: undefined
});
};

useEffect(() => {
Expand Down

0 comments on commit 86e8953

Please sign in to comment.