I have always wished there was a widget to show appointments and tasks together:
I began the process of editing Co0kieAppointments.lua
which is the 5146EC01_manila
file after it is "cooked" in the kitchen. It took updates to the CHT_DataLoaders.lua
and the Co0kieAppointments.lua
to get these features:
My goal is appointments and tasks in one widget that are sorted and mixed together so you may see a task then a couple appointments and then some more tasks based on their date.
I still want to be able tap a task or an appointment to open the task/appointment or task/appointment program depending on your settings.
I also wanted the long press on task features.
I think it would be nice to add features like color.
Tasks that are active and appointments due today will be the active color
Tasks overdue and appointments that are active will be the overdue color.
I set it to sort and show both tasks and appointments within each day having its tasks and then its appointments.
If you tap the date you get a pop up to select refresh, calendar, appointments or tasks so you can create new tasks or appointments. The "New appointment" version pops up a choice for refresh, calendar, appointments or tasks. I could not find and "[[IDS_New]]" to use instead of the "[[IDS_NEW_ENTRY_HEADER]]" so it says "New Appointment".
You can long press a task and get the pop up to "delete" or "complete" it.
I have done my best to get it to refresh on its own more quickly to catch task changes, etc. I think I can force a full update every minute, but do not know if this will eat battery life. It seems like it takes less than 10 seconds to update the list.
I can add a task by selecting the date and then tasks which opens sensetask in a new task. I save it and quit sensetask. In less than 10 seconds the new task shows up. I can long press a task and select complete and it changes color immediately. If I press delete it is gone in less than 10 seconds.
I sometimes get a hiccup where there is strange things in the list, but they clear up after a couple seconds.
There were some glitches to work through:
You must set the max task count to 99.
It appears the program that gathers the task data uses this limit for how many to gather.
This is different than the max count for appointments.
With appointments you get them all and filter them and then you limit the filtered list to the max count.
I also changed multi-day all-day appointments to show up a little differently if you have do not show multi-day appointments selected.
It sorts them by their start date so it will show up sooner in the list than the due date.
Just added the completed color to the tasks for completed tasks.
Appointments due today now have "Today:" before the time because it seemed to look strange to me without it.
Tasks have the word "Tasks|" at the beginning to show them up as a task better. Tasks without a start date show their due date instead.
My preferred user experience is to set the following in CHTEditor widget settings for appointments and tasks:
Enable scrolling on
Appointment range of 7 days
Max appointments of 20
open in editor is on
Don't repeat multi-day is on
I hide call history since I use the free link for it
I hide voicemail since I use the free link for it
Task range of 7 days
Maximum task count is set to 99
Show complete is on
Show both dates is on
Long press pop up is on (brings up the complete or delete menu)
Sort by start date (this will show all tasks that start in the task day range and if it does not have a start date it still shows if its due date is in the task day range too; all tasks that start or are due before today also show up.)
I made some more tweaks to the files. I have tasks without start and due dates added to the list with today's date, but highlighted as overdue. I changed the way tasks look for different due times like today, tomorrow, etc. I got rid of "Due" to get as few English only text values as possible.
I noticed if you set it to "Hide" in the original code you would not see any appointments at all. I changed it so "Hide" only hides the icon, "Show" always shows the icon and "Auto" only shows the icon if you happen to have no appointments. This is similar to how show-hide-auto works for call history and voice mail.
Added menu to Date and New Appointment items so when you press them a menu shows letting you pick:
1) Refresh - instead of using the separate free link
2) Calendar - to go to the calendar tab
3) Appointments- to go to the appointment program
4) New Appointment - to create a new appointment
5) Tasks - to go to the task program
6) New Task - to create a new task
Reduced some redundant code and took out some code that does not seem to have an effect.
Help force a refresh when you choose refresh.
Main thing is fixing the restart of CHT when you have no tasks.
One thing I have noticed in the code is the way complete and delete is set up you can only do one at a time and have to wait for the refresh before you can do another one. One thing I did to avoid confusion is change text to "Complete. . ." or "Delete. . ." before running the code that changes the task to completed or deleted. When it disappears you know you can complete or delete another one.
Added the ability for Voicemail and missed calls to show when you first start the widget like after a restart or reset.
Worked on the refresh code, etc.
While doing this I worked on the code for task refresh especially after selecting "complete" or "delete" in the popup menu.
I added a feature of the task text changes to "Deleting. . ." so you know it has started to delete the task.
I discovered you cannot select another task to delete or complete while the code is refreshing the data of the previous delete or complete.
Maybe I'll look into this later.
Tweaked so if a multiday appointment starts today or tomorrow it shows "Today" or "Tomorrow" instead of the date.
Tweaked so if a multiday appointment ends today or tomorrow it shows "Today" or "Tomorrow" instead of the date.
If they start before today they show the date it started, but skips the start time since it is past already.
Tweaked the font scale adjustments to work better.
Added time to multiday appointments that are not all day appointments.
Added code to adjust font so all the appointment time text should show.
For all updated files I strongly suggest you copy your originals from the \windows folder as a back up. Then copy these to the \windows folder. Then restart Sense.
You can combine this tweak with the CHT_DataLoader tweak.