Skip to content

Commit

Permalink
Allow blank comment
Browse files Browse the repository at this point in the history
  • Loading branch information
tsutsu3 committed Feb 24, 2025
1 parent eb72575 commit 06c9c57
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/screens/domains/domain_comment_modal.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class _DomainCommentModalState extends State<DomainCommentModal> {
_commentController = TextEditingController(text: widget.domain.comment);
_commentController.addListener(() {
setState(() {
isSaveEnabled = _commentController.text.isNotEmpty;
isSaveEnabled = _commentController.text != widget.domain.comment;

Check warning on line 31 in lib/screens/domains/domain_comment_modal.dart

View check run for this annotation

Codecov / codecov/patch

lib/screens/domains/domain_comment_modal.dart#L27-L31

Added lines #L27 - L31 were not covered by tests
});
});
}
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/domains/domain_details_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class DomainDetailsScreen extends StatelessWidget {
),
);

if (newComment != null && newComment != newDomain!.comment) {
if (newComment != newDomain!.comment) {
if (context.mounted) {
newDomain = newDomain!.copyWith(comment: newComment);
final resp = await apiGateway!.updateDomain(newDomain!);
Expand Down

0 comments on commit 06c9c57

Please sign in to comment.