Skip to content

Commit

Permalink
Code optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
jijopulikkottil committed Jun 12, 2024
1 parent 95f4750 commit bca298d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
2 changes: 0 additions & 2 deletions StreakWidgetHelper/StreakWidgetHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import Foundation
//import LAMP
import WidgetKit

public class StreakWidgetHelper {

Expand Down Expand Up @@ -49,7 +48,6 @@ public class StreakWidgetHelper {
if let reslut {
StreakWidgetHelper.cachedEntry = reslut
}
WidgetCenter.shared.reloadAllTimelines()
completion?(responseData.dates)


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"originHash" : "fc48a6bab5016fb028fdd589d5bc4d0270adb311945526b62b6566882c00538d",
"pins" : [
{
"identity" : "lamp-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/BIDMCDigitalPsychiatry/LAMP-swift.git",
"state" : {
"revision" : "10ba053cd95a10d8a5cd11a8f031b8bc77b89b90",
"version" : "2023.12.19"
}
}
],
"version" : 3
}
5 changes: 4 additions & 1 deletion mindLAMP/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

import UIKit
import WidgetKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
Expand Down Expand Up @@ -60,7 +61,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
calculateBadgeCount()
}
func applicationWillResignActive(_ application: UIApplication) {
widgetHelper.fetchActivityEvents(participantId: UserDefaults.standard.participantIdShared, completion: nil)
widgetHelper.fetchActivityEvents(participantId: UserDefaults.standard.participantIdShared) { _ in
WidgetCenter.shared.reloadAllTimelines()
}
}
}

Expand Down

0 comments on commit bca298d

Please sign in to comment.