Display in a chip the number of unmatched inbox entries

This commit is contained in:
2025-05-12 18:46:40 +02:00
parent 0b586039c3
commit 1e8064946a
5 changed files with 138 additions and 41 deletions

View File

@ -7,11 +7,14 @@ import { useLoadingMessage } from "../hooks/context_providers/LoadingMessageProv
import { AsyncWidget } from "../widgets/AsyncWidget";
import { MoneyMgrWebRouteContainer } from "../widgets/MoneyMgrWebRouteContainer";
import { NewMovementWidget } from "../widgets/NewMovementWidget";
import { useUnmatchedInboxEntriesCount } from "../hooks/UnmatchedInboxEntriesCountProvider";
export function InboxRoute(): React.ReactElement {
const loadingMessage = useLoadingMessage();
const alert = useAlert();
const unmatched = useUnmatchedInboxEntriesCount();
const [entries, setEntries] = React.useState<InboxEntry[] | undefined>();
const [includeAttached, setIncludeAttached] = React.useState(false);
@ -24,7 +27,7 @@ export function InboxRoute(): React.ReactElement {
const reload = async (skipEntries: boolean) => {
try {
loadingMessage.show("Refreshing the list of inbox entries...");
// TODO : trigger reload number of inbox entries
unmatched.reload();
if (!skipEntries) await load();
} catch (e) {
console.error("Failed to load list of inbox entries!", e);