mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-09 07:28:14 -07:00
feat: Implement custom keyboard for Android TV (#523)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
721fc28060
commit
75c2f958b4
22 changed files with 927 additions and 157 deletions
|
|
@ -325,14 +325,14 @@ class LibrarySearchNotifier extends StateNotifier<LibrarySearchModel> {
|
|||
return response.body;
|
||||
}
|
||||
|
||||
Future<List<ItemBaseModel>> fetchSuggestions(String searchTerm) async {
|
||||
Future<List<ItemBaseModel>> fetchSuggestions(String searchTerm, {int limit = 25}) async {
|
||||
if (state.folderOverwrite.isNotEmpty) {
|
||||
final response = await _loadLibrary(id: state.nestedCurrentItem?.id ?? "", searchTerm: searchTerm, limit: 25);
|
||||
final response = await _loadLibrary(id: state.nestedCurrentItem?.id ?? "", searchTerm: searchTerm, limit: limit);
|
||||
return response?.items ?? [];
|
||||
} else {
|
||||
if (state.views.hasEnabled) {
|
||||
final mappedList = await Future.wait(state.views.included
|
||||
.map((viewModel) => _loadLibrary(viewModel: viewModel, limit: 25, searchTerm: searchTerm)));
|
||||
.map((viewModel) => _loadLibrary(viewModel: viewModel, limit: limit, searchTerm: searchTerm)));
|
||||
return mappedList
|
||||
.expand((innerList) => innerList?.items ?? [])
|
||||
.where((item) => item != null)
|
||||
|
|
@ -342,7 +342,7 @@ class LibrarySearchNotifier extends StateNotifier<LibrarySearchModel> {
|
|||
if (searchTerm.isEmpty) {
|
||||
return [];
|
||||
} else {
|
||||
final response = await _loadLibrary(limit: 25, recursive: true, searchTerm: searchTerm);
|
||||
final response = await _loadLibrary(limit: limit, recursive: true, searchTerm: searchTerm);
|
||||
return response?.items ?? [];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,6 +41,8 @@ class ClientSettingsNotifier extends StateNotifier<ClientSettingsModel> {
|
|||
|
||||
void setDerivedColorsFromItem(bool? value) => state = state.copyWith(deriveColorsFromItem: value ?? false);
|
||||
|
||||
void useSystemIME(bool? value) => state = state.copyWith(useSystemIME: value ?? false);
|
||||
|
||||
void setBlurPlaceholders(bool value) => state = state.copyWith(blurPlaceHolders: value);
|
||||
|
||||
void setTimeOut(Duration? duration) => state = state.copyWith(timeOut: duration);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue