[mob] Fix discovery section reload condition (#5447)

## Description
Previous condition didn't handle the case when the cities were not
loaded when discovery section was getting computed.
## Tests
This commit is contained in:
Neeraj
2025-03-27 14:18:00 +05:30
committed by GitHub

View File

@@ -68,7 +68,8 @@ class LocationService {
List<EnteFile> allFiles,
String query,
) async {
if (allFiles.isEmpty && query.isEmpty) {
// check if the cities where not loaded when discovery section was loaded
if (allFiles.isNotEmpty && _cities.isEmpty && query.isEmpty) {
reloadLocationDiscoverySection = true;
}
final EnteWatch w = EnteWatch("cities_search")..start();