-
Notifications
You must be signed in to change notification settings - Fork 88
Fix cannot sync data between mobile and web #3750
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
This PR has been deployed to https://linagora.github.io/tmail-flutter/3750. |
4c29be7
to
0d28a19
Compare
5dd4205
to
45a5db9
Compare
|
ff53e6e
to
f32b891
Compare
f32b891
to
5e39d06
Compare
5e39d06
to
2327431
Compare
0b8d9e0
to
a9133c3
Compare
@override | ||
Future<void> onUpgrade(int oldVersion, int newVersion) async { | ||
if (oldVersion > 0 && oldVersion < newVersion && newVersion == 17) { | ||
await _cachingManager.clearAll(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so app will be totally logout?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's right
Properties? updatedProperties, | ||
List<Email>? emailCacheList | ||
}) async { | ||
if (emailUpdated != null && emailUpdated.isNotEmpty) { | ||
if (updatedProperties == null) { | ||
return null; | ||
} | ||
final newEmailUpdated = emailUpdated | ||
.map((updatedEmail) => _combineUpdatedWithEmailInCache(updatedEmail, emailCacheList)) | ||
.where((tuple) => tuple.value2 != null) | ||
.map((tuple) => tuple.value2!.combineEmail(tuple.value1, updatedProperties)) | ||
.toList(); | ||
if (emailUpdated == null || emailUpdated.isEmpty) return emailUpdated; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should write test to make sure this method work well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add
return Properties({ | ||
...ThreadConstants.propertiesUpdatedDefault.value, | ||
IndividualHeaderIdentifier.headerCalendarEvent.value, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return Properties({ | |
...ThreadConstants.propertiesUpdatedDefault.value, | |
IndividualHeaderIdentifier.headerCalendarEvent.value, | |
}); | |
return ThreadConstants.propertiesCalendarEvent; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fcm_isolate_name_server.dart
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
lib/features/base/upgradeable/upgrade_hive_database_steps_v17.dart
Outdated
Show resolved
Hide resolved
|
||
import 'package:hive_ce/hive.dart'; | ||
|
||
class FcmIsolateNameServer extends IsolateNameServer { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it uses for what?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a mechanism for sharing ports between isolates. IsolateNameServer
allows registering and looking up a SendPort by name, allowing the secondary isolate to connect to the primary isolate or vice versa without passing the port through the constructor.
Signed-off-by: dab246 <tdvu@linagora.com>
Signed-off-by: dab246 <tdvu@linagora.com>
Signed-off-by: dab246 <tdvu@linagora.com>
Signed-off-by: dab246 <tdvu@linagora.com>
Signed-off-by: dab246 <tdvu@linagora.com>
Signed-off-by: dab246 <tdvu@linagora.com>
Signed-off-by: dab246 <tdvu@linagora.com>
Signed-off-by: dab246 <tdvu@linagora.com>
Signed-off-by: dab246 <tdvu@linagora.com>
Signed-off-by: dab246 <tdvu@linagora.com>
561adc8
to
005ac8f
Compare
Issue
Data between Mobile and Web is not consistent:
Screen.Recording.2025-05-27.at.16.28.24.mov
Resolved
Screen.Recording.2025-05-27.at.16.46.35.mov