Thanks for taking this branch over for me while I was EOD! :) Efficient.
Instead of directly comparing timeouts_inactivity (and making adding more timeout types even more complicated), might this be more generic if in the new "else" case we did:
Instead of {}. This way, when a notification happens, the "new_next_power_off > next_power_off" check won't override the inactivity "never" timeout. But inactivity will still be turned off when the screen is manually turned off (as we do a next_power_off = {} when cancelling timers).
And of course the same for the dimmer logic.
Then we can drop all the extra if logic in this branch, I think?
Thanks for taking this branch over for me while I was EOD! :) Efficient.
Instead of directly comparing timeouts_inactivity (and making adding more timeout types even more complicated), might this be more generic if in the new "else" case we did:
else off_alarm- >cancel( ); :Timestamp: :max;
{
power_
next_power_off = mir::time:
}
Instead of {}. This way, when a notification happens, the "new_next_power_off > next_power_off" check won't override the inactivity "never" timeout. But inactivity will still be turned off when the screen is manually turned off (as we do a next_power_off = {} when cancelling timers).
And of course the same for the dimmer logic.
Then we can drop all the extra if logic in this branch, I think?