Search in sources :

Example 1 with MedicineIntakeChangeNotifier

use of m.co.rh.id.a_medic_log.app.provider.notifier.MedicineIntakeChangeNotifier in project a-medic-log by rh-id.

the class AppProviderModule method provides.

@Override
public void provides(Context context, ProviderRegistry providerRegistry, Provider provider) {
    providerRegistry.registerModule(new BaseProviderModule());
    providerRegistry.registerModule(new DatabaseProviderModule());
    providerRegistry.registerModule(new CommandProviderModule());
    providerRegistry.registerAsync(WorkManager.class, () -> WorkManager.getInstance(context));
    providerRegistry.registerAsync(AppSharedPreferences.class, () -> new AppSharedPreferences(context, provider));
    providerRegistry.registerAsync(ProfileChangeNotifier.class, ProfileChangeNotifier::new);
    providerRegistry.registerAsync(NoteChangeNotifier.class, NoteChangeNotifier::new);
    providerRegistry.registerAsync(NoteTagChangeNotifier.class, NoteTagChangeNotifier::new);
    providerRegistry.registerAsync(MedicineChangeNotifier.class, MedicineChangeNotifier::new);
    providerRegistry.registerAsync(MedicineReminderChangeNotifier.class, MedicineReminderChangeNotifier::new);
    providerRegistry.registerAsync(MedicineIntakeChangeNotifier.class, MedicineIntakeChangeNotifier::new);
    providerRegistry.registerAsync(NoteAttachmentFileChangeNotifier.class, NoteAttachmentFileChangeNotifier::new);
    providerRegistry.registerAsync(FileCleanUpTask.class, () -> new FileCleanUpTask(provider));
    providerRegistry.registerLazy(AppNotificationHandler.class, () -> new AppNotificationHandler(context, provider));
    providerRegistry.registerPool(StatefulViewProvider.class, () -> new StatefulViewProvider(provider));
    providerRegistry.registerAsync(MedicineReminderEventHandler.class, () -> new MedicineReminderEventHandler(provider));
    // it is safer to register navigator last in case it needs dependency from all above, provider can be passed here
    providerRegistry.register(NavExtDialogConfig.class, new NavExtDialogConfig(context));
    providerRegistry.register(INavigator.class, getNavigator(provider));
}
Also used : MedicineReminderEventHandler(m.co.rh.id.a_medic_log.app.provider.component.MedicineReminderEventHandler) NoteAttachmentFileChangeNotifier(m.co.rh.id.a_medic_log.app.provider.notifier.NoteAttachmentFileChangeNotifier) FileCleanUpTask(m.co.rh.id.a_medic_log.app.provider.component.FileCleanUpTask) NoteChangeNotifier(m.co.rh.id.a_medic_log.app.provider.notifier.NoteChangeNotifier) AppNotificationHandler(m.co.rh.id.a_medic_log.app.provider.component.AppNotificationHandler) NoteTagChangeNotifier(m.co.rh.id.a_medic_log.app.provider.notifier.NoteTagChangeNotifier) MedicineChangeNotifier(m.co.rh.id.a_medic_log.app.provider.notifier.MedicineChangeNotifier) MedicineIntakeChangeNotifier(m.co.rh.id.a_medic_log.app.provider.notifier.MedicineIntakeChangeNotifier) DatabaseProviderModule(m.co.rh.id.a_medic_log.base.provider.DatabaseProviderModule) NavExtDialogConfig(m.co.rh.id.anavigator.extension.dialog.ui.NavExtDialogConfig) AppSharedPreferences(m.co.rh.id.a_medic_log.app.provider.component.AppSharedPreferences) ProfileChangeNotifier(m.co.rh.id.a_medic_log.app.provider.notifier.ProfileChangeNotifier) MedicineReminderChangeNotifier(m.co.rh.id.a_medic_log.app.provider.notifier.MedicineReminderChangeNotifier) BaseProviderModule(m.co.rh.id.a_medic_log.base.provider.BaseProviderModule)

Aggregations

AppNotificationHandler (m.co.rh.id.a_medic_log.app.provider.component.AppNotificationHandler)1 AppSharedPreferences (m.co.rh.id.a_medic_log.app.provider.component.AppSharedPreferences)1 FileCleanUpTask (m.co.rh.id.a_medic_log.app.provider.component.FileCleanUpTask)1 MedicineReminderEventHandler (m.co.rh.id.a_medic_log.app.provider.component.MedicineReminderEventHandler)1 MedicineChangeNotifier (m.co.rh.id.a_medic_log.app.provider.notifier.MedicineChangeNotifier)1 MedicineIntakeChangeNotifier (m.co.rh.id.a_medic_log.app.provider.notifier.MedicineIntakeChangeNotifier)1 MedicineReminderChangeNotifier (m.co.rh.id.a_medic_log.app.provider.notifier.MedicineReminderChangeNotifier)1 NoteAttachmentFileChangeNotifier (m.co.rh.id.a_medic_log.app.provider.notifier.NoteAttachmentFileChangeNotifier)1 NoteChangeNotifier (m.co.rh.id.a_medic_log.app.provider.notifier.NoteChangeNotifier)1 NoteTagChangeNotifier (m.co.rh.id.a_medic_log.app.provider.notifier.NoteTagChangeNotifier)1 ProfileChangeNotifier (m.co.rh.id.a_medic_log.app.provider.notifier.ProfileChangeNotifier)1 BaseProviderModule (m.co.rh.id.a_medic_log.base.provider.BaseProviderModule)1 DatabaseProviderModule (m.co.rh.id.a_medic_log.base.provider.DatabaseProviderModule)1 NavExtDialogConfig (m.co.rh.id.anavigator.extension.dialog.ui.NavExtDialogConfig)1