@@ -165,7 +165,6 @@ pub struct AssignNoteNotebookInput {
165165pub fn bootstrap ( app : & AppHandle ) -> Result < BootstrapPayload , AppError > {
166166 let conn = database_connection ( app) ?;
167167 let npub = nostr:: ensure_identity ( & conn) ?;
168- seed_welcome_note_if_empty ( & conn) ?;
169168
170169 let notebooks = list_notebooks ( & conn) ?;
171170 let selected_note_id = last_open_note_id ( & conn) ?
@@ -1002,45 +1001,6 @@ fn note_is_active(conn: &Connection, note_id: &str) -> Result<bool, AppError> {
10021001 . map ( |value| value. unwrap_or ( false ) )
10031002}
10041003
1005- fn seed_welcome_note_if_empty ( conn : & Connection ) -> Result < ( ) , AppError > {
1006- let note_count = conn
1007- . query_row ( "SELECT COUNT(*) FROM notes" , [ ] , |row| row. get :: < _ , i64 > ( 0 ) ) ?;
1008-
1009- if note_count > 0 {
1010- return Ok ( ( ) ) ;
1011- }
1012-
1013- let markdown = r#"# Leave a trail
1014-
1015- Welcome to comet.
1016-
1017- Comet stores note content locally in its own database, with markdown as the underlying format.
1018-
1019- ## Start here
1020-
1021- - Create a note
1022- - Edit it freely
1023- - Come back later and pick up the thread
1024- - Publish when the note is ready
1025- "# ;
1026-
1027- let transaction = conn
1028- . unchecked_transaction ( ) ?;
1029- let now = now_millis ( ) ;
1030- let title = title_from_markdown ( markdown) ;
1031-
1032- transaction
1033- . execute (
1034- "INSERT INTO notes (id, title, markdown, notebook_id, created_at, modified_at, edited_at)
1035- VALUES (?1, ?2, ?3, NULL, ?4, ?4, ?4)" ,
1036- params ! [ "welcome" , title, markdown, now] ,
1037- ) ?;
1038- upsert_note_search_document ( & transaction, "welcome" , & title, markdown) ?;
1039- replace_note_tags ( & transaction, "welcome" , markdown) ?;
1040- transaction. commit ( ) ?;
1041-
1042- Ok ( ( ) )
1043- }
10441004
10451005fn list_notebooks ( conn : & Connection ) -> Result < Vec < NotebookSummary > , AppError > {
10461006 let mut statement = conn
0 commit comments