chore: lint fix and revert

This commit is contained in:
Prateek Sunal
2025-06-30 12:26:48 +05:30
parent 81947c61ab
commit 7ebb039b35
3 changed files with 13 additions and 5 deletions

View File

@@ -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

View File

@@ -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];

View File

@@ -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;
});