Fix bugs
This commit is contained in:
@@ -23,7 +23,6 @@ class AppRepositoryImpl
|
|||||||
version: packageInfo.version,
|
version: packageInfo.version,
|
||||||
buildNumber: packageInfo.buildNumber,
|
buildNumber: packageInfo.buildNumber,
|
||||||
release: Release.read(),
|
release: Release.read(),
|
||||||
installerMedia: packageInfo.installerStore,
|
|
||||||
operatingSystem: Platform.operatingSystem,
|
operatingSystem: Platform.operatingSystem,
|
||||||
operatingSystemVersion: Platform.operatingSystemVersion,
|
operatingSystemVersion: Platform.operatingSystemVersion,
|
||||||
environment: environment,
|
environment: environment,
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ class CoreFacadeImpl with ExceptionHandler, InfraLogger implements CoreFacade {
|
|||||||
) {
|
) {
|
||||||
return exceptionHandler(
|
return exceptionHandler(
|
||||||
() {
|
() {
|
||||||
loggy.debug("changing config options: $options");
|
loggy.info("changing config options: ${options.format()}");
|
||||||
return singbox
|
return singbox
|
||||||
.changeConfigOptions(options)
|
.changeConfigOptions(options)
|
||||||
.mapLeft(CoreServiceFailure.invalidConfigOptions)
|
.mapLeft(CoreServiceFailure.invalidConfigOptions)
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ class AppInfo with _$AppInfo {
|
|||||||
required String version,
|
required String version,
|
||||||
required String buildNumber,
|
required String buildNumber,
|
||||||
required Release release,
|
required Release release,
|
||||||
String? installerMedia,
|
|
||||||
required String operatingSystem,
|
required String operatingSystem,
|
||||||
required String operatingSystemVersion,
|
required String operatingSystemVersion,
|
||||||
required Environment environment,
|
required Environment environment,
|
||||||
@@ -28,8 +27,8 @@ class AppInfo with _$AppInfo {
|
|||||||
|
|
||||||
/// formats app info for sharing
|
/// formats app info for sharing
|
||||||
String format() => '''
|
String format() => '''
|
||||||
$name v$version ($buildNumber) ${environment.name}
|
$name v$version ($buildNumber) [${environment.name}]
|
||||||
${release.name} release ${installerMedia != null ? "via $installerMedia" : ""}
|
${release.name} release
|
||||||
$operatingSystem [$operatingSystemVersion]''';
|
$operatingSystem [$operatingSystemVersion]''';
|
||||||
|
|
||||||
factory AppInfo.fromJson(Map<String, dynamic> json) =>
|
factory AppInfo.fromJson(Map<String, dynamic> json) =>
|
||||||
|
|||||||
@@ -23,6 +23,15 @@ sealed class ConnectionStatus with _$ConnectionStatus {
|
|||||||
_ => false,
|
_ => false,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
String format() => switch (this) {
|
||||||
|
Disconnected(:final connectionFailure) => connectionFailure != null
|
||||||
|
? "CONNECTION FAILURE: $connectionFailure"
|
||||||
|
: "DISCONNECTED",
|
||||||
|
Connecting() => "CONNECTING",
|
||||||
|
Connected() => "CONNECTED",
|
||||||
|
Disconnecting() => "DISCONNECTING",
|
||||||
|
};
|
||||||
|
|
||||||
String present(TranslationsEn t) => switch (this) {
|
String present(TranslationsEn t) => switch (this) {
|
||||||
Disconnected() => t.home.connection.tapToConnect,
|
Disconnected() => t.home.connection.tapToConnect,
|
||||||
Connecting() => t.home.connection.connecting,
|
Connecting() => t.home.connection.connecting,
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import 'package:hiddify/domain/core_facade.dart';
|
|||||||
import 'package:hiddify/features/common/active_profile/active_profile_notifier.dart';
|
import 'package:hiddify/features/common/active_profile/active_profile_notifier.dart';
|
||||||
import 'package:hiddify/utils/utils.dart';
|
import 'package:hiddify/utils/utils.dart';
|
||||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||||
|
import 'package:rxdart/rxdart.dart';
|
||||||
|
|
||||||
part 'connectivity_controller.g.dart';
|
part 'connectivity_controller.g.dart';
|
||||||
|
|
||||||
@@ -21,7 +22,9 @@ class ConnectivityController extends _$ConnectivityController with AppLogger {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
return _core.watchConnectionStatus();
|
return _core.watchConnectionStatus().doOnData((event) {
|
||||||
|
loggy.info("connection status: ${event.format()}");
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
CoreFacade get _core => ref.watch(coreFacadeProvider);
|
CoreFacade get _core => ref.watch(coreFacadeProvider);
|
||||||
|
|||||||
@@ -120,11 +120,13 @@ class ProfileTile extends HookConsumerWidget {
|
|||||||
Flexible(
|
Flexible(
|
||||||
child: Text(
|
child: Text(
|
||||||
profile.name,
|
profile.name,
|
||||||
|
maxLines: 2,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
style: theme.textTheme.titleMedium,
|
||||||
semanticsLabel: t.profile
|
semanticsLabel: t.profile
|
||||||
.activeProfileNameSemanticLabel(
|
.activeProfileNameSemanticLabel(
|
||||||
name: profile.name,
|
name: profile.name,
|
||||||
),
|
),
|
||||||
style: theme.textTheme.titleMedium,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const Icon(Icons.arrow_drop_down),
|
const Icon(Icons.arrow_drop_down),
|
||||||
@@ -135,6 +137,9 @@ class ProfileTile extends HookConsumerWidget {
|
|||||||
else
|
else
|
||||||
Text(
|
Text(
|
||||||
profile.name,
|
profile.name,
|
||||||
|
maxLines: 2,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
style: theme.textTheme.titleMedium,
|
||||||
semanticsLabel: profile.active
|
semanticsLabel: profile.active
|
||||||
? t.profile.activeProfileNameSemanticLabel(
|
? t.profile.activeProfileNameSemanticLabel(
|
||||||
name: profile.name,
|
name: profile.name,
|
||||||
@@ -142,7 +147,6 @@ class ProfileTile extends HookConsumerWidget {
|
|||||||
: t.profile.nonActiveProfileBtnSemanticLabel(
|
: t.profile.nonActiveProfileBtnSemanticLabel(
|
||||||
name: profile.name,
|
name: profile.name,
|
||||||
),
|
),
|
||||||
style: theme.textTheme.titleMedium,
|
|
||||||
),
|
),
|
||||||
if (subInfo != null) ...[
|
if (subInfo != null) ...[
|
||||||
const Gap(4),
|
const Gap(4),
|
||||||
|
|||||||
2
libcore
2
libcore
Submodule libcore updated: dced5a30d0...b36fab34ec
Reference in New Issue
Block a user