Commit aa0c212
Z User
fix: comprehensive bug audit - 25+ bugs fixed
CRITICAL fixes:
- NoteDao: Added @transaction to getTrashedNotesWithTags & getFavoriteNotesWithTags (Room compile error)
- NoteViewModel: Added _showFavoritesOnly to combine() - favorites feature was broken
- ThemeManager: Fixed light mode - resource name case mismatch (lowercase vs PascalCase)
- MarkdownHelper: Fixed TaskListPlugin.create() - wrong API signature (compilation error)
HIGH fixes:
- NoteRepository: Wrapped setTagsForNote in withTransaction (atomic tag operations)
- NoteRepository: Fixed getOrCreateDailyNote race condition (withTransaction + re-query)
- NoteRepository: Fixed getOrCreateTag race condition (handle -1L from IGNORE)
- NoteRepository: Fixed sanitizeFtsQuery (escape double-quote characters)
- EditorActivity: Fixed performSave() race with finish() - moved inside coroutine
- EditorActivity: Fixed wrong note ID for reminder on new notes
- AndroidManifest: Added SCHEDULE_EXACT_ALARM permission (Android 12+ crash)
- AndroidManifest: Set allowBackup=false (incompatible with EncryptedSharedPreferences)
- ExportImportHelper: Rewrote export to use MediaStore API (scoped storage fix)
MEDIUM fixes:
- ThemeManager.apply() moved before super.onCreate() in all 8 Activities
- MainActivity: Fixed trash observer race (guard + cancel previous Job)
- MainActivity: Fixed redundant if-else in showOptions()
- ReminderReceiver: Replaced Class.forName() with direct class reference
- NoteWidgetProvider: Replaced Class.forName() with direct class reference
- GraphView: Replaced MainScope() with SupervisorJob scope + onDetachedFromWindow cancel
- GraphView: Moved borderPaint out of onDraw() (GC pressure)
- GraphView: Handle zero dimensions before layout
- ProGuard: Removed overly broad -keepclassmembers rule
- CryptoHelper: decrypt() now returns null on failure instead of returning ciphertext
- EditorActivity: Handle null from CryptoHelper.decrypt() gracefully
LOW fixes:
- Extensions: Replaced SimpleDateFormat with java.time (thread-safe since minSdk 26)
- ExportImportHelper: Added tag deduplication on import1 parent de8fd79 commit aa0c212
File tree
26 files changed
+247
-128
lines changed- app
- src/main
- kotlin/com/kitabu/app
- data
- ui
- ai
- editor
- graph
- history
- notes
- reminder
- settings
- tags
- templates
- widget
- util
- res
- drawable
26 files changed
+247
-128
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
12 | | - | |
13 | | - | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| |||
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
| 124 | + | |
123 | 125 | | |
124 | 126 | | |
125 | 127 | | |
| |||
Lines changed: 33 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
69 | 74 | | |
70 | 75 | | |
71 | 76 | | |
72 | 77 | | |
73 | 78 | | |
74 | 79 | | |
75 | | - | |
76 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
77 | 84 | | |
78 | 85 | | |
79 | 86 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
84 | 99 | | |
85 | 100 | | |
86 | 101 | | |
| |||
116 | 131 | | |
117 | 132 | | |
118 | 133 | | |
| 134 | + | |
119 | 135 | | |
120 | 136 | | |
121 | | - | |
| 137 | + | |
122 | 138 | | |
123 | 139 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | 41 | | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
Lines changed: 15 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | 39 | | |
42 | 40 | | |
43 | 41 | | |
| |||
74 | 72 | | |
75 | 73 | | |
76 | 74 | | |
77 | | - | |
78 | 75 | | |
| 76 | + | |
79 | 77 | | |
80 | 78 | | |
81 | 79 | | |
| |||
129 | 127 | | |
130 | 128 | | |
131 | 129 | | |
132 | | - | |
| 130 | + | |
133 | 131 | | |
134 | 132 | | |
135 | 133 | | |
| |||
657 | 655 | | |
658 | 656 | | |
659 | 657 | | |
660 | | - | |
661 | | - | |
| 658 | + | |
| 659 | + | |
662 | 660 | | |
663 | | - | |
664 | 661 | | |
665 | | - | |
666 | | - | |
667 | | - | |
668 | | - | |
669 | | - | |
670 | | - | |
| 662 | + | |
| 663 | + | |
671 | 664 | | |
672 | 665 | | |
673 | 666 | | |
674 | 667 | | |
675 | 668 | | |
676 | 669 | | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
677 | 675 | | |
678 | 676 | | |
679 | 677 | | |
| |||
711 | 709 | | |
712 | 710 | | |
713 | 711 | | |
714 | | - | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
715 | 715 | | |
716 | 716 | | |
| 717 | + | |
717 | 718 | | |
718 | | - | |
719 | 719 | | |
720 | 720 | | |
721 | 721 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
63 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
64 | 71 | | |
65 | 72 | | |
66 | 73 | | |
| |||
69 | 76 | | |
70 | 77 | | |
71 | 78 | | |
72 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
73 | 93 | | |
74 | 94 | | |
75 | 95 | | |
| |||
83 | 103 | | |
84 | 104 | | |
85 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
86 | 111 | | |
87 | 112 | | |
88 | 113 | | |
| |||
143 | 168 | | |
144 | 169 | | |
145 | 170 | | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | 171 | | |
152 | 172 | | |
153 | 173 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | 26 | | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
0 commit comments