Files
umbrix/lib/features/profile/notifier/active_profile_notifier.dart
Umbrix Developer 76a374950f feat: mobile-like window size and always-visible stats
- Changed window size to mobile phone format (400x800)
- Removed width condition for ActiveProxyFooter - now always visible
- Added run-umbrix.sh launch script with icon copying
- Stats cards now display on all screen sizes
2026-01-17 13:09:20 +03:00

32 lines
918 B
Dart

import 'package:umbrix/features/profile/data/profile_data_providers.dart';
import 'package:umbrix/features/profile/model/profile_entity.dart';
import 'package:umbrix/utils/utils.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';
part 'active_profile_notifier.g.dart';
@Riverpod(keepAlive: true)
class ActiveProfile extends _$ActiveProfile with AppLogger {
@override
Stream<ProfileEntity?> build() {
loggy.debug("watching active profile");
return ref
.watch(profileRepositoryProvider)
.requireValue
.watchActiveProfile()
.map((event) => event.getOrElse((l) => throw l));
}
}
// TODO: move to specific feature
@Riverpod(keepAlive: true)
Stream<bool> hasAnyProfile(
HasAnyProfileRef ref,
) {
return ref
.watch(profileRepositoryProvider)
.requireValue
.watchHasAnyProfile()
.map((event) => event.getOrElse((l) => throw l));
}