Skip to content

Commit

Permalink
Fix payment for private apps (#1523)
Browse files Browse the repository at this point in the history
  • Loading branch information
beastoin authored Dec 11, 2024
2 parents 17442ba + bba0804 commit d9009af
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions app/lib/pages/apps/app_detail/app_detail.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,17 @@ class _AppDetailPageState extends State<AppDetailPage> {
void initState() {
app = widget.app;
WidgetsBinding.instance.addPostFrameCallback((_) async {
if (!app.private) {
setIsLoading(true);
var res = await context.read<AppProvider>().getAppDetails(app.id);
setState(() {
if (res != null) {
app = res;
moneyMade = res.moneyMade ?? 0.0;
usageCount = res.usageCount ?? 0;
}
});
setIsLoading(false);
}
setIsLoading(true);
var res = await context.read<AppProvider>().getAppDetails(app.id);
setState(() {
if (res != null) {
app = res;
moneyMade = res.moneyMade ?? 0.0;
usageCount = res.usageCount ?? 0;
}
});
setIsLoading(false);

context.read<AppProvider>().checkIsAppOwner(app.uid);
context.read<AppProvider>().setIsAppPublicToggled(!app.private);
});
Expand Down

0 comments on commit d9009af

Please sign in to comment.