Skip to content

Restore revenue widget#145

Merged
binary-koan merged 10 commits intomainfrom
revenue-widget
Apr 2, 2026
Merged

Restore revenue widget#145
binary-koan merged 10 commits intomainfrom
revenue-widget

Conversation

@binary-koan
Copy link
Copy Markdown
Contributor

Uses Expo Widgets for iOS and react-native-android-widget for Android. Fairly basic, especially on iOS where I haven't yet found a way to load the logo image, but it avoids breaking the actual functionality at least.

@binary-koan binary-koan self-assigned this Apr 2, 2026
</HStack>
<Spacer modifiers={[frame({ height: 1 })]} />

<HStack>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The iOS widget seems to break if we extract a component for this

const { data, error } = useAPIRequest<RevenueTotalsResponse>({
queryKey: ["revenue_totals"],
url: "mobile/analytics/revenue_totals.json",
refetchInterval: 5 * 60 * 1000,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the widget every 5 minutes while the app is active

Background fetch for iOS in this file + Android configuration in app.config.ts update it when the app isn't active

@binary-koan binary-koan merged commit 96f4b75 into main Apr 2, 2026
2 checks passed
@binary-koan binary-koan deleted the revenue-widget branch April 2, 2026 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant