Work on implementing search filter in app [WIP]

This commit is contained in:
2024-09-19 19:46:46 +02:00
parent 9d35916280
commit 3adeadf6fb
23 changed files with 898 additions and 48 deletions

View File

@@ -75,7 +75,7 @@ class _ChannelRootPageState extends State<ChannelRootPage> with RouteAware {
() async {
_reloadEnqueued = false;
AppBarState().setLoadingIndeterminate(true);
await Future.delayed(const Duration(milliseconds: 500)); // prevents flutter bug where the whole process crashes ?!?
await Future.delayed(const Duration(milliseconds: 500), () {}); // prevents flutter bug where the whole process crashes ?!?
await _backgroundRefresh();
}();
}

View File

@@ -45,7 +45,7 @@ class _ChannelListItemState extends State<ChannelListItem> {
lastMessage = SCNDataCache().getMessagesSorted().where((p) => p.channelID == widget.channel.channelID).firstOrNull;
() async {
final (_, channelMessages) = await APIClient.getMessageList(acc, '@start', pageSize: 1, channelIDs: [widget.channel.channelID]);
final (_, channelMessages) = await APIClient.getMessageList(acc, '@start', pageSize: 1, filter: MessageFilter(channelIDs: [widget.channel.channelID]));
setState(() {
lastMessage = channelMessages.firstOrNull;
});