Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ecde09c451 |
+12
-1
@@ -368,7 +368,18 @@ tasks:
|
||||
|
||||
check-fast:
|
||||
desc: Pre-commit checks — analyze + unit+widget tests + coverage gate (no build, no integration)
|
||||
deps: [analyze, check-coverage, check-hygiene]
|
||||
deps: [analyze, check-coverage, check-hygiene, check-layers]
|
||||
|
||||
check-layers:
|
||||
desc: Enforce architecture — ui/ must not import data/ (only core/ interfaces allowed)
|
||||
cmds:
|
||||
- |
|
||||
VIOLATIONS=$(grep -rn "package:sharedinbox/data/" lib/ui/ 2>/dev/null || true)
|
||||
if [ -n "$VIOLATIONS" ]; then
|
||||
echo "ERROR: UI layer imports data layer (only core/ interfaces are allowed from ui/):"
|
||||
echo "$VIOLATIONS"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
check-hygiene:
|
||||
desc: Verify that no forbidden files (like home dir config) are tracked
|
||||
|
||||
@@ -18,14 +18,6 @@ import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
final _dateFmt = DateFormat('EEE, MMM d yyyy, HH:mm');
|
||||
|
||||
void _openLink(String? url, Map<String, String> attrs, dynamic _) {
|
||||
if (url == null) return;
|
||||
final uri = Uri.tryParse(url);
|
||||
if (uri != null) {
|
||||
unawaited(launchUrl(uri, mode: LaunchMode.externalApplication));
|
||||
}
|
||||
}
|
||||
|
||||
class EmailDetailScreen extends ConsumerStatefulWidget {
|
||||
const EmailDetailScreen({super.key, required this.emailId});
|
||||
final String emailId;
|
||||
@@ -561,11 +553,7 @@ class _SafeHtmlState extends State<_SafeHtml> {
|
||||
(_) => ErrorWidget.builder = prev,
|
||||
);
|
||||
|
||||
return Html(
|
||||
data: widget.data,
|
||||
extensions: widget.extensions,
|
||||
onLinkTap: _openLink,
|
||||
);
|
||||
return Html(data: widget.data, extensions: widget.extensions);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ import 'package:sharedinbox/core/models/email.dart';
|
||||
import 'package:sharedinbox/core/models/undo_action.dart';
|
||||
import 'package:sharedinbox/core/utils/html_utils.dart';
|
||||
import 'package:sharedinbox/di.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
final _dateFmt = DateFormat('EEE, MMM d, HH:mm');
|
||||
|
||||
@@ -169,18 +168,6 @@ class _EmailMessageCardState extends ConsumerState<_EmailMessageCard> {
|
||||
extensions: [
|
||||
if (!_loadRemoteImages) _BlockRemoteImagesExtension(),
|
||||
],
|
||||
onLinkTap: (url, _, __) {
|
||||
if (url == null) return;
|
||||
final uri = Uri.tryParse(url);
|
||||
if (uri != null) {
|
||||
unawaited(
|
||||
launchUrl(
|
||||
uri,
|
||||
mode: LaunchMode.externalApplication,
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
] else
|
||||
SelectableText(
|
||||
|
||||
Reference in New Issue
Block a user