Skip to content

Commit

Permalink
bump: 3.3.3+1
Browse files Browse the repository at this point in the history
  • Loading branch information
Arenukvern committed Oct 22, 2021
1 parent 9be2f16 commit 954038c
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 53 deletions.
104 changes: 52 additions & 52 deletions lib/screens/app/app_store_initializer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,70 +17,70 @@ class AppStoreInitializer extends ConsumerWidget {
.platformBrightness;
return FutureBuilder<bool>(
future: () async {
print('start');
if (settings.appInitialStateLoaded) {
return !settings.appInitialStateIsLoading;
}
print('settings to true');
settings
..appInitialStateLoaded = true
..appInitialStateIsLoading = true;
await SettingsStateScope.of(context).load();
print('settings loaded');

await Hive.openBox<IdeaProjectAnswer>(
HiveBoxesIds.ideaProjectAnswerKey,
);
print('ideaProjectAnswerKey loaded');
try {
print('start');
if (settings.appInitialStateLoaded) {
return !settings.appInitialStateIsLoading;
}
print('settings to true');
settings
..appInitialStateLoaded = true
..appInitialStateIsLoading = true;
await SettingsStateScope.of(context).load();
print('settings loaded');
await Hive.openBox<IdeaProjectAnswer>(
HiveBoxesIds.ideaProjectAnswerKey,
);
print('ideaProjectAnswerKey loaded');
try {} catch (e) {}

final ideas =
await Hive.openBox<IdeaProject>(HiveBoxesIds.ideaProjectKey);
print('ideas loaded');
final ideas =
await Hive.openBox<IdeaProject>(HiveBoxesIds.ideaProjectKey);
print('ideas loaded');

final questions = await Hive.openBox<IdeaProjectQuestion>(
HiveBoxesIds.ideaProjectQuestionKey,
);
if (questions.isEmpty) {
await questions.putAll(
Map.fromEntries(
_initialQuestions.map((final e) => MapEntry(e.id, e)),
),
final questions = await Hive.openBox<IdeaProjectQuestion>(
HiveBoxesIds.ideaProjectQuestionKey,
);
}

ref.read(ideaProjectQuestionsProvider.notifier).putAll(
if (questions.isEmpty) {
await questions.putAll(
Map.fromEntries(
questions.values.map((final e) => MapEntry(e.id, e)),
_initialQuestions.map((final e) => MapEntry(e.id, e)),
),
);
print('questions loaded');
}

ref.read(ideaProjectsProvider.notifier).putAll(
Map.fromEntries(
ideas.values.map((final e) => MapEntry(e.id, e)),
),
);
print('ideaProjectsProvider loaded');
ref.read(ideaProjectQuestionsProvider.notifier).putAll(
Map.fromEntries(
questions.values.map((final e) => MapEntry(e.id, e)),
),
);
print('questions loaded');

final notes =
await Hive.openBox<NoteProject>(HiveBoxesIds.noteProjectKey);
print('notes loaded');
ref.read(ideaProjectsProvider.notifier).putAll(
Map.fromEntries(
ideas.values.map((final e) => MapEntry(e.id, e)),
),
);
print('ideaProjectsProvider loaded');

ref.read(noteProjectsProvider.notifier).putAll(
Map.fromEntries(
notes.values.map((final e) => MapEntry(e.id, e)),
),
);
print('noteProjectsProvider loaded');
final notes =
await Hive.openBox<NoteProject>(HiveBoxesIds.noteProjectKey);
print('notes loaded');

await Hive.openBox<StoryProject>(HiveBoxesIds.storyProjectKey);
print('StoryProject loaded');
ref.read(noteProjectsProvider.notifier).putAll(
Map.fromEntries(
notes.values.map((final e) => MapEntry(e.id, e)),
),
);
print('noteProjectsProvider loaded');

/// ***************** MIGRATION START *******************
await Hive.openBox<StoryProject>(HiveBoxesIds.storyProjectKey);
print('StoryProject loaded');

// TODO(arenukvern): remove old stores after all devices migration
print('migration started');
try {
/// ***************** MIGRATION START *******************
// TODO(arenukvern): remove old stores after all devices migration
print('migration started');
print('darkModeKey started');
if (await Hive.boxExists(HiveBoxesIds.darkModeKey)) {
await Hive.deleteBoxFromDisk(HiveBoxesIds.darkModeKey);
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 3.3.2+1
version: 3.3.3+1

environment:
sdk: ">=2.14.0 <3.0.0"
Expand Down

0 comments on commit 954038c

Please sign in to comment.