forked from Ivasoft/mattermost-mobile
* added chevron to menu item component * starting with the skeleton * starting with the skeleton * starting with the skeleton * starting with the skeleton * remove extra line * tested on tablets * some corrections * corrections as per review * starting with notification skeleton * attached notification settings to navigation * added auto responder * update translation * update snapshot * updated snapshot * correction after review * removed unnecessary screen * refactored * updated the testIDs * Update Package.resolved * refactor * removed Mattermost as default server name * fix ts * refactored settings constant * display settings skeleton - pending: query for allowed themes * added 'allowedThemes' query * added section item * mention screen skeleton in place * added section and sectionItem component * added reply section to the mention screen * update i18n * rename screens properly * update i18n * Refactored to MentionSettings component * Refactored to ReplySettings component * style clean up * textTransform uppercase * rename Section/SectionItem to Block/BlockItem * added mobile push notif screen - push status section * adding text to those two components * correction following review * added mobile push notification section * added mobile push notification thread section * style fix * code fix * code fix * added skeleton for auto responder * code clean up * display theme skeleton * display theme skeleton * now using selected theme * clean up code * showing custom theme * setTheme implemented * code clean up * some corrections * Gekidou - Replace BlockItem with OptionItem (#6352) * Replaced BlockItem component with OptionItem * ui fix * corrections from PR review * code clean up * correction from PR review * fix - SettingsDisplay was wrongly removed from @screen/index * fix dependencies * corrections from peer review
28 lines
844 B
TypeScript
28 lines
844 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 {
|
|
observeAllowedThemesKeys,
|
|
observeCurrentTeamId,
|
|
observeCurrentUserId,
|
|
} from '@queries/servers/system';
|
|
import {WithDatabaseArgs} from '@typings/database/database';
|
|
|
|
import DisplayTheme from './display_theme';
|
|
|
|
const enhanced = withObservables([], ({database}: WithDatabaseArgs) => {
|
|
const currentTeamId = observeCurrentTeamId(database);
|
|
const currentUserId = observeCurrentUserId(database);
|
|
|
|
return {
|
|
allowedThemeKeys: observeAllowedThemesKeys(database),
|
|
currentTeamId,
|
|
currentUserId,
|
|
};
|
|
});
|
|
|
|
export default withDatabase(enhanced(DisplayTheme));
|