From d36934ec0d0aa6905553323128cead64dcf3f13b Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Mon, 17 Feb 2025 15:31:56 +0530 Subject: [PATCH] remove --- mobile/lib/models/user_details.dart | 17 ------------- mobile/lib/utils/device_info.dart | 37 ----------------------------- 2 files changed, 54 deletions(-) diff --git a/mobile/lib/models/user_details.dart b/mobile/lib/models/user_details.dart index 4b9b2cdfe94..c99ba201843 100644 --- a/mobile/lib/models/user_details.dart +++ b/mobile/lib/models/user_details.dart @@ -4,7 +4,6 @@ import 'dart:math'; import 'package:collection/collection.dart'; import "package:photos/models/api/billing/subscription.dart"; import "package:photos/models/api/storage_bonus/bonus.dart"; -import 'package:photos/models/file/file_type.dart'; class UserDetails { final String email; @@ -215,19 +214,3 @@ class FamilyData { factory FamilyData.fromJson(String source) => FamilyData.fromMap(json.decode(source)); } - -class FilesCount { - final Map filesCount; - FilesCount(this.filesCount); - - int get total => - images + videos + livePhotos + (filesCount[getInt(FileType.other)] ?? 0); - - int get photos => images + livePhotos; - - int get images => filesCount[FileType.image] ?? 0; - - int get videos => filesCount[FileType.video] ?? 0; - - int get livePhotos => filesCount[FileType.livePhoto] ?? 0; -} diff --git a/mobile/lib/utils/device_info.dart b/mobile/lib/utils/device_info.dart index 4925a0b1448..ea9509b54e2 100644 --- a/mobile/lib/utils/device_info.dart +++ b/mobile/lib/utils/device_info.dart @@ -1,46 +1,9 @@ import 'dart:io'; import "package:device_info_plus/device_info_plus.dart"; -import 'package:flutter/foundation.dart'; import 'package:logging/logging.dart'; DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin(); -// https://gist.github.com/adamawolf/3048717 -final Set iOSLowEndMachineCodes = { - "iPhone5,1", //iPhone 5 (GSM) - "iPhone5,2", //iPhone 5 (GSM+CDMA) - "iPhone5,3", //iPhone 5C (GSM) - "iPhone5,4", //iPhone 5C (Global) - "iPhone6,1", //iPhone 5S (GSM) - "iPhone6,2", //iPhone 5S (Global) - "iPhone7,1", //iPhone 6 Plus - "iPhone7,2", //iPhone 6 - "iPhone8,1", // iPhone 6s - "iPhone8,2", // iPhone 6s Plus - "iPhone8,4", // iPhone SE (GSM) - "iPhone9,1", // iPhone 7 - "iPhone9,2", // iPhone 7 Plus - "iPhone9,3", // iPhone 7 - "iPhone9,4", // iPhone 7 Plus - "iPhone10,1", // iPhone 8 - "iPhone10,2", // iPhone 8 Plus - "iPhone10,3", // iPhone X Global - "iPhone10,4", // iPhone 8 - "iPhone10,5", // iPhone 8 -}; - -Future isLowSpecDevice() async { - try { - if (Platform.isIOS) { - final IosDeviceInfo iosInfo = await deviceInfoPlugin.iosInfo; - debugPrint("ios utc name ${iosInfo.utsname.machine}"); - return iOSLowEndMachineCodes.contains(iosInfo.utsname.machine); - } - } catch (e) { - Logger("device_info").severe("deviceSpec check failed", e); - } - return false; -} Future isAndroidSDKVersionLowerThan(int inputSDK) async { if (Platform.isAndroid) {