* Refactor app database queries to not require the app database as argument * Android Share Extension and fix notifications prompt * feedback review
18 lines
681 B
TypeScript
18 lines
681 B
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import withObservables from '@nozbe/with-observables';
|
|
|
|
import {observeCanUploadFiles, observeConfigIntValue, observeMaxFileCount} from '@queries/servers/system';
|
|
|
|
import Attachments from './attachments';
|
|
|
|
import type {WithDatabaseArgs} from '@typings/database/database';
|
|
|
|
const enhanced = withObservables(['database'], ({database}: WithDatabaseArgs) => ({
|
|
canUploadFiles: observeCanUploadFiles(database),
|
|
maxFileCount: observeMaxFileCount(database),
|
|
maxFileSize: observeConfigIntValue(database, 'MaxFileSize'),
|
|
}));
|
|
|
|
export default enhanced(Attachments);
|