¬this is getting annoying

This commit is contained in:
2025-06-08 23:48:24 +02:00
parent 62cede83e7
commit a26ca8ab46
4 changed files with 11 additions and 9 deletions

View File

@@ -2457,11 +2457,12 @@ void update_sync_status(NCursesDiffViewer *viewer) {
viewer->spinner_frame++;
if (viewer->spinner_frame > 100)
viewer->spinner_frame = 0; // Reset to prevent overflow
// Handle branch-specific animations (only for completed states)
if (viewer->branch_push_status != SYNC_STATUS_IDLE || viewer->branch_pull_status != SYNC_STATUS_IDLE) {
// Handle branch-specific animations (only for completed states)
if (viewer->branch_push_status != SYNC_STATUS_IDLE ||
viewer->branch_pull_status != SYNC_STATUS_IDLE) {
viewer->branch_animation_frame++;
// Handle push animations (only "Pushed!" phase)
if (viewer->branch_push_status >= SYNC_STATUS_PUSHED_APPEARING &&
viewer->branch_push_status <= SYNC_STATUS_PUSHED_DISAPPEARING) {
@@ -2478,7 +2479,8 @@ void update_sync_status(NCursesDiffViewer *viewer) {
viewer->branch_animation_frame = 0;
viewer->branch_text_char_count = 7;
}
} else if (viewer->branch_push_status == SYNC_STATUS_PUSHED_DISAPPEARING) {
} else if (viewer->branch_push_status ==
SYNC_STATUS_PUSHED_DISAPPEARING) {
int chars_to_remove = viewer->branch_animation_frame;
viewer->branch_text_char_count = 7 - chars_to_remove;
if (viewer->branch_text_char_count <= 0) {
@@ -2488,7 +2490,7 @@ void update_sync_status(NCursesDiffViewer *viewer) {
}
}
}
// Handle pull animations (only "Pulled!" phase)
if (viewer->branch_pull_status >= SYNC_STATUS_PULLED_APPEARING &&
viewer->branch_pull_status <= SYNC_STATUS_PULLED_DISAPPEARING) {
@@ -2505,7 +2507,8 @@ void update_sync_status(NCursesDiffViewer *viewer) {
viewer->branch_animation_frame = 0;
viewer->branch_text_char_count = 7;
}
} else if (viewer->branch_pull_status == SYNC_STATUS_PULLED_DISAPPEARING) {
} else if (viewer->branch_pull_status ==
SYNC_STATUS_PULLED_DISAPPEARING) {
int chars_to_remove = viewer->branch_animation_frame / 2;
viewer->branch_text_char_count = 7 - chars_to_remove;
if (viewer->branch_text_char_count <= 0) {
@@ -2516,7 +2519,6 @@ void update_sync_status(NCursesDiffViewer *viewer) {
}
}
}
}
/**
@@ -3227,7 +3229,7 @@ int handle_ncurses_diff_input(NCursesDiffViewer *viewer, int key) {
if (result == 0) {
// Reset branch animation completely
viewer->branch_pull_status = SYNC_STATUS_IDLE;
viewer->branch_pull_status = SYNC_STATUS_PULLED_APPEARING;
viewer->branch_animation_frame = 0;
viewer->branch_text_char_count = 0;

Binary file not shown.

BIN
shell

Binary file not shown.

BIN
weather.o

Binary file not shown.