Skip to content

Commit

Permalink
Refactor: Remove alarm cancellation from TopAppBar
Browse files Browse the repository at this point in the history
Removed the alarm cancellation logic from the TopAppBar's delete action.
Previously, it was calling `
notificationModel.scheduleNotification` with `onReset = true` to cancel the alarm. This logic is now removed and replaced with a to-do comment indicating the need to implement the cancellation functionality elsewhere.

This change likely moves the responsibility of alarm management to a more appropriate location within the application.
  • Loading branch information
youndon committed Nov 17, 2024
1 parent bf5a900 commit 1b795f1
Showing 1 changed file with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import city.zouitel.logic.events.UiEvent
import city.zouitel.logic.sharNote
import city.zouitel.note.model.Data
import city.zouitel.note.ui.DataScreenModel
import city.zouitel.notifications.viewmodel.NotificationScreenModel
import city.zouitel.screens.main_screen.MainScreenModel
import city.zouitel.screens.utils.sound
import city.zouitel.systemDesign.CommonConstants
Expand Down Expand Up @@ -92,7 +91,6 @@ internal fun HomeSelectionTopAppBar(
datastoreModel: DataStoreScreenModel,
mainModel: MainScreenModel,
dataModel: DataScreenModel,
notificationModel: NotificationScreenModel,
noteAndTagModel: NoteAndTagScreenModel,
tagModel: TagScreenModel,
taskModel: TaskScreenModel,
Expand Down Expand Up @@ -143,15 +141,7 @@ internal fun HomeSelectionTopAppBar(
)
)

// to cancel the alarm manager reminder.
notificationModel.scheduleNotification(
context = context,
dateTime = it.reminding,
title = it.title,
message = it.description,
uid = it.uid,
onReset = true
)
// to.do cancel the alarm manager reminder.
undo.invoke(it)
}
mainModel.clearSelectionNotes()
Expand Down

0 comments on commit 1b795f1

Please sign in to comment.