overall ui bugfixes and hivemind improvements

This commit is contained in:
esefxdz committed 2026-05-31 13:16:46 +03:00
1 parent a80a23e008
commit 8f32429e82
10 files changed
+125 -158

No files matched your search

+4 -3
View File
@@ -94,8 +94,8 @@ class AdManager extends ChangeNotifier {
final keys = await CryptoService.getOrCreateKeys();
final pubKey = keys['publicKey']!;
// 3. Attach custom data to the ad so Google sends it back to our Hivemind server
_rewardedAd!.serverSideVerificationOptions = ServerSideVerificationOptions(
// 3. Build SSV options to send to our Hivemind server via Google's callback
final ssvOptions = ServerSideVerificationOptions(
customData: jsonEncode({
'device_id': deviceId,
'public_key': pubKey,
@@ -130,7 +130,8 @@ class AdManager extends ChangeNotifier {
},
);
// 5. Show the ad
// 5. Show the ad with SSV options
_rewardedAd!.setServerSideOptions(ssvOptions);
await _rewardedAd!.show(
onUserEarnedReward: (AdWithoutView ad, RewardItem reward) {
debugPrint('[AdManager] Reward earned: ${reward.amount} ${reward.type}');
+1
View File
@@ -182,6 +182,7 @@ class SessionTimer extends ChangeNotifier {
@override
void dispose() {
_timer?.cancel();
VpnNotificationManager.cancel();
super.dispose();
}
}
+1 -1
View File
@@ -156,7 +156,7 @@ class VpnConnection extends ChangeNotifier {
return false;
}
// ── Step 2: Start the WireGuard tunnel with the fetched config ─────────
// ── Step 3: Start the WireGuard tunnel with the fetched config ─────────
try {
// Re-initialize to ensure VPN permission is granted before starting
await _wireguard.initialize(interfaceName: 'Paladin0');