mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
Bugfix/persistent UUID (#46)
* UUID is now persisted between reinstallation
This commit is contained in:
parent
e085a10cf3
commit
c624580596
6 changed files with 31 additions and 9 deletions
|
|
@ -13,8 +13,8 @@ class LoginForm extends HookConsumerWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final usernameController = useTextEditingController(text: '');
|
||||
final passwordController = useTextEditingController(text: '');
|
||||
final usernameController = useTextEditingController(text: 'testuser@email.com');
|
||||
final passwordController = useTextEditingController(text: 'password');
|
||||
final serverEndpointController = useTextEditingController(text: 'http://192.168.1.216:2283');
|
||||
|
||||
return Center(
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:device_info_plus/device_info_plus.dart';
|
||||
import 'package:flutter_udid/flutter_udid.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class DeviceInfoService {
|
||||
|
|
@ -9,16 +10,14 @@ class DeviceInfoService {
|
|||
String deviceType = "";
|
||||
|
||||
try {
|
||||
AndroidDeviceInfo androidInfo = await deviceInfo.androidInfo;
|
||||
deviceId = androidInfo.androidId;
|
||||
deviceId = await FlutterUdid.consistentUdid;
|
||||
deviceType = "ANDROID";
|
||||
} catch (e) {
|
||||
debugPrint("Not an android device");
|
||||
}
|
||||
|
||||
try {
|
||||
IosDeviceInfo iosInfo = await deviceInfo.iosInfo;
|
||||
deviceId = iosInfo.identifierForVendor;
|
||||
deviceId = await FlutterUdid.consistentUdid;
|
||||
deviceType = "IOS";
|
||||
debugPrint("Device ID: $deviceId");
|
||||
} catch (e) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue