kopia lustrzana https://gitlab.com/mysocialportal/relatica
Add hashtag awareness to friendica search client
rodzic
71e83ab824
commit
71a15990e2
|
@ -45,8 +45,14 @@ Future<Result<PagedResponse<SearchResults>, ExecError>> searchResults(
|
|||
Future.microtask(
|
||||
() async => ref.read(searchLoadingStatusProvider(profile).notifier).begin(),
|
||||
);
|
||||
|
||||
var query = searchTerm.trim();
|
||||
// query sanitazation?
|
||||
if (query.startsWith('#')) {
|
||||
query.replaceFirst('#', '%23');
|
||||
}
|
||||
final url =
|
||||
'https://${profile.serverName}/api/v1/search?${page.toQueryParameters()}&${type.toQueryParameters()}&q=$searchTerm';
|
||||
'https://${profile.serverName}/api/v1/search?${page.toQueryParameters()}&${type.toQueryParameters()}&q=$query';
|
||||
final result = await ref.read(getApiPagedRequestProvider(
|
||||
profile,
|
||||
Uri.parse(url),
|
||||
|
|
|
@ -6,7 +6,7 @@ part of 'friendica_search_client_services.dart';
|
|||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$searchResultsHash() => r'c7aad55fce75888433ef6afd35ffcd88d7d5b8c4';
|
||||
String _$searchResultsHash() => r'56bb101341f50f55e152908e1f3aabf25e842cb4';
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
|
|
Ładowanie…
Reference in New Issue