Skip to content

Commit

Permalink
refactor: re-arrange methods
Browse files Browse the repository at this point in the history
  • Loading branch information
srieteja committed Sep 29, 2023
1 parent a0e9c1f commit 9efd8ff
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,6 @@ class AtOnboardingServiceImpl implements AtOnboardingService {
HomeDirectoryUtil.getAtKeysPath(_atSign);
}

Future<void> _init(Map<String, String> atKeysFileDataMap) async {
atChops ??= _createAtChops(atKeysFileDataMap);
await _initAtClient(atChops!);
_atLookUp!.atChops = atChops;
_atClient!.atChops = atChops;
_atClient!.getPreferences()!.useAtChops = true;
}

Future<void> _initAtClient(AtChops atChops) async {
AtClientManager atClientManager = AtClientManager.getInstance();
if (atOnboardingPreference.skipSync == true) {
Expand All @@ -70,6 +62,14 @@ class AtOnboardingServiceImpl implements AtOnboardingService {
_atClient ??= atClientManager.atClient;
}

Future<void> _init(Map<String, String> atKeysFileDataMap) async {
atChops ??= _createAtChops(atKeysFileDataMap);
await _initAtClient(atChops!);
_atLookUp!.atChops = atChops;
_atClient!.atChops = atChops;
_atClient!.getPreferences()!.useAtChops = true;
}

@override
Future<bool> onboard() async {
bool cramAuthStatus = false;
Expand Down

0 comments on commit 9efd8ff

Please sign in to comment.