This commit is contained in:
problematicconsumer
2023-10-12 00:27:23 +03:30
parent d6be66e0b0
commit 3fc7d3aff4
7 changed files with 23 additions and 9 deletions

View File

@@ -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/utils/utils.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';
import 'package:rxdart/rxdart.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);

View File

@@ -120,11 +120,13 @@ class ProfileTile extends HookConsumerWidget {
Flexible(
child: Text(
profile.name,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: theme.textTheme.titleMedium,
semanticsLabel: t.profile
.activeProfileNameSemanticLabel(
name: profile.name,
),
style: theme.textTheme.titleMedium,
),
),
const Icon(Icons.arrow_drop_down),
@@ -135,6 +137,9 @@ class ProfileTile extends HookConsumerWidget {
else
Text(
profile.name,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: theme.textTheme.titleMedium,
semanticsLabel: profile.active
? t.profile.activeProfileNameSemanticLabel(
name: profile.name,
@@ -142,7 +147,6 @@ class ProfileTile extends HookConsumerWidget {
: t.profile.nonActiveProfileBtnSemanticLabel(
name: profile.name,
),
style: theme.textTheme.titleMedium,
),
if (subInfo != null) ...[
const Gap(4),