Finalize switch from composerName to composer in Sheet model

This commit is contained in:
2026-02-06 16:51:29 +01:00
parent 8f05e9244a
commit a57831f50b
4 changed files with 6 additions and 8 deletions

View File

@@ -100,7 +100,7 @@ class ChangeQueue {
case ChangeType.sheetNameChange:
sheet.name = change.value;
case ChangeType.composerNameChange:
sheet.composerName = change.value;
sheet.composer = change.value;
case ChangeType.addTagChange:
throw UnimplementedError('Tag support not yet implemented');
case ChangeType.removeTagChange:

View File

@@ -21,7 +21,7 @@ class SheetListItem extends StatelessWidget {
Widget build(BuildContext context) {
return ListTile(
title: Text(sheet.name),
subtitle: Text(sheet.composerName),
subtitle: Text(sheet.composer),
onTap: onTap,
onLongPress: onLongPress,
);

View File

@@ -80,7 +80,7 @@ class _SheetsListState extends State<SheetsList> {
setState(() {
_filteredSheets = widget.sheets.where((sheet) {
final name = sheet.name.toLowerCase();
final composer = sheet.composerName.toLowerCase();
final composer = sheet.composer.toLowerCase();
// Each term must appear in either name or composer
return terms.every(
@@ -122,7 +122,7 @@ class _SheetsListState extends State<SheetsList> {
),
);
}
if (newComposer != sheet.composerName) {
if (newComposer != sheet.composer) {
widget.syncService.queueChange(
Change(
type: ChangeType.composerNameChange,
@@ -135,7 +135,7 @@ class _SheetsListState extends State<SheetsList> {
// Update local state
setState(() {
sheet.name = newName;
sheet.composerName = newComposer;
sheet.composer = newComposer;
});
// Update cached sheets

View File

@@ -29,9 +29,7 @@ class _EditSheetBottomSheetState extends State<EditSheetBottomSheet> {
void initState() {
super.initState();
_nameController = TextEditingController(text: widget.sheet.name);
_composerController = TextEditingController(
text: widget.sheet.composerName,
);
_composerController = TextEditingController(text: widget.sheet.composer);
}
@override