Skip to content

Commit

Permalink
chore: rm console logs
Browse files Browse the repository at this point in the history
  • Loading branch information
timeowilliams committed Nov 30, 2024
1 parent 7f5a8f8 commit e642019
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion forge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const config: ForgeConfig = {
osxSign: {
identity: 'Developer ID Application: Timeo Williams (3Y4F3KTSJA)',
type: 'distribution',
provisioningProfile: '/Users/timeo/deepFocus/deepWork/distribution.provisionprofile'
provisioningProfile: '/Users/timeo/Desktop/Deep Focus/deepWork/distribution.provisionprofile'
},
appBundleId: 'com.electron.deepfocus',
extraResource: [
Expand Down
2 changes: 1 addition & 1 deletion latest-mac.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"url": "https://github.com/Tech-Nest-Ventures/deepFocus/releases/download/v2.4.5/Deep.Focus-darwin-arm64-2.4.5.zip",
"name": "2.4.5",
"name": "2.4.6",
"notes": "Bug fixes and performance improvements.",
"pub_date": "2024-11-02T12:00:00Z"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "deepFocus",
"productName": "Deep Focus",
"version": "2.4.5",
"version": "2.4.6",
"main": ".vite/build/main.js",
"scripts": {
"start": "DEBUG=electron* electron-forge start",
Expand Down
14 changes: 11 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -669,13 +669,15 @@ async function sendDailyEmail(): Promise<boolean> {
date: today,
workToday,
trackers: filteredTrackers.map((tracker: SiteTimeTracker) => ({
title: tracker.title,
url: tracker.url,
title: tracker.title.slice(0, 100), // Truncate long titles
url: tracker.url.slice(0, 200), // Truncate long URLs
timeSpent: tracker.timeSpent,
iconUrl: tracker.iconUrl
iconUrl: null // Optionally remove icon URLs if they're large
}))
}

log.info('Payload size:', JSON.stringify(dailyData).length);

try {
const response = await fetch(`${API_BASE_URL}/api/v1/activity/send-daily`, {
method: 'POST',
Expand Down Expand Up @@ -720,6 +722,12 @@ async function checkAndSendMissedEmails(): Promise<void> {
// Update the last email date after each successful send
store.set('lastEmailDate', dateToProcess.toISOString())
dateToProcess = dateToProcess.add(1, 'day')
} else {
log.info('Missed email not sent. Retrying in 10 minutes.')
new Notification({
title: 'Deep Focus',
body: 'Missed email not sent. Retrying in 10 minutes.'
}).show()
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/productivityUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ export function isDeepWork(context: WorkContext, store: TypedStore): boolean {
formattedItem.includes(app.appName.toLowerCase().replaceAll(' ', ''))
)
) {
console.log('Unproductive app detected:', formattedItem)
console.log(validUnproductiveApps.map((app) => app.appName))
// console.log('Unproductive app detected:', formattedItem)
//console.log(validUnproductiveApps.map((app) => app.appName))
return false
}
}
Expand Down

0 comments on commit e642019

Please sign in to comment.