Skip to content

Commit 92c472a

Browse files
committed
#936 Update version to 7.9.3 and fix vibration state logic
- Bump version to 7.9.3 in Android and iOS configuration. - Add `ref.keepAlive()` to `AppVibrationState`. - Update `GSYRefreshSliver` to retrieve vibration state via `ProviderScope.containerOf(context)`.
1 parent 76132fe commit 92c472a

4 files changed

Lines changed: 13 additions & 7 deletions

File tree

android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ android {
3333
applicationId "com.shuyu.gsygithub.gsygithubappflutter"
3434
minSdkVersion flutter.minSdkVersion
3535
targetSdkVersion 35
36-
versionCode 68
37-
versionName "7.9.2"
36+
versionCode 69
37+
versionName "7.9.3"
3838
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
3939
}
4040

ios/Runner/Info.plist

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,13 @@
1717
<key>CFBundlePackageType</key>
1818
<string>APPL</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>7.9.2</string> <key>CFBundleSignature</key>
20+
<string>7.9.3</string> <key>CFBundleSignature</key>
2121
<string>????</string>
2222
<key>CFBundleVersion</key>
2323
<string>$(CURRENT_PROJECT_VERSION)</string>
2424
<key>LSApplicationCategoryType</key>
2525
<string></string>
26-
<key>LSRequiresIPhoneOS</key>
27-
<true/>
26+
<key>LSRequiresIPhoneOS</key> <true/>
2827
<key>NSAppTransportSecurity</key>
2928
<dict>
3029
<key>NSAllowsArbitraryLoads</key>

lib/provider/app_state_provider.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ final appStateProvider = Provider<(bool, Locale, ThemeData)>((ref) {
2121
@riverpod
2222
class AppVibrationState extends _$AppVibrationState {
2323
@override
24-
bool build() => true;
24+
bool build() {
25+
ref.keepAlive();
26+
return true;
27+
}
2528

2629
void changeVibration(bool enable, {bool save = true}) {
2730
state = enable;

lib/widget/pull/gsy_refresh_sliver.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import 'dart:math';
66

77
import 'package:flutter/cupertino.dart';
88
import 'package:flutter/rendering.dart';
9+
import 'package:flutter_riverpod/flutter_riverpod.dart';
910
import 'package:flutter/scheduler.dart';
1011
import 'package:flutter/services.dart';
1112
import 'package:gsy_github_app_flutter/provider/app_state_provider.dart';
@@ -417,7 +418,10 @@ class CupertinoSliverRefreshControlState
417418
bool needRefresh = false;
418419
bool draging = false;
419420

420-
bool get vibrationEnable => globalContainer.read(appVibrationStateProvider);
421+
bool get vibrationEnable => ProviderScope.containerOf(
422+
context,
423+
listen: false,
424+
).read(appVibrationStateProvider);
421425

422426
@override
423427
void initState() {

0 commit comments

Comments
 (0)