Skip to content

Commit

Permalink
more features for OaUserType.none
Browse files Browse the repository at this point in the history
  • Loading branch information
liplum committed Sep 10, 2024
1 parent 20f8548 commit 015acc3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions lib/credentials/entity/user_type.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ enum OaUserType {
}),
@HiveField(4)
none(allowed: {
"basic.timetable",
"school.electricityBalance",
"school.library.search",
"school.eduEmail",
Expand Down
1 change: 1 addition & 0 deletions lib/login/page/index.dart
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ class _LoginPageState extends ConsumerState<LoginPage> {
floatingActionButton: loggingIn ? const CircularProgressIndicator.adaptive() : null,
body: [
[
buildHeader(),
const CampusSelector(),
const OaLoginDisclaimerCard(),
AnimatedShowUp(
Expand Down
15 changes: 7 additions & 8 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import 'package:flutter/services.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:go_router/go_router.dart';
import 'package:mimir/storage/objectbox/init.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:mimir/files.dart';
import 'package:mimir/network/proxy.dart';
Expand Down Expand Up @@ -103,13 +102,13 @@ void main() async {
// iOS will clear the cache under [getApplicationCacheDirectory()] when device has no enough storage.
cacheDir: Files.internal.subDir("hive-cache", R.hiveStorageVersionCache),
);
if (kDebugMode) {
final objectBoxDir = Files.internal.subDir("obx", R.objectBoxStorageVersion);
await objectBoxDir.create(recursive: true);
await ObjectBoxInit.init(
dir: objectBoxDir,
);
}
// if (kDebugMode) {
// final objectBoxDir = Files.internal.subDir("obx", R.objectBoxStorageVersion);
// await objectBoxDir.create(recursive: true);
// await ObjectBoxInit.init(
// dir: objectBoxDir,
// );
// }
}
HiveInit.initAdapters();
await HiveInit.initBox();
Expand Down

0 comments on commit 015acc3

Please sign in to comment.