aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordam <dam@gudinoff>2024-05-09 23:44:51 +0100
committerdam <dam@gudinoff>2024-05-09 23:44:51 +0100
commit3fd7b092ec6e2fa56603d35768f98b2ceeb9bfcc (patch)
tree01117a29650ebf1c32f2229f40e2adca9c05aca6
parent18cd73bb1830fd49089eb82667ba6ae14606938c (diff)
downloadtask-time-tracker-3fd7b092ec6e2fa56603d35768f98b2ceeb9bfcc.tar.zst
task-time-tracker-3fd7b092ec6e2fa56603d35768f98b2ceeb9bfcc.zip
Added possible solution for active/selected task pointers potential issue.
-rw-r--r--ttt.jai7
1 files changed, 5 insertions, 2 deletions
diff --git a/ttt.jai b/ttt.jai
index 01803b2..08d4bbd 100644
--- a/ttt.jai
+++ b/ttt.jai
@@ -1413,8 +1413,11 @@ main :: () {
update_times(*database);
//timeout(INPUT_AWAIT_INF); TODO DAM
- // TODO WIP Remove `selected_task` and `active_task` and helper functions.
- // TODO Every time we add or remove tasks to the database, it may be reallocated, thus making the selected_task and active_task pointers invalid. Check if this is messing up the app.
+ /* TODO
+ Remove `selected_task` and `active_task` and helper functions.
+ Every time we add or remove tasks to the database, it may be reallocated, thus making the selected_task and active_task pointers invalid. Check if this is messing up the app.
+ Maybe use a macro returns the selected/active task based on the indices.
+ */
selected_task := get_selected_task(db);
active_task := get_active_task(db);
selected_task_row: int;