fix(todo): editing a project keeps its Display
Edit project built the project anew from its name, colour and position, so saving it reset its Display (layout, grouping, sorting, filters) to the first one. It now changes the name and colour of the project as it is. Whats-New: Editing a project no longer resets its Display. Whats-New-De: Ein Projekt zu bearbeiten setzt seine Anzeige nicht mehr zurück. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
33917c6042
commit
b043d5ef9e
1 changed files with 38 additions and 5 deletions
|
|
@ -19,11 +19,13 @@ Future<ProjectContent?> editProject(
|
|||
color: current?.color ?? PaletteColor.cobalt,
|
||||
);
|
||||
return switch (named) {
|
||||
(:final name, :final color) => ProjectContent(
|
||||
name: name,
|
||||
color: color,
|
||||
position: current?.position ?? 0,
|
||||
),
|
||||
// The rest kept as it is: building it anew had reset the project's
|
||||
// Display (the developer's review, 4 Nov 2026).
|
||||
(:final name, :final color) =>
|
||||
(current ?? ProjectContent(name: name)).copyWith(
|
||||
name: name,
|
||||
color: () => color,
|
||||
),
|
||||
null => null,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue