mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
chore: don't show beta switcher if connect to server below 1.136 (#20084)
This commit is contained in:
parent
5548033cae
commit
97daf42fd5
1 changed files with 10 additions and 0 deletions
|
|
@ -1,11 +1,14 @@
|
|||
import 'dart:math' as math;
|
||||
|
||||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
||||
import 'package:immich_mobile/extensions/translate_extensions.dart';
|
||||
import 'package:immich_mobile/providers/app_settings.provider.dart';
|
||||
import 'package:immich_mobile/providers/auth.provider.dart';
|
||||
import 'package:immich_mobile/providers/server_info.provider.dart';
|
||||
import 'package:immich_mobile/routing/router.dart';
|
||||
import 'package:immich_mobile/services/app_settings.service.dart';
|
||||
|
||||
|
|
@ -69,6 +72,13 @@ class _BetaTimelineListTileState extends ConsumerState<BetaTimelineListTile>
|
|||
final betaTimelineValue = ref
|
||||
.watch(appSettingsServiceProvider)
|
||||
.getSetting<bool>(AppSettingsEnum.betaTimeline);
|
||||
final serverInfo = ref.watch(serverInfoProvider);
|
||||
final auth = ref.watch(authProvider);
|
||||
|
||||
if (!auth.isAuthenticated ||
|
||||
(serverInfo.serverVersion.minor < 136 && kReleaseMode)) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
|
||||
return AnimatedBuilder(
|
||||
animation: _animationController,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue