Skip to content

Commit 55b15a8

Browse files
Add ability to show alerts on homescreen again
1 parent 4219e46 commit 55b15a8

3 files changed

Lines changed: 23 additions & 3 deletions

File tree

src/slices/settings.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,10 @@ const settingsSlice = createSlice({
275275
setBugreportInfoDismissed: state => {
276276
state.bugreportInfoDismissed = true;
277277
},
278+
resetAllDismissedFlags: state => {
279+
state.feedbackInfoDismissed = false;
280+
state.bugreportInfoDismissed = false;
281+
},
278282
},
279283
});
280284

@@ -305,6 +309,7 @@ export const {
305309
setLastAppVersion,
306310
setFeedbackInfoDismissed,
307311
setBugreportInfoDismissed,
312+
resetAllDismissedFlags,
308313
} = settingsSlice.actions;
309314

310315
export const { reducer: SettingsReducer } = settingsSlice;

src/translations

src/views/navigation/screens/InformationGroup/AboutAppScreen.tsx

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { Linking, ScrollView, View } from 'react-native';
1818

1919
import moment from 'moment';
2020

21-
import { setEnableAppUpdates } from '@/slices/settings';
21+
import { resetAllDismissedFlags, setEnableAppUpdates } from '@/slices/settings';
2222

2323
import GenericRefreshModal from '@/components/modals/GenericRefreshModal';
2424
import OrientationContainer from '@/components/OrientationContainer';
@@ -81,6 +81,9 @@ const AboutAppScreen: FC<PropsWithNavigation> = ({ navigation }) => {
8181
setShowRefreshModal(false);
8282
}, []);
8383

84+
const [hasPressedResetDismissedFlags, setHasPressedResetDismissedFlags] =
85+
useState<boolean>(false);
86+
8487
return (
8588
<>
8689
<Appbar.Header>
@@ -211,9 +214,21 @@ const AboutAppScreen: FC<PropsWithNavigation> = ({ navigation }) => {
211214
disabled={!allowInAppUpdates}
212215
style={{
213216
opacity: !allowInAppUpdates ? 0.5 : 1,
214-
borderRadius: 24,
215217
}}
216218
/>
219+
<Divider />
220+
<Box p={8}>
221+
<Button
222+
mode="contained-tonal"
223+
onPress={() => {
224+
dispatch(resetAllDismissedFlags());
225+
setHasPressedResetDismissedFlags(true);
226+
}}
227+
disabled={hasPressedResetDismissedFlags}
228+
>
229+
{t('aboutApp.showAlertsAgain')}
230+
</Button>
231+
</Box>
217232
</Surface>
218233
) : null}
219234
<View style={{ height: spacing * 2 }} />

0 commit comments

Comments
 (0)