Search for location name strings with query with both lowercase
This commit is contained in:
parent
b8c5892388
commit
8d3dde6d13
2 changed files with 7 additions and 8 deletions
|
@ -277,7 +277,7 @@ class SearchService {
|
|||
final locationJson = json.decode(location);
|
||||
final locationName = locationJson["name"].toString();
|
||||
_logger.info(locationName);
|
||||
if (locationName.contains(query)) {
|
||||
if (locationName.toLowerCase().contains(query.toLowerCase())) {
|
||||
_logger.info("TRUEEE");
|
||||
final fileIDs = LocationService.instance
|
||||
.getFilesByLocation(locationJson["id"].toString());
|
||||
|
|
|
@ -4,7 +4,6 @@ import 'package:flutter/material.dart';
|
|||
import 'package:logging/logging.dart';
|
||||
import 'package:photos/ente_theme_data.dart';
|
||||
import 'package:photos/models/search/search_result.dart';
|
||||
import 'package:photos/services/feature_flag_service.dart';
|
||||
import 'package:photos/services/search_service.dart';
|
||||
import 'package:photos/ui/components/icon_button_widget.dart';
|
||||
import 'package:photos/ui/viewer/search/result/no_result_widget.dart';
|
||||
|
@ -221,12 +220,12 @@ class _SearchWidgetState extends State<SearchWidget> {
|
|||
await _searchService.getCollectionSearchResults(query);
|
||||
allResults.addAll(collectionResults);
|
||||
|
||||
if (FeatureFlagService.instance.isInternalUserOrDebugBuild() &&
|
||||
query.startsWith("l:")) {
|
||||
final locationResults = await _searchService
|
||||
.getLocationSearchResults(query.replaceAll("l:", ""));
|
||||
allResults.addAll(locationResults);
|
||||
}
|
||||
// if (FeatureFlagService.instance.isInternalUserOrDebugBuild() &&
|
||||
// query.startsWith("l:")) {
|
||||
// final locationResults = await _searchService
|
||||
// .getLocationSearchResults(query.replaceAll("l:", ""));
|
||||
// allResults.addAll(locationResults);
|
||||
// }
|
||||
|
||||
final monthResults = await _searchService.getMonthSearchResults(query);
|
||||
allResults.addAll(monthResults);
|
||||
|
|
Loading…
Add table
Reference in a new issue