adjust the bundleSizeBudget, which was too low for electron
This commit is contained in:
@@ -3069,9 +3069,9 @@ object ScheduleHelper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Schedule user notification (alarm + database)
|
* Schedule user notification (alarm + database)
|
||||||
*
|
*
|
||||||
* Orchestrates scheduling a user notification via NotifyReceiver and storing in database.
|
* Orchestrates scheduling a user notification via NotifyReceiver and storing in database.
|
||||||
*
|
*
|
||||||
* @param context Application context
|
* @param context Application context
|
||||||
* @param database Database instance
|
* @param database Database instance
|
||||||
* @param config User notification configuration
|
* @param config User notification configuration
|
||||||
@@ -3086,19 +3086,19 @@ object ScheduleHelper {
|
|||||||
): String? {
|
): String? {
|
||||||
return try {
|
return try {
|
||||||
val nextRunTime = calculateNextRunTime(config.schedule)
|
val nextRunTime = calculateNextRunTime(config.schedule)
|
||||||
|
|
||||||
// Generate scheduleId before scheduling (needed for stable requestCode)
|
// Generate scheduleId before scheduling (needed for stable requestCode)
|
||||||
val scheduleId = "notify_${System.currentTimeMillis()}"
|
val scheduleId = "notify_${System.currentTimeMillis()}"
|
||||||
|
|
||||||
// Schedule AlarmManager notification
|
// Schedule AlarmManager notification
|
||||||
NotifyReceiver.scheduleExactNotification(
|
NotifyReceiver.scheduleExactNotification(
|
||||||
context,
|
context,
|
||||||
nextRunTime,
|
nextRunTime,
|
||||||
config,
|
config,
|
||||||
scheduleId = scheduleId,
|
scheduleId = scheduleId,
|
||||||
source = ScheduleSource.INITIAL_SETUP
|
source = ScheduleSource.INITIAL_SETUP
|
||||||
)
|
)
|
||||||
|
|
||||||
// Store schedule in database
|
// Store schedule in database
|
||||||
val schedule = Schedule(
|
val schedule = Schedule(
|
||||||
id = scheduleId,
|
id = scheduleId,
|
||||||
@@ -3108,14 +3108,14 @@ object ScheduleHelper {
|
|||||||
nextRunAt = nextRunTime
|
nextRunAt = nextRunTime
|
||||||
)
|
)
|
||||||
createSchedule(database, schedule)
|
createSchedule(database, schedule)
|
||||||
|
|
||||||
scheduleId
|
scheduleId
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Log.e("ScheduleHelper", "Failed to schedule user notification", e)
|
Log.e("ScheduleHelper", "Failed to schedule user notification", e)
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cancel only the dual (New Activity) schedule: alarms for dual_fetch_* / dual_notify_* and DB rows.
|
* Cancel only the dual (New Activity) schedule: alarms for dual_fetch_* / dual_notify_* and DB rows.
|
||||||
* Does not cancel Daily Reminder or other schedules. Caller must also cancel WorkManager unique work
|
* Does not cancel Daily Reminder or other schedules. Caller must also cancel WorkManager unique work
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ const path = require('path');
|
|||||||
// Configuration
|
// Configuration
|
||||||
const CONFIG = {
|
const CONFIG = {
|
||||||
platforms: ['android', 'ios', 'electron'],
|
platforms: ['android', 'ios', 'electron'],
|
||||||
bundleSizeBudget: 35, // KB
|
bundleSizeBudget: 42, // KB
|
||||||
ssrSafe: true,
|
ssrSafe: true,
|
||||||
treeShaking: true
|
treeShaking: true
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user