Apply dolphin customizations without reboot

This commit is contained in:
Willy-JL
2024-08-07 21:26:41 +02:00
parent d4ceb95b28
commit 06cb63f4bf
6 changed files with 20 additions and 4 deletions

View File

@@ -85,6 +85,15 @@ FuriPubSub* dolphin_get_pubsub(Dolphin* dolphin) {
return dolphin->pubsub;
}
void dolphin_reload_state(Dolphin* dolphin) {
furi_check(dolphin);
DolphinEvent event;
event.type = DolphinEventTypeReloadState;
dolphin_event_send_wait(dolphin, &event);
}
// Private functions
static void dolphin_butthurt_timer_callback(void* context) {
@@ -228,6 +237,7 @@ static bool dolphin_process_event(FuriMessageQueue* queue, void* context) {
!dolphin_state_xp_to_levelup(dolphin->state->data.icounter);
} else if(event.type == DolphinEventTypeFlush) {
dolphin_flush_timer_callback(dolphin);
furi_event_loop_timer_start(dolphin->flush_timer, FLUSH_TIMEOUT_TICKS);
} else if(event.type == DolphinEventTypeLevel) {