Skip to content

Commit

Permalink
renew warp configs on adding
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddify-com committed Jul 14, 2024
1 parent 31054e5 commit 076fc14
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions lib/features/profile/add/add_profile_modal.dart
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ class AddProfileModal extends HookConsumerWidget {
final _prefs = ref.read(sharedPreferencesProvider).requireValue;
final _warp = ref.read(warpOptionNotifierProvider.notifier);
final _profile = ref.read(addProfileProvider.notifier);
final consent = false && (_prefs.getBool(warpConsentGiven) ?? false);
final consent = (_prefs.getBool(warpConsentGiven) ?? false);
context.pop();

final t = ref.read(translationsProvider);
Expand All @@ -265,16 +265,16 @@ class AddProfileModal extends HookConsumerWidget {
}
}

final accountId = _prefs.getString("warp2-account-id");
final accessToken = _prefs.getString("warp2-access-token");
final hasWarp2Config = accountId != null && accessToken != null;
// final accountId = _prefs.getString("warp2-account-id");
// final accessToken = _prefs.getString("warp2-access-token");
// final hasWarp2Config = accountId != null && accessToken != null;

if (!hasWarp2Config || true) {
final toast = notification.showInfoToast(t.profile.add.addingWarpMsg, duration: const Duration(milliseconds: 100));
toast?.pause();
await _warp.generateWarp2Config();
toast?.start();
}
// if (!hasWarp2Config || true) {
final toast = notification.showInfoToast(t.profile.add.addingWarpMsg, duration: const Duration(milliseconds: 100));
toast?.pause();
await _warp.generateWarp2Config();
toast?.start();
// }
await _profile.add("#profile-title: Hiddify WARP\nwarp://p1@auto#National&&detour=warp://p2@auto#WoW"); //
}
}
Expand Down

0 comments on commit 076fc14

Please sign in to comment.