You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
generatedDate?: Date,// note different from lastFullRefresh on whole project
151
151
totalCount?: number,// for when not all possible items are passed in pluginData
152
-
doneCounts?: TDoneCount,// number of tasks and checklists completed today etc.
152
+
doneCounts?: TDoneCount,// number of tasks (and potentially checklists) completed in the relevant calendar note
153
153
showColoredBackground?: boolean,// whether to show a colored background for the section
154
154
}
155
155
@@ -379,8 +379,9 @@ export type TPluginData = {
379
379
themeName: string/* the theme name used when generating the dashboard */,
380
380
platform: string/* the platform used when generating the dashboard */,
381
381
version: string/* version of this plugin */,
382
-
serverPush: {
383
-
/* see below for documentation */dashboardSettings?: boolean,
382
+
pushFromServer: {
383
+
/* see below for documentation */
384
+
dashboardSettings?: boolean,
384
385
perspectiveSettings?: boolean,
385
386
},
386
387
demoMode: boolean/* use fake content for demo/test purposes */,
@@ -389,11 +390,11 @@ export type TPluginData = {
389
390
}
390
391
391
392
/**
392
-
* serverPush was designed especially for dashboardSettings, because dashboardSettings can change in the front-end (via user action) which then need to be noticed and sent to the back-end, or can be sent to the front end from the back-end (plugin) in which case they should just be accepted but not sent back to the plugin.
393
+
* pushFromServer was designed especially for dashboardSettings, because dashboardSettings can change in the front-end (via user action) which then need to be noticed and sent to the back-end, or can be sent to the front end from the back-end (plugin) in which case they should just be accepted but not sent back to the plugin.
393
394
* Initially I was doing this with the lastChange message, and if that message started with a "_" it meant this is coming from the plugin and should not be sent back.
394
-
* But that seemed too non-obvious. So I added this serverPush variable which is set when the plugin wants to send updates to the front-end but does not want those updates to be sent back erroneously.
395
+
* But that seemed too non-obvious. So I added this pushFromServer variable which is set when the plugin wants to send updates to the front-end but does not want those updates to be sent back erroneously.
395
396
* Specifically,
396
-
* - the initial data send in reactMain or the clickHandlers in clickHandlers and perspectiveClickHandlers set data that is changed and then set pluginData.serverPush.dashboardData = true and send it to the front-end using setPluginData()
397
+
* - the initial data send in reactMain or the clickHandlers in clickHandlers and perspectiveClickHandlers set data that is changed and then set pluginData.pushFromServer.dashboardData = true and send it to the front-end using setPluginData()
397
398
* - the change is picked up by the first useEffect in useSyncDashboardSettingsWithPlugin and then that var is set to false and stored locally in pluginData without sending it back to the plugin
0 commit comments