Skip to content

Commit

Permalink
updating notification issue
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinSchildhorn committed Oct 9, 2024
1 parent 632a9ad commit 0c7c022
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ val uiModule = module {
feedbackDialogFactory = get(),
syncService = get(),
notificationSchedulingService = get(),
notificationService = get(),
feedbackService = get(),
settingsGateway = get(),
)
Expand Down Expand Up @@ -78,6 +79,7 @@ val uiModule = module {
settingsGateway = get(),
feedbackDialogFactory = get(),
feedbackService = get(),
notificationService = get(),
)
}
single { SpeakerListItemViewModel.Factory() }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package co.touchlab.droidcon.viewmodel
import co.touchlab.droidcon.application.gateway.SettingsGateway
import co.touchlab.droidcon.application.service.Notification
import co.touchlab.droidcon.application.service.NotificationSchedulingService
import co.touchlab.droidcon.application.service.NotificationService
import co.touchlab.droidcon.domain.service.FeedbackService
import co.touchlab.droidcon.domain.service.SyncService
import co.touchlab.droidcon.service.DeepLinkNotificationHandler
Expand All @@ -21,6 +22,7 @@ class ApplicationViewModel(
private val feedbackDialogFactory: FeedbackDialogViewModel.Factory,
private val syncService: SyncService,
private val notificationSchedulingService: NotificationSchedulingService,
private val notificationService: NotificationService,
private val feedbackService: FeedbackService,
private val settingsGateway: SettingsGateway,
) : BaseViewModel(), DeepLinkNotificationHandler {
Expand Down Expand Up @@ -88,6 +90,7 @@ class ApplicationViewModel(
session,
submit = { feedback ->
feedbackService.submit(session, feedback)
notificationService.cancel(listOf(session.id))
presentNextFeedback()
},
closeAndDisable = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package co.touchlab.droidcon.viewmodel.session

import co.touchlab.droidcon.application.gateway.SettingsGateway
import co.touchlab.droidcon.application.service.NotificationService
import co.touchlab.droidcon.domain.composite.ScheduleItem
import co.touchlab.droidcon.domain.gateway.SessionGateway
import co.touchlab.droidcon.domain.service.DateTimeService
Expand Down Expand Up @@ -31,6 +32,7 @@ class SessionDetailViewModel(
private val dateTimeService: DateTimeService,
private val parseUrlViewService: ParseUrlViewService,
private val feedbackService: FeedbackService,
private val notificationService: NotificationService,
initialItem: ScheduleItem,
) : BaseViewModel() {

Expand Down Expand Up @@ -126,6 +128,7 @@ class SessionDetailViewModel(
item.session,
submit = { feedback ->
feedbackService.submit(item.session, feedback)
notificationService.cancel(listOf(item.session.id))
presentedFeedback = null
},
closeAndDisable = null,
Expand Down Expand Up @@ -156,6 +159,7 @@ class SessionDetailViewModel(
private val dateTimeService: DateTimeService,
private val parseUrlViewService: ParseUrlViewService,
private val feedbackService: FeedbackService,
private val notificationService: NotificationService,
) {

fun create(
Expand All @@ -170,6 +174,7 @@ class SessionDetailViewModel(
dateTimeService,
parseUrlViewService,
feedbackService,
notificationService,
item,
)
}
Expand Down

0 comments on commit 0c7c022

Please sign in to comment.