Skip to content

Commit

Permalink
Update WordPressWorkersFactory.kt
Browse files Browse the repository at this point in the history
For
- UploadPostWorker
- UploadMediaWorker
  • Loading branch information
ravishanker committed Dec 8, 2023
1 parent 5352cbb commit 8e38e4a
Showing 1 changed file with 23 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
package org.wordpress.android.workers

import androidx.work.DelegatingWorkerFactory
import org.wordpress.android.fluxc.Dispatcher
import org.wordpress.android.fluxc.store.AccountStore
import org.wordpress.android.fluxc.store.MediaStore
import org.wordpress.android.fluxc.store.PostStore
import org.wordpress.android.fluxc.store.SiteStore
import org.wordpress.android.fluxc.store.UploadStore
import org.wordpress.android.support.ZendeskHelper
import org.wordpress.android.ui.notifications.SystemNotificationsTracker
import org.wordpress.android.ui.posts.PostUtilsWrapper
import org.wordpress.android.ui.uploads.UploadPostWorker
import org.wordpress.android.ui.uploads.UploadStarter
import org.wordpress.android.util.UploadWorker
import org.wordpress.android.workers.notification.local.LocalNotificationHandlerFactory
Expand All @@ -26,13 +33,28 @@ class WordPressWorkersFactory @Inject constructor(
weeklyRoundupNotifier: WeeklyRoundupNotifier,
promptReminderNotifier: PromptReminderNotifier,
accountStore: AccountStore,
zendeskHelper: ZendeskHelper
zendeskHelper: ZendeskHelper,
postStore: PostStore,
uploadStore: UploadStore,
mediaStore: MediaStore,
dispatcher: Dispatcher,
systemNotificationsTracker: SystemNotificationsTracker,
postUtilsWrapper: PostUtilsWrapper
) : DelegatingWorkerFactory() {
init {
addFactory(UploadWorker.Factory(uploadStarter, siteStore))
addFactory(LocalNotificationWorker.Factory(localNotificationHandlerFactory))
addFactory(ReminderWorker.Factory(reminderScheduler, reminderNotifier, promptReminderNotifier))
addFactory(WeeklyRoundupWorker.Factory(weeklyRoundupNotifier))
addFactory(GCMRegistrationWorker.Factory(accountStore, zendeskHelper))
addFactory(UploadPostWorker.Factory(
siteStore,
postStore,
uploadStore,
mediaStore,
dispatcher,
systemNotificationsTracker,
postUtilsWrapper
))
}
}

0 comments on commit 8e38e4a

Please sign in to comment.