Skip to content

Commit

Permalink
chore: run Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexogamer committed Aug 17, 2024
1 parent daa1d2a commit 8100fd7
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 21 deletions.
10 changes: 5 additions & 5 deletions App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,17 @@ function checkLastVersion() {
console.log(app.version, lastVersion);
if (!lastVersion || lastVersion === '') {
console.log(
`[APP] lastVersion is null (${lastVersion}), setting to app.version (${app.version})`
`[APP] lastVersion is null (${lastVersion}), setting to app.version (${app.version})`,
);
app.settings.set('app.lastVersion', app.version);
} else {
app.version === lastVersion
? console.log(
`[APP] lastVersion (${lastVersion}) is equal to app.version (${app.version})`
)
`[APP] lastVersion (${lastVersion}) is equal to app.version (${app.version})`,
)
: console.log(
`[APP] lastVersion (${lastVersion}) is different from app.version (${app.version})`
);
`[APP] lastVersion (${lastVersion}) is different from app.version (${app.version})`,
);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Generic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {setLanguage} from '@rvmob-i18n/i18n';
import {languages} from '@rvmob-i18n/languages';
import {setTheme, themes} from '@rvmob/Theme';
import {DEFAULT_API_URL, LOADING_SCREEN_REMARKS} from '@rvmob/lib/consts';
import { checkNotificationPerms } from '@rvmob/lib/notifications';
import {checkNotificationPerms} from '@rvmob/lib/notifications';
import {
CreateChannelModalProps,
DeletableObject,
Expand Down
6 changes: 5 additions & 1 deletion src/lib/notifications/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
export {createChannel, sendNotifeeNotification, setUpNotifeeListener} from './notifee';
export {
createChannel,
sendNotifeeNotification,
setUpNotifeeListener,
} from './notifee';
export {checkNotificationPerms} from './permissions';
28 changes: 14 additions & 14 deletions src/lib/notifications/permissions.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { PermissionsAndroid } from 'react-native';
import {PermissionsAndroid} from 'react-native';

export function checkNotificationPerms() {
PermissionsAndroid.request(
PermissionsAndroid.PERMISSIONS.POST_NOTIFICATIONS,
{
title: 'Allow RVMob Notifications',
message:
'RVMob needs permission to send you message notifications. You can turn them off at any time.',
buttonNeutral: 'Maybe later',
buttonNegative: 'Nuh uh',
buttonPositive: 'Sure',
},
).then(result => {
console.log(`[SETTINGS] Permission request result: ${result}`);
});
PermissionsAndroid.request(
PermissionsAndroid.PERMISSIONS.POST_NOTIFICATIONS,
{
title: 'Allow RVMob Notifications',
message:
'RVMob needs permission to send you message notifications. You can turn them off at any time.',
buttonNeutral: 'Maybe later',
buttonNegative: 'Nuh uh',
buttonPositive: 'Sure',
},
).then(result => {
console.log(`[SETTINGS] Permission request result: ${result}`);
});
}

0 comments on commit 8100fd7

Please sign in to comment.