Skip to content

Commit

Permalink
Set saved to false when photo is changing its state
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamkmr04 committed Mar 20, 2024
1 parent 2a57594 commit 1f5676a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 2 additions & 4 deletions views/Settings/NodeConfiguration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -959,9 +959,7 @@ export default class NodeConfiguration extends React.Component<
<View style={styles.container}>
<TouchableOpacity
onPress={
(node === null ||
node?.photo === '' ||
node?.photo === null) &&
(node === null || !node.photo) &&
photo === null
? () =>
navigation.navigate(
Expand All @@ -970,7 +968,7 @@ export default class NodeConfiguration extends React.Component<
)
: () =>
this.setState(
{ photo: null },
{ photo: null, saved: false },
() =>
node
? (node.photo = '')
Expand Down
3 changes: 2 additions & 1 deletion views/Settings/SetNodePicture.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ export default class SetNodePicture extends React.Component<
title={localeString('views.SetNodePicture.setPicture')}
onPress={() => {
navigation.navigate('NodeConfiguration', {
photo
photo,
saved: false
});
}}
containerStyle={{ paddingBottom: 10 }}
Expand Down

0 comments on commit 1f5676a

Please sign in to comment.