Do not use an anim if pwd_show_time is 0
@@ -286,6 +286,10 @@ void lv_textarea_add_char(lv_obj_t * ta, uint32_t c)
#if LV_USE_ANIMATION
/*Auto hide characters*/
+ if(ext->pwd_show_time == 0) {
+ pwd_char_hider(ta);
+ }
+ else {
lv_anim_path_t path;
lv_anim_path_init(&path);
lv_anim_path_set_cb(&path, lv_anim_path_step);
@@ -299,6 +303,7 @@ void lv_textarea_add_char(lv_obj_t * ta, uint32_t c)
lv_anim_set_path(&a, &path);
lv_anim_set_ready_cb(&a, pwd_char_hider_anim_ready);
lv_anim_start(&a);
+ }
#else
pwd_char_hider(ta);
@@ -364,9 +369,14 @@ void lv_textarea_add_text(lv_obj_t * ta, const char * txt)
#if LV_USE_ANIMATION
/*Auto hide characters*/
+ if(ext->pwd_show_time == 0) {
+ pwd_char_hider(ta);
+ }
+ else {
lv_anim_path_t path;
lv_anim_path_init(&path);
lv_anim_path_set_cb(&path, lv_anim_path_step);
+
lv_anim_t a;
lv_anim_init(&a);
lv_anim_set_var(&a, ta);
@@ -376,6 +386,7 @@ void lv_textarea_add_text(lv_obj_t * ta, const char * txt)
lv_anim_set_path(&a, &path);
lv_anim_set_ready_cb(&a, pwd_char_hider_anim_ready);
lv_anim_start(&a);
+ }
#else
pwd_char_hider(ta);
#endif
@@ -516,6 +527,10 @@ void lv_textarea_set_text(lv_obj_t * ta, const char * txt)
#if LV_USE_ANIMATION
/*Auto hide characters*/
+ if(ext->pwd_show_time == 0) {
+ pwd_char_hider(ta);
+ }
+ else {
lv_anim_path_t path;
lv_anim_path_init(&path);
lv_anim_path_set_cb(&path, lv_anim_path_step);
@@ -529,6 +544,7 @@ void lv_textarea_set_text(lv_obj_t * ta, const char * txt)
lv_anim_set_path(&a, &path);
lv_anim_set_ready_cb(&a, pwd_char_hider_anim_ready);
lv_anim_start(&a);
+ }
#else
pwd_char_hider(ta);
#endif
