A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
add isLargeTablet method
ammarahm-ed78f824f46a4c
diff --git a/apps/mobile/src/services/DeviceDetection.js b/apps/mobile/src/services/DeviceDetection.jsindex e325b8aa4..1d2bc1bd2 100644--- a/apps/mobile/src/services/DeviceDetection.js+++ b/apps/mobile/src/services/DeviceDetection.js@@ -21,6 +21,18 @@ export class DeviceDetectionService {this.checkSmallTab();}+ setSize(size) {+ windowSize = size;+ this.width = windowSize.width;+ this.height = windowSize.height;+ this.adjustedWidth = this.width * this.pixelDensity;+ this.adjustedHeight = this.height * this.pixelDensity;+ this.isPhoneOrTablet();+ this.isIosOrAndroid();+ this.detectIphoneX();+ this.checkSmallTab();+ }+getDeviceSize = () => {let dpi = this.pixelDensity * 160;let deviceWidthInInches = this.adjustedWidth / dpi;@@ -34,7 +46,7 @@ export class DeviceDetectionService {this.width = Dimensions.get('screen').width;this.height = Dimensions.get('screen').height;let deviceSize = this.getDeviceSize();-+ console.log(orientation,"orientation")if (DeviceInfo.isTablet() && (orientation === "PORTRAIT" || deviceSize < 9)) {console.log('small tab');this.isTab = true;@@ -100,6 +112,10 @@ export class DeviceDetectionService {!Platform.isTVOS &&(windowSize.height === 812 || windowSize.width === 812);}++ isLargeTablet() {+ return this.isTab && !this.isSmallTab+ }}export const DDS = new DeviceDetectionService();\ No newline at end of file