-
Notifications
You must be signed in to change notification settings - Fork 89
TF-3603: Integrate Cozy features #3604
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This PR has been deployed to https://linagora.github.io/tmail-flutter/3604. |
|
zatteo
reviewed
Mar 31, 2025
zatteo
reviewed
Mar 31, 2025
Looks great! 🎉 🎉 |
4d4c578
to
112f446
Compare
38bab7e
to
b3f29be
Compare
b3f29be
to
b723672
Compare
dab246
reviewed
Jun 16, 2025
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.
- Remove
web
folder in Cozy module
// cozy_config_manager_stub.dart
class CozyConfigManager {
Future<void> injectCozyScript() async {
throw UnimplementedError('Cannot use injectCozyScript in non-web environment');
}
Future<void> initialize() async {
throw UnimplementedError('Cannot initialize in non-web environment');
}
Future<bool> get isInsideCozy async {
throw UnimplementedError('Cannot check Cozy environment in non-web environment');
}
}
// cozy_config_manager_web.dart (implementation for web)
import 'dart:async';
import 'package:linagora_design_flutter/cozy_config_manager/cozy_config_manager.dart' as cozy;
class CozyConfigManager {
bool? _isInsideCozy;
Future<void> injectCozyScript() async {
// Web-specific implementation
}
Future<void> initialize() async {
// Web-specific implementation
}
Future<bool> get isInsideCozy async {
return _isInsideCozy ??= await _checkCozyEnvironment();
}
Future<bool> _checkCozyEnvironment() async {
return await cozy.CozyConfigManager().isInsideCozy;
}
}
// cozy_config_manager.dart
export 'cozy_config_manager_stub.dart' if (dart.library.html) 'cozy_config_manager_web.dart';
// cozy_config.dart
import 'package:cozy/cozy_config/cozy_config_manager.dart';
class CozyConfig {
static final CozyConfig _instance = CozyConfig._internal();
final dynamic manager;
factory CozyConfig() => _instance;
CozyConfig._internal() : manager = CozyConfigManager();
Future<bool> get isInsideCozy async => await manager.isInsideCozy;
} |
dab246
reviewed
Jun 16, 2025
lib/features/mailbox_dashboard/presentation/mailbox_dashboard_view_web.dart
Outdated
Show resolved
Hide resolved
dab246
reviewed
Jun 16, 2025
dab246
reviewed
Jun 16, 2025
dab246
reviewed
Jun 16, 2025
hoangdat
previously approved these changes
Jun 18, 2025
TF-3603 [TEMP] expose Cozy integration result to console.log
ddb478f
to
763eccd
Compare
dab246
approved these changes
Jun 18, 2025
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.
LGTM
hoangdat
approved these changes
Jun 18, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
Related PRs
Demo
Screen.Recording.2025-06-17.at.11.22.23.mov