Skip to content

Commit cb3753e

Browse files
authored
Update fast-search-card.js
1 parent 4c03c6f commit cb3753e

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

dist/fast-search-card.js

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8157,8 +8157,7 @@ class FastSearchCard extends HTMLElement {
81578157
}
81588158
}
81598159

8160-
8161-
createTimerFromMinimalPicker(item, action) {
8160+
async createTimerFromMinimalPicker(item, action) {
81628161
const totalMinutes = (this.timePickerState.selectedHours * 60) + this.timePickerState.selectedMinutes;
81638162

81648163
if (totalMinutes === 0) {
@@ -8168,12 +8167,22 @@ class FastSearchCard extends HTMLElement {
81688167

81698168
console.log(`🎯 Erstelle Timer: ${action} in ${totalMinutes} Minuten`);
81708169

8171-
// Verwende deine bestehende Timer-Erstellung
8172-
this.createActionTimer(item, action, totalMinutes);
8173-
8174-
// Schließe den Picker
8175-
const parentContainer = this.shadowRoot.querySelector('.minimal-time-picker').closest('.shortcuts-tab-content');
8176-
this.closeMinimalTimePicker(parentContainer);
8170+
try {
8171+
// Verwende deine bestehende Timer-Erstellung
8172+
await this.createActionTimer(item, action, totalMinutes);
8173+
8174+
// Schließe den Picker
8175+
const parentContainer = this.shadowRoot.querySelector('.minimal-time-picker').closest('.shortcuts-tab-content');
8176+
this.closeMinimalTimePicker(parentContainer);
8177+
8178+
// Warte kurz und lade dann die Timer-Liste neu
8179+
setTimeout(() => {
8180+
this.loadActiveTimers(item.id);
8181+
}, 500);
8182+
8183+
} catch (error) {
8184+
console.error('❌ Fehler beim Erstellen des Timers:', error);
8185+
}
81778186
}
81788187

81798188
closeMinimalTimePicker(parentContainer) {

0 commit comments

Comments
 (0)