Skip to content

Commit

Permalink
data loaded logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Notsfsssf committed Sep 22, 2024
1 parent d56cacf commit dfcb360
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ android {
applicationId packageName
minSdkVersion 21
targetSdkVersion 34
versionCode 10009476
versionName "0.9.48 X"
versionCode 10009480
versionName "0.9.48 color"
ndk { abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86_64' }
}
compileOptions {
Expand Down
2 changes: 1 addition & 1 deletion lib/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import 'dart:io';

class Constants {
static String tagName = "0.9.47";
static String tagName = "0.9.48";
static const isGooglePlay =
bool.fromEnvironment("IS_GOOGLEPLAY", defaultValue: false);
static int type = 0;
Expand Down
16 changes: 13 additions & 3 deletions lib/page/board/board_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,20 @@ class _BoardPageState extends State<BoardPage> {
if (_boardList.isNotEmpty) {
return;
}
if (BoardInfo.boardDataLoaded) {
setState(() {
_boardList = BoardInfo.boardList;
});
return;
}
final list = await BoardInfo.load();
setState(() {
_boardList = list;
});
BoardInfo.boardList = list;
BoardInfo.boardDataLoaded = true;
if (mounted) {
setState(() {
_boardList = list;
});
}
} catch (e) {}
}

Expand Down

0 comments on commit dfcb360

Please sign in to comment.