File tree Expand file tree Collapse file tree 3 files changed +9
-12
lines changed Expand file tree Collapse file tree 3 files changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -1527,17 +1527,6 @@ class NoteEditorProvider with ChangeNotifier implements NoteEditorViewModel {
15271527 }
15281528 }
15291529
1530- @override
1531- void updateBlockCache (List <Block > blocks) {
1532- for (final block in blocks) {
1533- // Only update if this block belongs to an active note
1534- if (_noteId == block.noteId || _activeNoteIds.contains (block.noteId)) {
1535- _blocks[block.id] = block;
1536- _documentBuilder.registerServerBlock (block);
1537- }
1538- }
1539- }
1540-
15411530 @override
15421531 void commitAllContent () {
15431532 _logger.debug ('Committing content for all blocks' );
Original file line number Diff line number Diff line change @@ -361,6 +361,15 @@ class _NoteEditorScreenState extends State<NoteEditorScreen> {
361361 title: '' , // Empty title as we have our own title field
362362 showBackButton: false , // No back button in app bar
363363 actions: [
364+ IconButton (
365+ icon: const Icon (Icons .refresh_outlined),
366+ tooltip: 'Refresh note content' ,
367+ onPressed: () => _noteEditorViewModel.updateBlocks (
368+ _noteEditorViewModel.blocks,
369+ preserveFocus: true ,
370+ markAsModified: false ,
371+ ),
372+ ),
364373 IconButton (
365374 icon: const Icon (Icons .upload_file),
366375 tooltip: 'Import Markdown' ,
Original file line number Diff line number Diff line change @@ -70,7 +70,6 @@ abstract class NoteEditorViewModel extends BaseViewModel {
7070 Map <String , dynamic > getPaginationInfo (String noteId);
7171
7272 // Server sync and events
73- void updateBlockCache (List <Block > blocks);
7473 void commitAllContent ();
7574 Future <void > fetchBlockFromEvent (String blockId);
7675
You can’t perform that action at this time.
0 commit comments