A flow/new_file.txt => flow/new_file.txt +73 -0
@@ 0,0 1,73 @@
+(Ctrl+N caught in main)
+ |
+ v
++-------------------------------------------------+
+| main::preloadRendererSendContentForCheckThenNew |
++-------------------------------------------------+
+ |
+ v
++---------------------------------------------+
+| preload::rendererSendContentForCheckThenNew |
++---------------------------------------------+
+ |
+ v
++-----------------------------------------+
+| renderer::preloadContentForCheckThenNew |
++-----------------------------------------+
+ | |
+ | (if content has not changed) | (if content has changed)
+ | |
+ | v
+ | +-------------------------------------------+
+ | | preload::mainPromptSaveDiscardableThenNew | <--------------------------------------------------------------------------+
+ | +-------------------------------------------+ |
+ | | |
+ | v |
+ | +--------------------------------------------------------------------------------+ |
+ | | main::promptSaveDiscardableThenNew | |
+ | +--------------------------------------------------------------------------------+ |
+ | | | | |
+ | | (if select discard or cancel prompt) | (if select save as) | (if select save) |
+ | | | | |
+ | v v v |
+ | +---------------------------------------+ +----------------------------------+ +-------------------------------------+ |
+ | | main::announceFileDiscardedForNewFile | | main::preloadSaveFileThenNewFile | | main::preloadTrySaveFileThenNewFile |---+ (if no file name cached)
+ | +---------------------------------------+ +----------------------------------+ +-------------------------------------+
+ | | | |
+ | | | | (if have a file name cached)
+ | | | |
+ | | v v
+ | | +--------------------------------------------+
+ | | | preload::rendererSendContentForSaveThenNew |
+ | | +--------------------------------------------+
+ | | |
+ | | v
+ | | +---------------------------+
+ | | | preload::writeFileThenNew |
+ | | +---------------------------+
+ | | | |
+ | | | (if successful write) | (if failed write)
+ | | | |
+ | | | v
+ | | | +---------------------------------------------+
+ | | | | preload::mainRePromptSaveDiscardableThenNew |<-----------------+
+ | | | +---------------------------------------------+ |
+ | | | | |
+ | | | v |
+ | | | +--------------------------------------+ |
+ | | | | main::rePromptSaveDiscardableThenNew | |
+ | | | +--------------------------------------+ |
+ | | | | | |
+ | | | | (if select discard) | (if select save as) |
+ | | | | | |
+ | | | | v |
+ | | | | +------------------------------------+ |
+ | | | | | main::preloadReSaveFileThenNewFile |---+ (if failed write)
+ | | | | +------------------------------------+
+ | | | | |
+ | | | | | (if successful write)
+ | | | | |
+ v v v v v
++------------------------------------------------------------------------------------------------------------------------------+
+| preload::newNote |
++------------------------------------------------------------------------------------------------------------------------------+
A flow/open_file.txt => flow/open_file.txt +0 -0
A flow/save_as_file.txt => flow/save_as_file.txt +0 -0
A flow/save_file.txt => flow/save_file.txt +0 -0