From 7479c7f401a6c9c1cfe0901cfebef4653e61b6cc Mon Sep 17 00:00:00 2001 From: MM20 <15646950+MM2-0@users.noreply.github.com> Date: Wed, 31 Jul 2024 16:56:43 +0200 Subject: [PATCH] Add calendar plugins --- .idea/inspectionProfiles/Project_Default.xml | 2 +- .../mm20/launcher2/ui/common/FavoritesVM.kt | 4 +- .../launcher2/ui/launcher/search/SearchVM.kt | 6 +- .../launcher/search/calendar/CalendarItem.kt | 146 +++++++--- .../launcher/sheets/ConfigureWidgetSheet.kt | 34 +-- .../widgets/calendar/CalendarWidgetVM.kt | 16 +- .../launcher2/ui/settings/SettingsActivity.kt | 4 + .../CalendarSearchSettingsScreen.kt | 91 ++++++ .../CalendarSearchSettingsScreenVM.kt | 34 +++ .../filesearch/FileSearchSettingsScreen.kt | 3 +- .../locations/LocationsSettingsScreen.kt | 4 +- .../settings/plugins/PluginSettingsScreen.kt | 3 + .../settings/search/SearchSettingsScreen.kt | 21 +- .../settings/search/SearchSettingsScreenVM.kt | 13 - .../WeatherIntegrationSettingsScreen.kt | 3 +- .../mm20/launcher2/plugin/QueryPluginApi.kt | 2 +- .../de/mm20/launcher2/search/CalendarEvent.kt | 9 +- core/i18n/src/main/res/values/strings.xml | 1 + .../preferences/LauncherSettingsData.kt | 2 + .../search/CalendarSearchSettings.kt | 17 +- .../contracts/CalendarPluginContract.kt | 40 ++- .../search/calendar/CalendarQuery.kt | 11 + data/calendar/build.gradle.kts | 1 + .../launcher2/calendar/CalendarRepository.kt | 269 ++++++++---------- .../calendar/CalendarSerialization.kt | 189 +++++++----- .../java/de/mm20/launcher2/calendar/Module.kt | 7 +- .../{ => providers}/AndroidCalendarEvent.kt | 17 +- .../providers/AndroidCalendarProvider.kt | 218 ++++++++++++++ .../calendar/providers/CalendarProvider.kt | 18 ++ .../calendar/providers/PluginCalendarEvent.kt | 65 +++++ .../providers/PluginCalendarProvider.kt | 186 ++++++++++++ .../providers/PluginLocationProvider.kt | 1 + .../mm20/launcher2/widgets/CalendarWidget.kt | 13 +- .../launcher2/sdk/calendar/CalendarEvent.kt | 41 +++ .../launcher2/sdk/calendar/CalendarList.kt | 8 + .../sdk/calendar/CalendarProvider.kt | 110 +++++++ 36 files changed, 1259 insertions(+), 350 deletions(-) create mode 100644 app/ui/src/main/java/de/mm20/launcher2/ui/settings/calendarsearch/CalendarSearchSettingsScreen.kt create mode 100644 app/ui/src/main/java/de/mm20/launcher2/ui/settings/calendarsearch/CalendarSearchSettingsScreenVM.kt create mode 100644 core/shared/src/main/java/de/mm20/launcher2/search/calendar/CalendarQuery.kt rename data/calendar/src/main/java/de/mm20/launcher2/calendar/{ => providers}/AndroidCalendarEvent.kt (85%) create mode 100644 data/calendar/src/main/java/de/mm20/launcher2/calendar/providers/AndroidCalendarProvider.kt create mode 100644 data/calendar/src/main/java/de/mm20/launcher2/calendar/providers/CalendarProvider.kt create mode 100644 data/calendar/src/main/java/de/mm20/launcher2/calendar/providers/PluginCalendarEvent.kt create mode 100644 data/calendar/src/main/java/de/mm20/launcher2/calendar/providers/PluginCalendarProvider.kt create mode 100644 plugins/sdk/src/main/java/de/mm20/launcher2/sdk/calendar/CalendarEvent.kt create mode 100644 plugins/sdk/src/main/java/de/mm20/launcher2/sdk/calendar/CalendarList.kt create mode 100644 plugins/sdk/src/main/java/de/mm20/launcher2/sdk/calendar/CalendarProvider.kt diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml index 3e11d4a58..0e2c636d4 100644 --- a/.idea/inspectionProfiles/Project_Default.xml +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -1,7 +1,7 @@