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