Skip to content

A local-first personal finance app

fix mobile schedule status (#4172)

Matt Fiddaman774402503f73
diff --git a/packages/desktop-client/src/components/mobile/transactions/TransactionListItem.tsx b/packages/desktop-client/src/components/mobile/transactions/TransactionListItem.tsx
index dee30eddf0..3f803d960c 100644
--- a/packages/desktop-client/src/components/mobile/transactions/TransactionListItem.tsx
+++ b/packages/desktop-client/src/components/mobile/transactions/TransactionListItem.tsx
@@ -91,8 +91,11 @@ export function TransactionListItem({
is_parent: isParent,
is_child: isChild,
schedule: scheduleId,
+ forceUpcoming,
} = transaction;
+ const previewStatus = forceUpcoming ? 'upcoming' : categoryId;
+
const isAdded = newTransactions.includes(id);
const categoryName = lookupName(categories, categoryId);
const prettyPayee = getPrettyPayee({
@@ -186,7 +189,10 @@ export function TransactionListItem({
</TextOneLine>
</View>
{isPreview ? (
- <Status status={categoryId} isSplit={isParent || isChild} />
+ <Status
+ status={previewStatus}
+ isSplit={isParent || isChild}
+ />
) : (
<View
style={{
diff --git a/packages/loot-core/src/types/models/transaction.d.ts b/packages/loot-core/src/types/models/transaction.d.ts
index 4c071291c8..c1a3741084 100644
--- a/packages/loot-core/src/types/models/transaction.d.ts
+++ b/packages/loot-core/src/types/models/transaction.d.ts
@@ -22,6 +22,7 @@ export interface TransactionEntity {
cleared?: boolean;
reconciled?: boolean;
tombstone?: boolean;
+ forceUpcoming?: boolean;
schedule?: ScheduleEntity['id'];
subtransactions?: TransactionEntity[];
_unmatched?: boolean;