mirror of
https://github.com/immich-app/immich.git
synced 2026-06-04 05:45:24 -04:00
fix(mobile): clear shared link description
This commit is contained in:
@@ -366,8 +366,8 @@ class SharedLinkEditPage extends HookConsumerWidget {
|
||||
bool? download;
|
||||
bool? upload;
|
||||
bool? meta;
|
||||
String? desc;
|
||||
var password = const Optional<String?>.absent();
|
||||
var description = const Optional<String?>.absent();
|
||||
String? slug;
|
||||
DateTime? expiry;
|
||||
bool? changeExpiry;
|
||||
@@ -384,8 +384,10 @@ class SharedLinkEditPage extends HookConsumerWidget {
|
||||
meta = showMetadata.value;
|
||||
}
|
||||
|
||||
if (descriptionController.text != existingLink!.description) {
|
||||
desc = descriptionController.text;
|
||||
if (descriptionController.text != (existingLink!.description ?? '')) {
|
||||
description = descriptionController.text.isEmpty
|
||||
? const Optional.present(null)
|
||||
: Optional.present(descriptionController.text);
|
||||
}
|
||||
|
||||
if (passwordController.text != (existingLink!.password ?? '')) {
|
||||
@@ -413,7 +415,7 @@ class SharedLinkEditPage extends HookConsumerWidget {
|
||||
showMeta: meta,
|
||||
allowDownload: download,
|
||||
allowUpload: upload,
|
||||
description: desc,
|
||||
description: description,
|
||||
password: password,
|
||||
slug: slug,
|
||||
expiresAt: expiry?.toUtc(),
|
||||
|
||||
@@ -89,8 +89,8 @@ class SharedLinkService {
|
||||
required bool? allowDownload,
|
||||
required bool? allowUpload,
|
||||
bool? changeExpiry = false,
|
||||
String? description,
|
||||
Optional<String?> password = const Optional.absent(),
|
||||
Optional<String?> description = const Optional.absent(),
|
||||
String? slug,
|
||||
DateTime? expiresAt,
|
||||
}) async {
|
||||
@@ -102,8 +102,8 @@ class SharedLinkService {
|
||||
allowDownload: allowDownload == null ? const Optional.absent() : Optional.present(allowDownload),
|
||||
allowUpload: allowUpload == null ? const Optional.absent() : Optional.present(allowUpload),
|
||||
expiresAt: expiresAt == null ? const Optional.absent() : Optional.present(expiresAt),
|
||||
description: description == null ? const Optional.absent() : Optional.present(description),
|
||||
password: password,
|
||||
description: description,
|
||||
slug: slug == null ? const Optional.absent() : Optional.present(slug),
|
||||
changeExpiryTime: changeExpiry == null ? const Optional.absent() : Optional.present(changeExpiry),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user