Skip to content

Commit

Permalink
🔖 v1.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
iota9star committed Sep 17, 2023
1 parent cb0a6e2 commit 1c091e1
Show file tree
Hide file tree
Showing 24 changed files with 1,109 additions and 1,122 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-GP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Release to GP
uses: r0adkll/upload-google-play@v1.0.18
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
packageName: io.nichijou.flutter.mikan
Expand Down
41 changes: 34 additions & 7 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,7 @@ class _MikanAppState extends State<MikanApp> {
),
];
return MaterialApp(
scrollBehavior: const ScrollBehavior().copyWith(
dragDevices: PointerDeviceKind.values.toSet(),
overscroll: true,
platform: TargetPlatform.iOS,
physics: const BouncingScrollPhysics(),
scrollbars: false,
),
scrollBehavior: const AlwaysStretchScrollBehavior(),
themeMode: mode,
theme: ThemeData(
useMaterial3: true,
Expand Down Expand Up @@ -303,3 +297,36 @@ class _ThemeProviderState extends LifecycleAppState<ThemeProvider> {
);
}
}

class AlwaysStretchScrollBehavior extends ScrollBehavior {
const AlwaysStretchScrollBehavior()
: super(androidOverscrollIndicator: AndroidOverscrollIndicator.stretch);

@override
Set<PointerDeviceKind> get dragDevices => PointerDeviceKind.values.toSet();

@override
TargetPlatform getPlatform(BuildContext context) => TargetPlatform.android;

@override
Widget buildScrollbar(
BuildContext context,
Widget child,
ScrollableDetails details,
) {
return child;
}

@override
Widget buildOverscrollIndicator(
BuildContext context,
Widget child,
ScrollableDetails details,
) {
return StretchingOverscrollIndicator(
axisDirection: details.direction,
clipBehavior: details.decorationClipBehavior ?? Clip.hardEdge,
child: child,
);
}
}
48 changes: 0 additions & 48 deletions lib/mikan_route.dart

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

84 changes: 0 additions & 84 deletions lib/mikan_routes.dart

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

12 changes: 6 additions & 6 deletions lib/model/record_details.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import '../internal/extension.dart';
import 'subgroup.dart';

class RecordDetail {
late String id;
late String cover;
String? id;
String cover = '';
late String name;
late bool subscribed;
late Map<String, String> more;
late String intro;
late List<Subgroup> subgroups = [];
bool subscribed = false;
Map<String, String> more = {};
String intro = '';
List<Subgroup> subgroups = [];

// 详情地址
late String url = '';
Expand Down
21 changes: 16 additions & 5 deletions lib/providers/record_detail_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,30 @@ import 'package:easy_refresh/easy_refresh.dart';
import '../internal/extension.dart';
import '../internal/repo.dart';
import '../model/record_details.dart';
import '../model/record_item.dart';
import 'base_model.dart';

class RecordDetailModel extends BaseModel {
RecordDetailModel(this.url);
RecordDetailModel(this.record)
: _recordDetail = RecordDetail()
..name = record.name
..url = record.url
..title = record.title
..subgroups = record.groups
..id = record.id
..cover = record.cover
..tags = record.tags
..torrent = record.torrent
..magnet = record.magnet;

final String url;
final RecordItem record;

RecordDetail? _recordDetail;
RecordDetail _recordDetail;

RecordDetail? get recordDetail => _recordDetail;
RecordDetail get recordDetail => _recordDetail;

Future<IndicatorResult> refresh() async {
final resp = await Repo.details(url);
final resp = await Repo.details(record.url);
if (resp.success) {
_recordDetail = resp.data;
'加载完成'.toast();
Expand Down
Loading

0 comments on commit 1c091e1

Please sign in to comment.