fix: Change device displayname

This commit is contained in:
Christian Pauly 2020-10-15 09:34:40 +02:00
parent a9ad310952
commit c5c7ee7e07
3 changed files with 24 additions and 2 deletions

View File

@ -1 +1 @@
8ccc4b539b008db59a45e66a3eaa417e
6584a396d0abc5ca0aed64b9b1c06b3d

View File

@ -1,4 +1,6 @@
PODS:
- disk_space (0.0.1):
- Flutter
- DKImagePickerController/Core (4.2.2):
- DKImagePickerController/ImageDataManager
- DKImagePickerController/Resource
@ -30,6 +32,8 @@ PODS:
- DKPhotoGallery/Resource (0.0.14):
- SDWebImage
- SDWebImageFLPlugin
- file_chooser (0.0.1):
- Flutter
- file_picker (0.0.1):
- DKImagePickerController/PhotoGallery
- Flutter
@ -132,6 +136,8 @@ PODS:
- OLMKit/olmcpp (3.1.0)
- open_file (0.0.1):
- Flutter
- package_info (0.0.1):
- Flutter
- path_provider (0.0.1):
- Flutter
- path_provider_linux (0.0.1):
@ -192,6 +198,8 @@ PODS:
- Flutter
DEPENDENCIES:
- disk_space (from `.symlinks/plugins/disk_space/ios`)
- file_chooser (from `.symlinks/plugins/file_chooser/ios`)
- file_picker (from `.symlinks/plugins/file_picker/ios`)
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
- firebase_core_web (from `.symlinks/plugins/firebase_core_web/ios`)
@ -206,6 +214,7 @@ DEPENDENCIES:
- image_picker (from `.symlinks/plugins/image_picker/ios`)
- native_imaging (from `.symlinks/plugins/native_imaging/ios`)
- open_file (from `.symlinks/plugins/open_file/ios`)
- package_info (from `.symlinks/plugins/package_info/ios`)
- path_provider (from `.symlinks/plugins/path_provider/ios`)
- path_provider_linux (from `.symlinks/plugins/path_provider_linux/ios`)
- path_provider_macos (from `.symlinks/plugins/path_provider_macos/ios`)
@ -248,6 +257,10 @@ SPEC REPOS:
- sqlite3
EXTERNAL SOURCES:
disk_space:
:path: ".symlinks/plugins/disk_space/ios"
file_chooser:
:path: ".symlinks/plugins/file_chooser/ios"
file_picker:
:path: ".symlinks/plugins/file_picker/ios"
firebase_core:
@ -276,6 +289,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/native_imaging/ios"
open_file:
:path: ".symlinks/plugins/open_file/ios"
package_info:
:path: ".symlinks/plugins/package_info/ios"
path_provider:
:path: ".symlinks/plugins/path_provider/ios"
path_provider_linux:
@ -306,8 +321,10 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/webview_flutter/ios"
SPEC CHECKSUMS:
disk_space: e94d34bbdf77954adfb39e60bde9cc5c7233eda6
DKImagePickerController: 4a3e7948a848c4348e600b3fe5ce41478835fa10
DKPhotoGallery: 0290d32343574f06eaa4c26f8f2f8a1035e916be
file_chooser: 98943893422baaed80ca2415390aec58f01ea192
file_picker: 3e6c3790de664ccf9b882732d9db5eaf6b8d4eb1
Firebase: 7cf5f9c67f03cb3b606d1d6535286e1080e57eb6
firebase_core: 3134fe79d257d430f163b558caf52a10a87efe8a
@ -336,6 +353,7 @@ SPEC CHECKSUMS:
native_imaging: 633687fc14422729cc67ed80c3435e359ef7a92b
OLMKit: 4ee0159d63feeb86d836fdcfefe418e163511639
open_file: 02eb5cb6b21264bd3a696876f5afbfb7ca4f4b7d
package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62
path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c
path_provider_linux: 4d630dc393e1f20364f3e3b4a2ff41d9674a84e4
path_provider_macos: f760a3c5b04357c380e2fddb6f9db6f3015897e0

View File

@ -62,11 +62,14 @@ class DevicesSettingsState extends State<DevicesSettings> {
labelText: L10n.of(context).changeDeviceName,
);
if (displayName == null) return;
await SimpleDialogs(context).tryRequestWithLoadingDialog(
final success = await SimpleDialogs(context).tryRequestWithLoadingDialog(
Matrix.of(context)
.client
.setDeviceMetadata(device.deviceId, displayName: displayName),
);
if (success != false) {
reload();
}
}
@override
@ -101,6 +104,7 @@ class DevicesSettingsState extends State<DevicesSettings> {
if (thisDevice != null)
UserDeviceListItem(
thisDevice,
rename: (d) => _renameDeviceAction(context, d),
remove: (d) => _removeDevicesAction(context, [d]),
),
Divider(height: 1),