File tree Expand file tree Collapse file tree 6 files changed +16
-5
lines changed
android/app/src/main/kotlin/com/follow/clash Expand file tree Collapse file tree 6 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ object State {
92
92
93
93
suspend fun destroyServiceEngine () {
94
94
runLock.withLock {
95
+ GlobalState .log(" Destroy service engine" )
95
96
withContext(Dispatchers .Main ) {
96
97
runCatching {
97
98
serviceFlutterEngine?.destroy()
@@ -103,10 +104,12 @@ object State {
103
104
104
105
suspend fun startServiceWithEngine () {
105
106
runLock.withLock {
106
- if (serviceFlutterEngine != null || runStateFlow.value == RunState .PENDING || runStateFlow.value == RunState .START ) {
107
+ if (runStateFlow.value == RunState .PENDING || runStateFlow.value == RunState .START ) {
107
108
return
108
109
}
110
+ GlobalState .log(" Create service engine" )
109
111
withContext(Dispatchers .Main ) {
112
+ serviceFlutterEngine?.destroy()
110
113
serviceFlutterEngine = FlutterEngine (GlobalState .application)
111
114
serviceFlutterEngine?.plugins?.add(ServicePlugin ())
112
115
serviceFlutterEngine?.plugins?.add(AppPlugin ())
Original file line number Diff line number Diff line change 33
33
)
34
34
35
35
func handleInitClash (paramsString string ) bool {
36
+ runLock .Lock ()
37
+ defer runLock .Unlock ()
36
38
var params = InitParams {}
37
39
err := json .Unmarshal ([]byte (paramsString ), & params )
38
40
if err != nil {
@@ -41,6 +43,11 @@ func handleInitClash(paramsString string) bool {
41
43
version = params .Version
42
44
if ! isInit {
43
45
constant .SetHomeDir (params .HomeDir )
46
+ //currentConfig, _ = config.ParseRawConfig(config.DefaultRawConfig())
47
+ //startTime := time.Now()
48
+ //hub.ApplyConfig(currentConfig)
49
+ //elapsedTime := time.Since(startTime) / time.Millisecond
50
+ //log.Infoln("Initial clash env, total time: %dms", elapsedTime)
44
51
isInit = true
45
52
}
46
53
return isInit
Original file line number Diff line number Diff line change @@ -962,7 +962,7 @@ class AppController {
962
962
final res = await futureFunction ();
963
963
return res;
964
964
} catch (e) {
965
- commonPrint.log ('$futureFunction ===> $e ' , logLevel: LogLevel .warning);
965
+ commonPrint.log ('$title ===> $e ' , logLevel: LogLevel .warning);
966
966
if (realSilence) {
967
967
globalState.showNotifier (e.toString ());
968
968
} else {
Original file line number Diff line number Diff line change @@ -40,8 +40,8 @@ Future<void> _service(List<String> flags) async {
40
40
final clashConfig = globalState.config.patchClashConfig.copyWith.tun (
41
41
enable: false ,
42
42
);
43
- await globalState.handleStart ();
44
43
await coreController.setupConfig (clashConfig);
44
+ await globalState.handleStart ();
45
45
});
46
46
}
47
47
Original file line number Diff line number Diff line change @@ -147,7 +147,8 @@ class ProviderItem extends StatelessWidget {
147
147
crossAxisAlignment: CrossAxisAlignment .start,
148
148
children: [
149
149
const SizedBox (height: 4 ),
150
- Text (_buildProviderDesc ()),
150
+ if (provider.updateAt.microsecondsSinceEpoch > 0 )
151
+ Text (_buildProviderDesc ()),
151
152
const SizedBox (height: 4 ),
152
153
if (provider.subscriptionInfo != null )
153
154
SubscriptionInfoView (subscriptionInfo: provider.subscriptionInfo),
Original file line number Diff line number Diff line change 1
1
name : fl_clash
2
2
description : A multi-platform proxy client based on ClashMeta, simple and easy to use, open-source and ad-free.
3
3
publish_to : ' none'
4
- version : 0.8.89+2025092701
4
+ version : 0.8.90+2025092801
5
5
environment :
6
6
sdk : ' >=3.8.0 <4.0.0'
7
7
You can’t perform that action at this time.
0 commit comments