* Refactor post draft component Re-styled ReadOnly channels Remove filename from upload error * Update canSubmit based on file attachment changes * Fix error message for max file size * Fix select autocomplete values on iOS * Style readonly and refactor accessory view for iOS * Make PostDraft scrollViewNativeID prop not required * Update ReadOnly to have a background with 0.40 opacity * Update max file size error message * Fix shift+enter with HW keyboard
24 lines
550 B
JavaScript
24 lines
550 B
JavaScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import {createSelector} from 'reselect';
|
|
|
|
import {selectDraft} from './views';
|
|
|
|
export const selectFilesFromDraft = createSelector(
|
|
selectDraft,
|
|
(draft) => {
|
|
if (!draft || !draft.files) {
|
|
return [];
|
|
}
|
|
|
|
return draft.files;
|
|
},
|
|
);
|
|
|
|
export const checkForFileUploadingInChannel = createSelector(
|
|
selectFilesFromDraft,
|
|
(files) => {
|
|
return files.some((f) => f.loading);
|
|
},
|
|
);
|