Files
mattermost-mobile/app/screens/settings/index.tsx
Avinash Lingaloo dd3e62daf0 MM-46935 - Gekidou Report Problem (#6800)
* placement of 'report a problem'

* installed react-native-mail

* settings/report_problem

- Opens on Email App on Android
- Crashes on iOS if no account signed in the mail app

* new wiring

* new wiring

* tried first strategy for attachment

* tried second strategy for attachment

* Update report_problem.tsx

* revert changes to package.json

* removes unused supportEmail

* install @mattermost/react-native-turbo-mailer

* update import

* Update Podfile.lock
2022-11-30 23:02:52 +04:00

29 lines
944 B
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {withDatabase} from '@nozbe/watermelondb/DatabaseProvider';
import withObservables from '@nozbe/with-observables';
import {of as of$} from 'rxjs';
import {switchMap} from 'rxjs/operators';
import {observeConfigValue} from '@queries/servers/system';
import {isValidUrl} from '@utils/url';
import Settings from './settings';
import type {WithDatabaseArgs} from '@typings/database/database';
const enhanced = withObservables([], ({database}: WithDatabaseArgs) => {
const helpLink = observeConfigValue(database, 'HelpLink');
const showHelp = helpLink.pipe(switchMap((link: string) => of$(link ? isValidUrl(link) : false)));
const siteName = observeConfigValue(database, 'SiteName');
return {
helpLink,
showHelp,
siteName,
};
});
export default withDatabase(enhanced(Settings));