Remove unused _revokeShareLink method and update share link message for clarity

This commit is contained in:
Leon Bösche
2026-01-24 23:54:07 +01:00
parent e4931d4e03
commit 119e8e0736

View File

@@ -109,31 +109,6 @@ class _ShareFileDialogState extends State<ShareFileDialog> {
}
}
Future<void> _revokeShareLink() async {
setState(() {
_isLoading = true;
_error = null;
});
try {
final apiClient = getIt<ApiClient>();
final path = widget.orgId.isEmpty
? '/orgs/files/${widget.fileId}/share'
: '/orgs/${widget.orgId}/files/${widget.fileId}/share';
await apiClient.delete(path);
setState(() {
_shareUrl = null;
_isLoading = false;
});
} catch (e) {
setState(() {
_error = 'Failed to revoke share link';
_isLoading = false;
});
}
}
void _copyToClipboard() {
if (_shareUrl != null) {
Clipboard.setData(ClipboardData(text: _shareUrl!));
@@ -215,7 +190,7 @@ class _ShareFileDialogState extends State<ShareFileDialog> {
children: [
if (_shareUrl != null) ...[
Text(
'Share link created. Anyone with this link can view and download the file.',
'Anyone with this link can view and download the file.',
style: TextStyle(color: AppTheme.secondaryText),
),
const SizedBox(height: 16),