Merge branch 'develop'
This commit is contained in:
commit
b3e120d979
|
|
@ -3,6 +3,7 @@ import 'dart:async';
|
|||
|
||||
// Flutter imports:
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:window_manager/window_manager.dart';
|
||||
|
||||
class LiveText extends StatefulWidget {
|
||||
const LiveText(
|
||||
|
|
@ -29,7 +30,16 @@ class _LiveTextState extends State<LiveText> {
|
|||
super.initState();
|
||||
_timer = Timer.periodic(
|
||||
widget.duration ?? Duration(milliseconds: 100),
|
||||
(Timer timer) => mounted ? setState(() => false) : false,
|
||||
(Timer timer) async {
|
||||
final isFocused = await windowManager.isFocused();
|
||||
if (!isFocused) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mounted) {
|
||||
setState(() => false);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -287,8 +287,17 @@ class _UpgradeDialogState extends State<UpgradeDialog> {
|
|||
final url = (state.isStaging ? kAppStagingUrl : kAppProductionUrl) +
|
||||
'/api/admin/subscription';
|
||||
|
||||
var purchaseID = purchaseDetails.purchaseID;
|
||||
if (purchaseDetails is AppStorePurchaseDetails) {
|
||||
final originalTransaction =
|
||||
purchaseDetails.skPaymentTransaction.originalTransaction;
|
||||
if (originalTransaction != null) {
|
||||
purchaseID = originalTransaction.transactionIdentifier;
|
||||
}
|
||||
}
|
||||
|
||||
final data = {
|
||||
'inapp_transaction_id': purchaseDetails.purchaseID,
|
||||
'inapp_transaction_id': purchaseID,
|
||||
'key': state.account.key,
|
||||
'plan': purchaseDetails.productID.replaceAll('-', '_'),
|
||||
'plan_paid': (int.parse(purchaseDetails.transactionDate!) / 1000).floor(),
|
||||
|
|
|
|||
Loading…
Reference in New Issue