File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -208,6 +208,11 @@ class SettingsBase {
208208 _focus_cb = cb;
209209 }
210210
211+ // обработчик удаления файлов с устройства типа f(Text path)
212+ void onFileRemove (FileCallback cb) {
213+ _remove_cb = cb;
214+ }
215+
211216 // тикер, вызывать в родительском классе
212217 void tick () {
213218#ifndef SETT_NO_DB
@@ -456,6 +461,9 @@ class SettingsBase {
456461 if (granted) {
457462 fs.remove (value.c_str ());
458463 _sendFs (true );
464+ if (_remove_cb) {
465+ _remove_cb (value);
466+ }
459467 return ;
460468 }
461469 break ;
@@ -482,6 +490,7 @@ class SettingsBase {
482490 }
483491
484492 private:
493+ FileCallback _remove_cb = nullptr ;
485494 BuildCallback _build_cb = nullptr ;
486495 UpdateCallback _upd_cb = nullptr ;
487496 FocusCallback _focus_cb = nullptr ;
You can’t perform that action at this time.
0 commit comments