[PR #61] [MERGED] Feat/background sync #76

Closed
opened 2026-05-07 00:17:45 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/appen-isen/studysen/pull/61
Author: @BreizhHardware
Created: 3/10/2025
Status: Merged
Merged: 3/10/2025
Merged by: @BreizhHardware

Base: devHead: feat/background-sync


📝 Commits (3)

  • 2944f18 feat: add background sync for planning events and enhance notification handling
  • e311627 fix: fix the demo planning not build with the new version using the ICS
  • 237b205 feat: add checks to ignore past notifications for course events

📊 Changes

9 files changed (+451 additions, -498 deletions)

View changed files

📝 app/(tabs)/index.tsx (+8 -40)
📝 app/_layout.tsx (+19 -5)
📝 package-lock.json (+33 -0)
📝 package.json (+2 -0)
stores/planningStore.ts (+86 -0)
📝 utils/notificationConfig.ts (+211 -38)
📝 utils/planning.ts (+14 -12)
📝 webAurion/api/PlanningApi.ts (+3 -6)
📝 webAurion/utils/demo.ts (+75 -397)

📄 Description

This pull request includes significant changes to the HomeScreen component and the notification system, as well as the introduction of a new planningStore for managing planning data. The changes aim to improve the efficiency of the notification system and enhance the planning functionality.

Changes to HomeScreen component:

  • Removed unnecessary imports and state variables related to notes and email normalization. (app/(tabs)/index.tsx, [1] [2] [3] [4]
  • Simplified the email setting logic by directly using the email from settings. (app/(tabs)/index.tsx, app/(tabs)/index.tsxL87-R79)
  • Updated the notification scheduling function to remove the user email parameter. (app/(tabs)/index.tsx, app/(tabs)/index.tsxL164-L171)
  • Removed console log statements for cleaner code. (app/(tabs)/index.tsx, [1] [2] [3]

Changes to notification system:

  • Added background sync capabilities to the notification configuration, including task registration and permission requests. (utils/notificationConfig.ts, [1] [2]
  • Removed console log statements and redundant email normalization logic from the notification scheduling function. (utils/notificationConfig.ts, [1] [2] [3] [4] [5]

Introduction of planningStore:

  • Added a new planningStore using zustand for managing planning data with persistence. (stores/planningStore.ts, stores/planningStore.tsR1-R86)
  • Included initialization logic for the planning store in the root layout. (app/_layout.tsx, [1] [2]

Package updates:

  • Added expo-background-fetch and expo-task-manager to the project dependencies. (package.json, [1] [2]

These changes collectively enhance the application's planning and notification capabilities, streamline the HomeScreen component, and improve code maintainability.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/appen-isen/studysen/pull/61 **Author:** [@BreizhHardware](https://github.com/BreizhHardware) **Created:** 3/10/2025 **Status:** ✅ Merged **Merged:** 3/10/2025 **Merged by:** [@BreizhHardware](https://github.com/BreizhHardware) **Base:** `dev` ← **Head:** `feat/background-sync` --- ### 📝 Commits (3) - [`2944f18`](https://github.com/appen-isen/studysen/commit/2944f181f251d8e8791094b9391f7b9b2b7e9ebd) feat: add background sync for planning events and enhance notification handling - [`e311627`](https://github.com/appen-isen/studysen/commit/e3116277ac178027d13ed78ae52eea6d657280fc) fix: fix the demo planning not build with the new version using the ICS - [`237b205`](https://github.com/appen-isen/studysen/commit/237b205e7f5991fe7958bd6f21d0285316ef4eec) feat: add checks to ignore past notifications for course events ### 📊 Changes **9 files changed** (+451 additions, -498 deletions) <details> <summary>View changed files</summary> 📝 `app/(tabs)/index.tsx` (+8 -40) 📝 `app/_layout.tsx` (+19 -5) 📝 `package-lock.json` (+33 -0) 📝 `package.json` (+2 -0) ➕ `stores/planningStore.ts` (+86 -0) 📝 `utils/notificationConfig.ts` (+211 -38) 📝 `utils/planning.ts` (+14 -12) 📝 `webAurion/api/PlanningApi.ts` (+3 -6) 📝 `webAurion/utils/demo.ts` (+75 -397) </details> ### 📄 Description This pull request includes significant changes to the `HomeScreen` component and the notification system, as well as the introduction of a new `planningStore` for managing planning data. The changes aim to improve the efficiency of the notification system and enhance the planning functionality. ### Changes to `HomeScreen` component: * Removed unnecessary imports and state variables related to notes and email normalization. (`app/(tabs)/index.tsx`, [[1]](diffhunk://#diff-f1376aabc191da604c7467683d96ee39e243cbc17a4a4caaa41d43f1979a1ebdL14) [[2]](diffhunk://#diff-f1376aabc191da604c7467683d96ee39e243cbc17a4a4caaa41d43f1979a1ebdL25-L30) [[3]](diffhunk://#diff-f1376aabc191da604c7467683d96ee39e243cbc17a4a4caaa41d43f1979a1ebdL39-L48) [[4]](diffhunk://#diff-f1376aabc191da604c7467683d96ee39e243cbc17a4a4caaa41d43f1979a1ebdL87-R79) * Simplified the email setting logic by directly using the email from settings. (`app/(tabs)/index.tsx`, [app/(tabs)/index.tsxL87-R79](diffhunk://#diff-f1376aabc191da604c7467683d96ee39e243cbc17a4a4caaa41d43f1979a1ebdL87-R79)) * Updated the notification scheduling function to remove the user email parameter. (`app/(tabs)/index.tsx`, [app/(tabs)/index.tsxL164-L171](diffhunk://#diff-f1376aabc191da604c7467683d96ee39e243cbc17a4a4caaa41d43f1979a1ebdL164-L171)) * Removed console log statements for cleaner code. (`app/(tabs)/index.tsx`, [[1]](diffhunk://#diff-f1376aabc191da604c7467683d96ee39e243cbc17a4a4caaa41d43f1979a1ebdL195-L197) [[2]](diffhunk://#diff-f1376aabc191da604c7467683d96ee39e243cbc17a4a4caaa41d43f1979a1ebdL210-L222) [[3]](diffhunk://#diff-f1376aabc191da604c7467683d96ee39e243cbc17a4a4caaa41d43f1979a1ebdL242-R216) ### Changes to notification system: * Added background sync capabilities to the notification configuration, including task registration and permission requests. (`utils/notificationConfig.ts`, [[1]](diffhunk://#diff-d51e62f01d714f9cf05edc8478fd258443a6a3878f66c025a0c345b7882a4290R5-R64) [[2]](diffhunk://#diff-d51e62f01d714f9cf05edc8478fd258443a6a3878f66c025a0c345b7882a4290L57-L67) * Removed console log statements and redundant email normalization logic from the notification scheduling function. (`utils/notificationConfig.ts`, [[1]](diffhunk://#diff-d51e62f01d714f9cf05edc8478fd258443a6a3878f66c025a0c345b7882a4290L169-R216) [[2]](diffhunk://#diff-d51e62f01d714f9cf05edc8478fd258443a6a3878f66c025a0c345b7882a4290L187-L191) [[3]](diffhunk://#diff-d51e62f01d714f9cf05edc8478fd258443a6a3878f66c025a0c345b7882a4290L203-L224) [[4]](diffhunk://#diff-d51e62f01d714f9cf05edc8478fd258443a6a3878f66c025a0c345b7882a4290L250-L252) [[5]](diffhunk://#diff-d51e62f01d714f9cf05edc8478fd258443a6a3878f66c025a0c345b7882a4290L276-L288) ### Introduction of `planningStore`: * Added a new `planningStore` using `zustand` for managing planning data with persistence. (`stores/planningStore.ts`, [stores/planningStore.tsR1-R86](diffhunk://#diff-e6d988a115ed20557ae832c036321d05344a4dc0ce1f4deadc9b7fd6c7109fe5R1-R86)) * Included initialization logic for the planning store in the root layout. (`app/_layout.tsx`, [[1]](diffhunk://#diff-a297596ca5a79abd3db7509592a07106f1c27c02ee55895a4dee8bcce9f7da57L10-R14) [[2]](diffhunk://#diff-a297596ca5a79abd3db7509592a07106f1c27c02ee55895a4dee8bcce9f7da57R49) ### Package updates: * Added `expo-background-fetch` and `expo-task-manager` to the project dependencies. (`package.json`, [[1]](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R32) [[2]](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R45) These changes collectively enhance the application's planning and notification capabilities, streamline the `HomeScreen` component, and improve code maintainability. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 00:17:45 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/studysen#76
No description provided.