Skip to content

Commit

Permalink
fix: pid push and empty classroom
Browse files Browse the repository at this point in the history
  • Loading branch information
singularity-s0 committed Oct 16, 2021
1 parent a093d72 commit 55850b4
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 45 deletions.
24 changes: 12 additions & 12 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -702,12 +702,12 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 60;
CURRENT_PROJECT_VERSION = 62;
DEVELOPMENT_TEAM = QZ9KCS2T78;
GCC_C_LANGUAGE_STANDARD = gnu11;
IBSC_MODULE = nano_Extension;
INFOPLIST_FILE = nano/Info.plist;
MARKETING_VERSION = 1.3.0;
MARKETING_VERSION = 1.2.6;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "io.github.danxi-dev.dan-xi.watchapp";
Expand Down Expand Up @@ -736,12 +736,12 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 60;
CURRENT_PROJECT_VERSION = 62;
DEVELOPMENT_TEAM = QZ9KCS2T78;
GCC_C_LANGUAGE_STANDARD = gnu11;
IBSC_MODULE = nano_Extension;
INFOPLIST_FILE = nano/Info.plist;
MARKETING_VERSION = 1.3.0;
MARKETING_VERSION = 1.2.6;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "io.github.danxi-dev.dan-xi.watchapp";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -767,12 +767,12 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 60;
CURRENT_PROJECT_VERSION = 62;
DEVELOPMENT_TEAM = QZ9KCS2T78;
GCC_C_LANGUAGE_STANDARD = gnu11;
IBSC_MODULE = nano_Extension;
INFOPLIST_FILE = nano/Info.plist;
MARKETING_VERSION = 1.3.0;
MARKETING_VERSION = 1.2.6;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "io.github.danxi-dev.dan-xi.watchapp";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -796,7 +796,7 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = "nano Extension/nano Extension.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 60;
CURRENT_PROJECT_VERSION = 62;
DEVELOPMENT_ASSET_PATHS = "\"nano Extension/Preview Content\"";
DEVELOPMENT_TEAM = QZ9KCS2T78;
ENABLE_PREVIEWS = YES;
Expand All @@ -807,7 +807,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.3.0;
MARKETING_VERSION = 1.2.6;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "io.github.danxi-dev.dan-xi.watchapp.watchkitextension";
Expand All @@ -834,7 +834,7 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = "nano Extension/nano Extension.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 60;
CURRENT_PROJECT_VERSION = 62;
DEVELOPMENT_ASSET_PATHS = "\"nano Extension/Preview Content\"";
DEVELOPMENT_TEAM = QZ9KCS2T78;
ENABLE_PREVIEWS = YES;
Expand All @@ -845,7 +845,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.3.0;
MARKETING_VERSION = 1.2.6;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "io.github.danxi-dev.dan-xi.watchapp.watchkitextension";
PRODUCT_NAME = "${TARGET_NAME}";
Expand All @@ -869,7 +869,7 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = "nano Extension/nano Extension.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 60;
CURRENT_PROJECT_VERSION = 62;
DEVELOPMENT_ASSET_PATHS = "\"nano Extension/Preview Content\"";
DEVELOPMENT_TEAM = QZ9KCS2T78;
ENABLE_PREVIEWS = YES;
Expand All @@ -880,7 +880,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.3.0;
MARKETING_VERSION = 1.2.6;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "io.github.danxi-dev.dan-xi.watchapp.watchkitextension";
PRODUCT_NAME = "${TARGET_NAME}";
Expand Down
6 changes: 3 additions & 3 deletions lib/common/pubspec.yaml.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 13 additions & 14 deletions lib/page/empty_classroom_detail.dart
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,8 @@ class _EmptyClassroomDetailPageState extends State<EmptyClassroomDetailPage> {
7,
child: Text(
"| " + S.of(context).morning,
overflow: TextOverflow.fade,
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
),
Container(
Expand All @@ -260,7 +261,8 @@ class _EmptyClassroomDetailPageState extends State<EmptyClassroomDetailPage> {
7,
child: Text(
"| " + S.of(context).afternoon,
overflow: TextOverflow.fade,
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
),
Container(
Expand All @@ -272,16 +274,15 @@ class _EmptyClassroomDetailPageState extends State<EmptyClassroomDetailPage> {
3,
child: Text(
"| " + S.of(context).evening,
overflow: TextOverflow.fade,
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
),
],
),
]),
Divider(),
]
//subtitle: Divider(height: 5,),
),
]),
),
Expanded(
child: FutureWidget<List<RoomInfo>?>(
Expand All @@ -293,14 +294,12 @@ class _EmptyClassroomDetailPageState extends State<EmptyClassroomDetailPage> {
selectDate),
successBuilder: (BuildContext context,
AsyncSnapshot<dynamic> snapshot) =>
Expanded(
child: WithScrollbar(
controller: PrimaryScrollController.of(context),
child: ListView(
primary: true,
children: _getListWidgets(snapshot.data),
),
)),
WithScrollbar(
controller: PrimaryScrollController.of(context),
child: ListView(
primary: true,
children: _getListWidgets(snapshot.data),
)),
errorBuilder: (_, snapShot) => _buildErrorWidget(),
loadingBuilder: _buildLoadingWidget()),
)
Expand Down
31 changes: 16 additions & 15 deletions lib/page/subpage_bbs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import 'package:dan_xi/widget/future_widget.dart';
import 'package:dan_xi/widget/paged_listview.dart';
import 'package:dan_xi/widget/platform_app_bar_ex.dart';
import 'package:dan_xi/widget/round_chip.dart';
import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
Expand Down Expand Up @@ -342,21 +343,21 @@ class _BBSSubpageState extends State<BBSSubpage>
_goToPIDResultPage(int pid) async {
ProgressFuture progressDialog = showProgressDialog(
loadingText: S.of(context).loading, context: context);
final BBSPost post = await PostRepository.getInstance()
.loadSpecificDiscussion(pid)
.onError((dynamic error, stackTrace) {
if (error.response?.statusCode == HttpStatus.notFound)
Noticing.showNotice(context, S.of(context).post_does_not_exist,
title: S.of(context).fatal_error);
else
Noticing.showNotice(context, error.toString(),
title: S.of(context).fatal_error);
progressDialog.dismiss();
return null;
} as FutureOr<BBSPost> Function(Error, StackTrace));
smartNavigatorPush(context, "/bbs/postDetail", arguments: {
"post": post,
});
try {
final BBSPost post =
await PostRepository.getInstance().loadSpecificDiscussion(pid);
smartNavigatorPush(context, "/bbs/postDetail", arguments: {
"post": post,
});
} catch (error) {
if (error is DioError &&
error.response?.statusCode == HttpStatus.notFound)
Noticing.showNotice(context, S.of(context).post_does_not_exist,
title: S.of(context).fatal_error);
else
Noticing.showNotice(context, error.toString(),
title: S.of(context).fatal_error);
}
progressDialog.dismiss();
}

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: dan_xi
description: Maybe the best all-rounded service app for Fudan University students.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.2.6+61
version: 1.2.6+62

environment:
sdk: '>=2.12.0 <3.0.0'
Expand Down

0 comments on commit 55850b4

Please sign in to comment.