File tree Expand file tree Collapse file tree 4 files changed +7
-26
lines changed
Expand file tree Collapse file tree 4 files changed +7
-26
lines changed Original file line number Diff line number Diff line change @@ -183,8 +183,7 @@ namespace Notejot {
183183
184184 tview_model. repository. save. begin ();
185185
186- this . dispose ();
187- return true ;
186+ return base . close_request ();
188187 }
189188
190189 // IO?
Original file line number Diff line number Diff line change @@ -104,13 +104,7 @@ public class Notejot.NoteViewModel : Object {
104104 }
105105
106106 void save_notes () {
107- if (timeout_id != 0 ) {
108- Source . remove (timeout_id);
109- }
110- timeout_id = Timeout . add (500 , () = > {
111- timeout_id = 0 ;
112- repository. save. begin ();
113- return Source . REMOVE ;
114- });
107+ timeout_id = 0 ;
108+ repository. save. begin ();
115109 }
116110}
Original file line number Diff line number Diff line change @@ -54,13 +54,7 @@ public class Notejot.NotebookViewModel : Object {
5454 }
5555
5656 void save_notebooks () {
57- if (timeout_id != 0 )
58- Source . remove (timeout_id);
59-
60- timeout_id = Timeout . add (500 , () = > {
61- timeout_id = 0 ;
62- repository. save. begin ();
63- return Source . REMOVE ;
64- });
57+ timeout_id = 0 ;
58+ repository. save. begin ();
6559 }
6660}
Original file line number Diff line number Diff line change @@ -107,13 +107,7 @@ public class Notejot.TrashViewModel : Object {
107107 }
108108
109109 void save_trashs () {
110- if (timeout_id != 0 )
111- Source . remove (timeout_id);
112-
113- timeout_id = Timeout . add (500 , () = > {
114- timeout_id = 0 ;
115- repository. save. begin ();
116- return Source . REMOVE ;
117- });
110+ timeout_id = 0 ;
111+ repository. save. begin ();
118112 }
119113}
You can’t perform that action at this time.
0 commit comments