Merge pull request #3202 from pangeachat/3178-add-no-subroom-placeholder-when-deleting-space

chore: change delete message for empty spaces
pull/2245/head
ggurdin 5 months ago committed by GitHub
commit dcf4bd2079
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -5032,5 +5032,6 @@
} }
} }
}, },
"failedToFetchTranscription": "Failed to fetch transcription" "failedToFetchTranscription": "Failed to fetch transcription",
"deleteEmptySpaceDesc": "The space will be deleted for all participants. This action cannot be undone."
} }

@ -115,6 +115,7 @@ class DeleteSpaceDialogState extends State<DeleteSpaceDialog> {
child: Container( child: Container(
constraints: const BoxConstraints( constraints: const BoxConstraints(
maxWidth: 400, maxWidth: 400,
maxHeight: 600,
), ),
padding: const EdgeInsets.symmetric(vertical: 20), padding: const EdgeInsets.symmetric(vertical: 20),
decoration: BoxDecoration( decoration: BoxDecoration(
@ -138,13 +139,15 @@ class DeleteSpaceDialogState extends State<DeleteSpaceDialog> {
vertical: 8.0, vertical: 8.0,
), ),
child: Text( child: Text(
L10n.of(context).deleteSpaceDesc, widget.space.spaceChildCount > 0
? L10n.of(context).deleteSpaceDesc
: L10n.of(context).deleteEmptySpaceDesc,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(color: Theme.of(context).colorScheme.error), style: TextStyle(color: Theme.of(context).colorScheme.error),
), ),
), ),
SizedBox( Expanded(
height: 300, child: SingleChildScrollView(
child: Builder( child: Builder(
builder: (context) { builder: (context) {
if (_loadingRooms) { if (_loadingRooms) {
@ -209,6 +212,7 @@ class DeleteSpaceDialogState extends State<DeleteSpaceDialog> {
}, },
), ),
), ),
),
Padding( Padding(
padding: const EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0), padding: const EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
child: Row( child: Row(

Loading…
Cancel
Save