forked from akai/readest
mobile: fix hasSafeAreaInset as PWA is only for WebAppService (#314)
This commit is contained in:
@@ -22,7 +22,6 @@ import { isValidURL } from '@/utils/misc';
|
||||
|
||||
import { BaseAppService } from './appService';
|
||||
import { LOCAL_BOOKS_SUBDIR } from './constants';
|
||||
import { isPWA } from './environment';
|
||||
|
||||
const OS_TYPE = osType();
|
||||
|
||||
@@ -125,7 +124,7 @@ export class NativeAppService extends BaseAppService {
|
||||
hasWindowBar = !(OS_TYPE === 'ios' || OS_TYPE === 'android');
|
||||
hasContextMenu = !(OS_TYPE === 'ios' || OS_TYPE === 'android');
|
||||
hasRoundedWindow = !(OS_TYPE === 'ios' || OS_TYPE === 'android');
|
||||
hasSafeAreaInset = OS_TYPE === 'ios' || OS_TYPE === 'android' || isPWA();
|
||||
hasSafeAreaInset = OS_TYPE === 'ios' || OS_TYPE === 'android';
|
||||
|
||||
override resolvePath(fp: string, base: BaseDir): { baseDir: number; base: BaseDir; fp: string } {
|
||||
return resolvePath(fp, base);
|
||||
|
||||
@@ -3,6 +3,7 @@ import { ToastType, FileSystem, BaseDir, AppPlatform } from '@/types/system';
|
||||
import { getCoverFilename } from '@/utils/book';
|
||||
import { isValidURL } from '@/utils/misc';
|
||||
|
||||
import { isPWA } from './environment';
|
||||
import { BaseAppService } from './appService';
|
||||
import { LOCAL_BOOKS_SUBDIR } from './constants';
|
||||
|
||||
@@ -185,7 +186,7 @@ export class WebAppService extends BaseAppService {
|
||||
hasWindowBar = false;
|
||||
hasContextMenu = false;
|
||||
hasRoundedWindow = false;
|
||||
hasSafeAreaInset = false;
|
||||
hasSafeAreaInset = isPWA();
|
||||
|
||||
override resolvePath(fp: string, base: BaseDir): { baseDir: number; base: BaseDir; fp: string } {
|
||||
return resolvePath(fp, base);
|
||||
|
||||
Reference in New Issue
Block a user