Display in a chip the number of unmatched inbox entries
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user