mattermost-mobile/app/screens/settings/index.tsx
Avinash Lingaloo 39cfb297a3
MM-39711 - Gekidou Advanced Settings (#6412)
* fix display clock

* implemented help functionality

* skelton for adv settings

* added rightComponent to menuItem

* added advanced settings

* adv settings delete

* Update en.json

* clean up

* Update index.tsx

* fix for camera-roll on android > 30

* undo delete camera-roll images

* Update app/screens/settings/index.tsx

Co-authored-by: Daniel Espino García <larkox@gmail.com>

* refactoring

* removed menu item

* refactored imports and getAllFilesInCachesDirectory transferred into util/files

* corrections after review

* ts fix

Co-authored-by: Daniel Espino García <larkox@gmail.com>
2022-07-08 14:39:41 +04:00

28 lines
936 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 siteName = observeConfigValue(database, 'SiteName');
const helpLink = observeConfigValue(database, 'HelpLink');
const showHelp = helpLink.pipe(switchMap((link) => of$(link ? isValidUrl(link) : false)));
return {
showHelp,
siteName,
helpLink,
};
});
export default withDatabase(enhanced(Settings));