Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/flipperzero-firmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorあく <alleteam@gmail.com>2021-02-10 12:06:29 +0300
committerGitHub <noreply@github.com>2021-02-10 12:06:29 +0300
commit2d09b8e3181b80d6401605900977cc320e51d312 (patch)
tree5eeb569e70d8745caecf263fd5fa58f303029b6d /applications/dolphin
parent928bca4eaaaf69edf4c1c18668ccf3a3134caa4b (diff)
[FL-867] GUI: ViewPort arrangement API, better input and draw dispatching (#333)
* Input: refactoring, platform agnostic key configuration, update usage across project. Minor queue usage fixes and tick timings. * Gui: lighter and more efficient input and draw call dispatching, ViewPort rearranging API. View: conditional model updates, API usage update. * BT: smaller update delay * GUI: ViewPort visibility check
Diffstat (limited to 'applications/dolphin')
-rw-r--r--applications/dolphin/dolphin.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/applications/dolphin/dolphin.c b/applications/dolphin/dolphin.c
index ec52f931..9a89f4ed 100644
--- a/applications/dolphin/dolphin.c
+++ b/applications/dolphin/dolphin.c
@@ -9,12 +9,15 @@ bool dolphin_view_first_start_input(InputEvent* event, void* context) {
with_view_model(
dolphin->idle_view_first_start, (DolphinViewFirstStartModel * model) {
if(model->page > 0) model->page--;
+ return true;
});
} else if(event->key == InputKeyRight) {
uint32_t page;
with_view_model(
- dolphin->idle_view_first_start,
- (DolphinViewFirstStartModel * model) { page = ++model->page; });
+ dolphin->idle_view_first_start, (DolphinViewFirstStartModel * model) {
+ page = ++model->page;
+ return true;
+ });
if(page > 8) {
dolphin_save(dolphin);
view_dispatcher_switch_to_view(dolphin->idle_view_dispatcher, DolphinViewIdleMain);
@@ -140,6 +143,7 @@ void dolphin_task() {
dolphin->idle_view_stats, (DolphinViewIdleStatsModel * model) {
model->icounter = dolphin_state_get_icounter(dolphin->state);
model->butthurt = dolphin_state_get_butthurt(dolphin->state);
+ return true;
});
furi_record_create("dolphin", dolphin);
@@ -153,6 +157,7 @@ void dolphin_task() {
dolphin->idle_view_stats, (DolphinViewIdleStatsModel * model) {
model->icounter = dolphin_state_get_icounter(dolphin->state);
model->butthurt = dolphin_state_get_butthurt(dolphin->state);
+ return true;
});
} else if(event.type == DolphinEventTypeSave) {
dolphin_state_save(dolphin->state);