defaulting nsfw to warn, fixed modal not appearing issue

This commit is contained in:
Nouman Tahir 2021-03-18 12:17:26 +05:00
parent ca5437bacc
commit e0dd6f8ed3
2 changed files with 4 additions and 4 deletions

View File

@ -501,7 +501,7 @@ export const getSettings = async () => {
notification: true,
server: '',
upvotePercent: '1',
nsfw: '0',
nsfw: '1',
followNotification: true,
voteNotification: true,
commentNotification: true,
@ -668,8 +668,8 @@ export const getStorageType = async () => {
export const getVersionForWelcomeModal = async () => {
try {
const application = await getItemFromStorage(APPLICATION_SCHEMA);
if (application.versionForWelcomeModal) {
return parseFloat(application.versionForWelcomeModal);
if (application && application.versionForWelcomeModal) {
return parseFloat(application.versionForWelcomeModal) || 0;
}
return 0;
} catch (error) {

View File

@ -57,7 +57,7 @@ const initialState = {
voteNotification: true,
},
upvotePercent: 1,
nsfw: 'Always show',
nsfw: '1',
pin: null,
isPinCodeOpen: true,
isRenderRequired: false,