mirror of
https://gitee.com/openharmony/applications_photos
synced 2024-11-23 07:00:09 +00:00
commit
d772320553
@ -13,6 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import deviceInfo from '@ohos.deviceInfo';
|
||||
import Ability from '@ohos.application.Ability'
|
||||
import wantConstant from '@ohos.ability.wantConstant'
|
||||
import { Logger } from '../common/utils/Logger'
|
||||
@ -32,7 +33,7 @@ const appLogger: Logger = new Logger('app');
|
||||
let isFromCard = false;
|
||||
let isFromCamera = false;
|
||||
let appBroadCast = BroadCastManager.getInstance().getBroadCast();
|
||||
const pagePath: string = 'product/pad/view/index';
|
||||
var pagePath: string = deviceInfo.deviceType == ('phone' || 'default') ? 'product/phone/view/index' : 'product/pad/view/index';
|
||||
|
||||
export default class MainAbility extends Ability {
|
||||
private static readonly RETRY_MAX_TIMES = 100;
|
||||
|
@ -14,6 +14,7 @@ import window from '@ohos.window';
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import deviceInfo from '@ohos.deviceInfo';
|
||||
import { Logger } from '../../utils/Logger'
|
||||
import { Constants } from './Constants'
|
||||
import { UiUtil } from '../../utils/UiUtil'
|
||||
@ -57,10 +58,10 @@ export class ScreenManager {
|
||||
private columns: number = ColumnSize.COLUMN_FOUR;
|
||||
|
||||
// Default orientation
|
||||
private horizontal = true;
|
||||
private horizontal = deviceInfo.deviceType == ('phone' || 'default') ? false : true;
|
||||
|
||||
// Default sidebar
|
||||
private sidebar = true;
|
||||
private sidebar = deviceInfo.deviceType == ('phone' || 'default') ? false : true;
|
||||
private windowMode = WindowMode.UNDEFINED;
|
||||
|
||||
private constructor() {
|
||||
|
Loading…
Reference in New Issue
Block a user