Fix bugs
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
|
||||||
import 'package:hiddify/core/analytics/analytics_controller.dart';
|
import 'package:hiddify/core/analytics/analytics_controller.dart';
|
||||||
import 'package:hiddify/core/localization/locale_extensions.dart';
|
import 'package:hiddify/core/localization/locale_extensions.dart';
|
||||||
import 'package:hiddify/core/localization/locale_preferences.dart';
|
import 'package:hiddify/core/localization/locale_preferences.dart';
|
||||||
@@ -33,7 +32,7 @@ class LocalePrefTile extends HookConsumerWidget {
|
|||||||
title: Text(e.localeName),
|
title: Text(e.localeName),
|
||||||
value: e,
|
value: e,
|
||||||
groupValue: locale,
|
groupValue: locale,
|
||||||
onChanged: (e) => context.pop(e),
|
onChanged: Navigator.of(context).maybePop,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.toList(),
|
.toList(),
|
||||||
@@ -75,7 +74,7 @@ class RegionPrefTile extends HookConsumerWidget {
|
|||||||
title: Text(e.present(t)),
|
title: Text(e.present(t)),
|
||||||
value: e,
|
value: e,
|
||||||
groupValue: region,
|
groupValue: region,
|
||||||
onChanged: (e) => context.pop(e),
|
onChanged: Navigator.of(context).maybePop,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.toList(),
|
.toList(),
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
|
||||||
import 'package:hiddify/core/localization/translations.dart';
|
import 'package:hiddify/core/localization/translations.dart';
|
||||||
import 'package:hiddify/core/preferences/general_preferences.dart';
|
import 'package:hiddify/core/preferences/general_preferences.dart';
|
||||||
import 'package:hiddify/core/router/router.dart';
|
import 'package:hiddify/core/router/router.dart';
|
||||||
@@ -78,7 +77,7 @@ class AdvancedSettingTiles extends HookConsumerWidget {
|
|||||||
content: Text(t.settings.advanced.debugModeMsg),
|
content: Text(t.settings.advanced.debugModeMsg),
|
||||||
actions: [
|
actions: [
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () => context.pop(true),
|
onPressed: () => Navigator.of(context).maybePop(true),
|
||||||
child: Text(
|
child: Text(
|
||||||
MaterialLocalizations.of(context).okButtonLabel,
|
MaterialLocalizations.of(context).okButtonLabel,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
|
||||||
import 'package:hiddify/core/localization/translations.dart';
|
import 'package:hiddify/core/localization/translations.dart';
|
||||||
import 'package:hiddify/core/preferences/general_preferences.dart';
|
import 'package:hiddify/core/preferences/general_preferences.dart';
|
||||||
import 'package:hiddify/core/theme/app_theme_mode.dart';
|
import 'package:hiddify/core/theme/app_theme_mode.dart';
|
||||||
@@ -40,7 +39,7 @@ class GeneralSettingTiles extends HookConsumerWidget {
|
|||||||
title: Text(e.present(t)),
|
title: Text(e.present(t)),
|
||||||
value: e,
|
value: e,
|
||||||
groupValue: themeMode,
|
groupValue: themeMode,
|
||||||
onChanged: (e) => context.pop(e),
|
onChanged: Navigator.of(context).maybePop,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.toList(),
|
.toList(),
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
|
||||||
import 'package:hiddify/core/localization/translations.dart';
|
import 'package:hiddify/core/localization/translations.dart';
|
||||||
import 'package:hiddify/utils/utils.dart';
|
import 'package:hiddify/utils/utils.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
|
|||||||
@@ -29,15 +29,7 @@ class PlatformSingboxService with InfraLogger implements SingboxService {
|
|||||||
final alerts =
|
final alerts =
|
||||||
_alertsChannel.receiveBroadcastStream().map(SingboxStatus.fromEvent);
|
_alertsChannel.receiveBroadcastStream().map(SingboxStatus.fromEvent);
|
||||||
|
|
||||||
loggy.debug("[TLOG] Status first recieved");
|
|
||||||
final _2 = await alerts.first;
|
|
||||||
loggy.debug("[TLOG] alert First recieved");
|
|
||||||
|
|
||||||
final _1 = await status.first;
|
|
||||||
loggy.debug("[TLOG] Waiting for first entry");
|
|
||||||
|
|
||||||
_status = ValueConnectableStream(Rx.merge([status, alerts])).autoConnect();
|
_status = ValueConnectableStream(Rx.merge([status, alerts])).autoConnect();
|
||||||
|
|
||||||
await _status.first;
|
await _status.first;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user