Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

chore: lint fix and revert

Prateek Sunal7ebb039b35b7
diff --git a/mobile/analysis_options.yaml b/mobile/analysis_options.yaml
index accc05ffc9..2d1fb835f0 100644
--- a/mobile/analysis_options.yaml
+++ b/mobile/analysis_options.yaml
@@ -39,7 +39,7 @@ analyzer:
errors:
avoid_empty_else: error
exhaustive_cases: error
- curly_braces_in_flow_control_structures: ignore
+ curly_braces_in_flow_control_structures: error
directives_ordering: error
require_trailing_commas: error
always_use_package_imports: warning
diff --git a/mobile/lib/ui/viewer/people/person_cluster_suggestion.dart b/mobile/lib/ui/viewer/people/person_cluster_suggestion.dart
index c171044b1c..44f3e89aa7 100644
--- a/mobile/lib/ui/viewer/people/person_cluster_suggestion.dart
+++ b/mobile/lib/ui/viewer/people/person_cluster_suggestion.dart
@@ -336,7 +336,9 @@ class _PersonClustersState extends State<PersonReviewClusterSuggestion> {
Future<void> _saveAsAnotherPerson() async {
if (!canGiveFeedback ||
allSuggestions.isEmpty ||
- currentSuggestionIndex >= allSuggestions.length) return;
+ currentSuggestionIndex >= allSuggestions.length) {
+ return;
+ }
try {
final currentSuggestion = allSuggestions[currentSuggestionIndex];
diff --git a/mobile/lib/ui/viewer/people/person_gallery_suggestion.dart b/mobile/lib/ui/viewer/people/person_gallery_suggestion.dart
index 884ba7d371..d901b35d4d 100644
--- a/mobile/lib/ui/viewer/people/person_gallery_suggestion.dart
+++ b/mobile/lib/ui/viewer/people/person_gallery_suggestion.dart
@@ -175,7 +175,9 @@ class _PersonGallerySuggestionState extends State<PersonGallerySuggestion>
void _navigateToCluster() {
if (allSuggestions.isEmpty ||
- currentSuggestionIndex >= allSuggestions.length) return;
+ currentSuggestionIndex >= allSuggestions.length) {
+ return;
+ }
final currentSuggestion = allSuggestions[currentSuggestionIndex];
final List<EnteFile> sortedFiles = List<EnteFile>.from(
@@ -199,7 +201,9 @@ class _PersonGallerySuggestionState extends State<PersonGallerySuggestion>
Future<void> _handleUserChoice(bool accepted) async {
if (isProcessing ||
allSuggestions.isEmpty ||
- currentSuggestionIndex >= allSuggestions.length) return;
+ currentSuggestionIndex >= allSuggestions.length) {
+ return;
+ }
setState(() {
isProcessing = true;
@@ -245,7 +249,9 @@ class _PersonGallerySuggestionState extends State<PersonGallerySuggestion>
Future<void> _saveAsAnotherPerson() async {
if (isProcessing ||
allSuggestions.isEmpty ||
- currentSuggestionIndex >= allSuggestions.length) return;
+ currentSuggestionIndex >= allSuggestions.length) {
+ return;
+ }
setState(() {
isProcessing = true;
});