Skip to content

Commit 593b621

Browse files
committed
save enum directly alongside string - in the future drop string
1 parent fdc84d2 commit 593b621

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/Objects/NoteData.vala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ public class Jorts.NoteData : Object {
9292
builder.add_string_value (theme.to_string ());
9393
builder.set_member_name ("content");
9494
builder.add_string_value (content);
95+
96+
//TODO: save Color alongside theme for awhile. Later we can load it instead and drop string methods
97+
builder.set_member_name ("color");
98+
builder.add_int_value (theme);
99+
95100
builder.set_member_name ("monospace");
96101
builder.add_boolean_value (monospace);
97102
builder.set_member_name ("zoom");

src/Objects/Themes.vala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ public enum Jorts.Themes {
7474
/**
7575
* recover Enum from a stored string, using when loading from storage
7676
*/
77+
//TODO: Retire this one day
7778
public static Themes from_string (string wtf_is_this) {
7879
switch (wtf_is_this.ascii_up ()) {
7980
case "BLUEBERRY": return BLUEBERRY;

0 commit comments

Comments
 (0)