mirror of
				https://github.com/KevinMidboe/immich.git
				synced 2025-10-29 17:40:28 +00:00 
			
		
		
		
	chore(server,mobile): remove device info entity (#1527)
* chore(server): remove unused device info code * chore: generate open api * remove any DeviceTypeEnum usage from mobile * chore: coverage * fix: drop device info table --------- Co-authored-by: Fynn Petersen-Frey <zody22@gmail.com>
This commit is contained in:
		@@ -1,23 +0,0 @@
 | 
			
		||||
import 'package:flutter_udid/flutter_udid.dart';
 | 
			
		||||
import 'dart:io' show Platform;
 | 
			
		||||
 | 
			
		||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
 | 
			
		||||
import 'package:openapi/api.dart';
 | 
			
		||||
 | 
			
		||||
final deviceInfoServiceProvider = Provider((_) => DeviceInfoService());
 | 
			
		||||
 | 
			
		||||
class DeviceInfoService {
 | 
			
		||||
  Future<Map<String, dynamic>> getDeviceInfo() async {
 | 
			
		||||
    // Get device info
 | 
			
		||||
    var deviceId = await FlutterUdid.consistentUdid;
 | 
			
		||||
    var deviceType = DeviceTypeEnum.ANDROID;
 | 
			
		||||
 | 
			
		||||
    if (Platform.isAndroid) {
 | 
			
		||||
      deviceType = DeviceTypeEnum.ANDROID;
 | 
			
		||||
    } else if (Platform.isIOS) {
 | 
			
		||||
      deviceType = DeviceTypeEnum.IOS;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return {"deviceId": deviceId, "deviceType": deviceType};
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user