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 {
9292
9393 suspend fun destroyServiceEngine () {
9494 runLock.withLock {
95+ GlobalState .log(" Destroy service engine" )
9596 withContext(Dispatchers .Main ) {
9697 runCatching {
9798 serviceFlutterEngine?.destroy()
@@ -103,10 +104,12 @@ object State {
103104
104105 suspend fun startServiceWithEngine () {
105106 runLock.withLock {
106- if (serviceFlutterEngine != null || runStateFlow.value == RunState .PENDING || runStateFlow.value == RunState .START ) {
107+ if (runStateFlow.value == RunState .PENDING || runStateFlow.value == RunState .START ) {
107108 return
108109 }
110+ GlobalState .log(" Create service engine" )
109111 withContext(Dispatchers .Main ) {
112+ serviceFlutterEngine?.destroy()
110113 serviceFlutterEngine = FlutterEngine (GlobalState .application)
111114 serviceFlutterEngine?.plugins?.add(ServicePlugin ())
112115 serviceFlutterEngine?.plugins?.add(AppPlugin ())
Original file line number Diff line number Diff line change 3333)
3434
3535func handleInitClash (paramsString string ) bool {
36+ runLock .Lock ()
37+ defer runLock .Unlock ()
3638 var params = InitParams {}
3739 err := json .Unmarshal ([]byte (paramsString ), & params )
3840 if err != nil {
@@ -41,6 +43,11 @@ func handleInitClash(paramsString string) bool {
4143 version = params .Version
4244 if ! isInit {
4345 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)
4451 isInit = true
4552 }
4653 return isInit
Original file line number Diff line number Diff line change @@ -962,7 +962,7 @@ class AppController {
962962 final res = await futureFunction ();
963963 return res;
964964 } catch (e) {
965- commonPrint.log ('$futureFunction ===> $e ' , logLevel: LogLevel .warning);
965+ commonPrint.log ('$title ===> $e ' , logLevel: LogLevel .warning);
966966 if (realSilence) {
967967 globalState.showNotifier (e.toString ());
968968 } else {
Original file line number Diff line number Diff line change @@ -40,8 +40,8 @@ Future<void> _service(List<String> flags) async {
4040 final clashConfig = globalState.config.patchClashConfig.copyWith.tun (
4141 enable: false ,
4242 );
43- await globalState.handleStart ();
4443 await coreController.setupConfig (clashConfig);
44+ await globalState.handleStart ();
4545 });
4646}
4747
Original file line number Diff line number Diff line change @@ -147,7 +147,8 @@ class ProviderItem extends StatelessWidget {
147147 crossAxisAlignment: CrossAxisAlignment .start,
148148 children: [
149149 const SizedBox (height: 4 ),
150- Text (_buildProviderDesc ()),
150+ if (provider.updateAt.microsecondsSinceEpoch > 0 )
151+ Text (_buildProviderDesc ()),
151152 const SizedBox (height: 4 ),
152153 if (provider.subscriptionInfo != null )
153154 SubscriptionInfoView (subscriptionInfo: provider.subscriptionInfo),
Original file line number Diff line number Diff line change 11name : fl_clash
22description : A multi-platform proxy client based on ClashMeta, simple and easy to use, open-source and ad-free.
33publish_to : ' none'
4- version : 0.8.89+2025092701
4+ version : 0.8.90+2025092801
55environment :
66 sdk : ' >=3.8.0 <4.0.0'
77
You can’t perform that action at this time.
0 commit comments