Sp 1702 fe when we click on edit button for a space and click ok without editing the save button is appearing (#243)

<!--
  Thanks for contributing!

Provide a description of your changes below and a general summary in the
title

Please look at the following checklist to ensure that your PR can be
accepted quickly:
-->

## Jira Ticket
[sp:1702 fix Bug](https://syncrow.atlassian.net/browse/SP-1702)

## Description

fix the issue when nothing edited save button not appears
## Type of Change

<!--- Put an `x` in all the boxes that apply: -->

- [ ]  New feature (non-breaking change which adds functionality)
- [x] 🛠️ Bug fix (non-breaking change which fixes an issue)
- [ ]  Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] 🧹 Code refactor
- [ ]  Build configuration change
- [ ] 📝 Documentation
- [ ] 🗑️ Chore
This commit is contained in:
raf-dev1
2025-06-11 16:58:34 +03:00
committed by GitHub
2 changed files with 18 additions and 0 deletions

View File

@ -171,4 +171,13 @@ extension SpaceExtensions on SpaceModel {
return tagValues;
}
bool isNoChangesSubmited(String name, icon, SpaceTemplateModel? spaceModel,
List<SubspaceModel>? subspaces, List<Tag>? tags) {
return (name == this.name &&
icon == this.icon &&
spaceModel == this.spaceModel &&
subspaces == this.subspaces &&
tags == this.tags);
}
}

View File

@ -384,6 +384,15 @@ class _CommunityStructureAreaState extends State<CommunityStructureArea> {
SpaceTemplateModel? spaceModel,
List<SubspaceModel>? subspaces,
List<Tag>? tags) {
if (widget.selectedSpace!.isNoChangesSubmited(
name,
icon,
spaceModel,
subspaces,
tags,
)) {
return;
}
setState(() {
// Update the space's properties
widget.selectedSpace!.name = name;