From 0fdf56c0840b68afaf5b665f5a44759ae86e455c Mon Sep 17 00:00:00 2001 From: Julian Mutter Date: Fri, 6 Feb 2026 16:51:54 +0100 Subject: [PATCH] Remove unneeded function --- lib/core/services/storage_service.dart | 44 -------------------------- 1 file changed, 44 deletions(-) diff --git a/lib/core/services/storage_service.dart b/lib/core/services/storage_service.dart index 42271d4..c5dee3f 100644 --- a/lib/core/services/storage_service.dart +++ b/lib/core/services/storage_service.dart @@ -211,50 +211,6 @@ class StorageService { return null; } - /// Reads annotations with metadata for a specific sheet page. - /// - /// Returns [StoredAnnotation] with annotations and lastModified, or null if none exist. - Future readAnnotationsWithMetadata( - String sheetUuid, - int pageNumber, - ) async { - final box = await Hive.openBox(_annotationsBox); - final value = box.get(_annotationKey(sheetUuid, pageNumber)); - - if (value == null) return null; - - // Handle legacy format (plain string) - treat as very old - if (value is String) { - return StoredAnnotation( - annotationsJson: value, - lastModified: DateTime.fromMillisecondsSinceEpoch(0), - ); - } - - if (value is Map) { - return StoredAnnotation.fromMap(value); - } - - return null; - } - - /// Writes annotations for a specific sheet page. - /// - /// Pass null or empty string to delete annotations for that page. - /// Automatically sets lastModified to current time. - Future writeAnnotations( - String sheetUuid, - int pageNumber, - String? annotationsJson, - ) async { - await writeAnnotationsWithMetadata( - sheetUuid, - pageNumber, - annotationsJson, - DateTime.now(), - ); - } - /// Writes annotations with a specific lastModified timestamp. /// /// Used when syncing from server to preserve server's timestamp.