forked from Ivasoft/mattermost-mobile
Fix iPad build
This commit is contained in:
@@ -19,6 +19,10 @@ executors:
|
||||
resource_class: <<parameters.resource_class>>
|
||||
|
||||
ios:
|
||||
parameters:
|
||||
resource_class:
|
||||
default: medium
|
||||
type: string
|
||||
environment:
|
||||
NODE_OPTIONS: --max_old_space_size=12000
|
||||
NODE_ENV: production
|
||||
@@ -27,6 +31,7 @@ executors:
|
||||
xcode: "13.3.0"
|
||||
working_directory: ~/mattermost-mobile
|
||||
shell: /bin/bash --login -o pipefail
|
||||
resource_class: <<parameters.resource_class>>
|
||||
|
||||
commands:
|
||||
checkout-private:
|
||||
@@ -342,7 +347,9 @@ jobs:
|
||||
# filename: "*.apk"
|
||||
|
||||
build-ios-beta:
|
||||
executor: ios
|
||||
executor:
|
||||
name: ios
|
||||
resource_class: large
|
||||
steps:
|
||||
- build-ios
|
||||
- persist
|
||||
|
||||
@@ -13,13 +13,21 @@ type SelectedView = {
|
||||
Component: any;
|
||||
}
|
||||
|
||||
type Props = {
|
||||
currentChannelId: string;
|
||||
isCRTEnabled: boolean;
|
||||
}
|
||||
|
||||
const ComponentsList: Record<string, React.ReactNode> = {
|
||||
[Screens.CHANNEL]: Channel,
|
||||
[Screens.GLOBAL_THREADS]: GlobalThreads,
|
||||
};
|
||||
|
||||
const AdditionalTabletView = () => {
|
||||
const [selected, setSelected] = useState<SelectedView>();
|
||||
const channelScreen: SelectedView = {id: Screens.CHANNEL, Component: Channel};
|
||||
const globalScreen: SelectedView = {id: Screens.GLOBAL_THREADS, Component: GlobalThreads};
|
||||
|
||||
const AdditionalTabletView = ({currentChannelId, isCRTEnabled}: Props) => {
|
||||
const [selected, setSelected] = useState<SelectedView>(isCRTEnabled && !currentChannelId ? globalScreen : channelScreen);
|
||||
|
||||
useEffect(() => {
|
||||
const listener = DeviceEventEmitter.addListener(Navigation.NAVIGATION_HOME, (id: string) => {
|
||||
@@ -0,0 +1,19 @@
|
||||
// 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 {observeCurrentChannelId} from '@queries/servers/system';
|
||||
import {observeIsCRTEnabled} from '@queries/servers/thread';
|
||||
|
||||
import AdditionalTabletView from './additional_tablet_view';
|
||||
|
||||
import type {WithDatabaseArgs} from '@typings/database/database';
|
||||
|
||||
const enhanced = withObservables([], ({database}: WithDatabaseArgs) => ({
|
||||
currentChannelId: observeCurrentChannelId(database),
|
||||
isCRTEnabled: observeIsCRTEnabled(database),
|
||||
}));
|
||||
|
||||
export default withDatabase(enhanced(AdditionalTabletView));
|
||||
@@ -111,6 +111,8 @@
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UIRequiresFullScreen</key>
|
||||
<true/>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
|
||||
Reference in New Issue
Block a user