Mitigate Apple Mail re-sync (both bodies and meta info)

This commit is contained in:
Michal Horejsek
2020-12-22 12:06:19 +01:00
parent 5117672388
commit 516ca018d3
24 changed files with 239 additions and 225 deletions

View File

@ -157,12 +157,15 @@ func New( // nolint[funlen]
}
apiConfig := pmapi.GetAPIConfig(configName, constants.Version)
apiConfig.NoConnectionHandler = func() {
apiConfig.ConnectionOffHandler = func() {
eventListener.Emit(events.InternetOffEvent, "")
}
apiConfig.ConnectionHandler = func() {
apiConfig.ConnectionOnHandler = func() {
eventListener.Emit(events.InternetOnEvent, "")
}
apiConfig.UpgradeApplicationHandler = func() {
eventListener.Emit(events.UpgradeApplicationEvent, "")
}
cm := pmapi.NewClientManager(apiConfig)
cm.SetRoundTripper(pmapi.GetRoundTripper(cm, listener))
cm.SetCookieJar(jar)