In order to make the loading message optional in the run_magic_commit() function, I added a new parameter called show_loading_message to the function's signature. This parameter is set to True if the --no-load flag is not provided.
Inside the function, I added a conditional check to determine whether to show the loading animation. If show_loading_message is True, then a new threading event is created and a separate thread is started to run the animate_loading() function. Otherwise, the loading animation is bypassed.
This change allows the loading message to be disabled when it is not needed, providing a cleaner and more flexible user experience.
In order to make the loading message optional in the
run_magic_commit()
function, I added a new parameter calledshow_loading_message
to the function's signature. This parameter is set toTrue
if the--no-load
flag is not provided.Inside the function, I added a conditional check to determine whether to show the loading animation. If
show_loading_message
isTrue
, then a new threading event is created and a separate thread is started to run theanimate_loading()
function. Otherwise, the loading animation is bypassed.This change allows the loading message to be disabled when it is not needed, providing a cleaner and more flexible user experience.