🚀 Launch bug hotfix +79

This commit is contained in:
LittleSheep 2025-03-09 15:22:25 +08:00
parent 88396647f3
commit 9d4ce6ca8c
3 changed files with 12 additions and 3 deletions

View File

@ -33,7 +33,7 @@ class UserDirectoryProvider {
Future<List<SnAccount?>> listAccount(Iterable<dynamic> id) async {
// In-memory cache
if (_cacheExpiredAt != null && _cacheExpiredAt!.isAfter(DateTime.now())) {
if (_cacheExpiredAt != null && _cacheExpiredAt!.isBefore(DateTime.now())) {
_cache.clear();
_cacheExpiredAt = DateTime.now().add(const Duration(hours: 1));
} else {

View File

@ -5,10 +5,12 @@ import 'package:gap/gap.dart';
import 'package:go_router/go_router.dart';
import 'package:material_symbols_icons/symbols.dart';
import 'package:provider/provider.dart';
import 'package:responsive_framework/responsive_framework.dart';
import 'package:styled_widget/styled_widget.dart';
import 'package:surface/providers/post.dart';
import 'package:surface/providers/sn_network.dart';
import 'package:surface/providers/sn_realm.dart';
import 'package:surface/providers/userinfo.dart';
import 'package:surface/types/post.dart';
import 'package:surface/types/realm.dart';
import 'package:surface/widgets/account/account_image.dart';
@ -75,6 +77,8 @@ class _ExploreScreenState extends State<ExploreScreen>
Future<void> _fetchRealms() async {
try {
final ua = context.read<UserProvider>();
if (!ua.isAuthorized) return;
final rels = context.read<SnRealmProvider>();
final out = await rels.listAvailableRealms();
setState(() {
@ -219,10 +223,15 @@ class _ExploreScreenState extends State<ExploreScreen>
SliverOverlapAbsorber(
handle: NestedScrollView.sliverOverlapAbsorberHandleFor(context),
sliver: SliverAppBar(
leading: AutoAppBarLeading(),
leading:
ResponsiveBreakpoints.of(context).smallerOrEqualTo(MOBILE)
? AutoAppBarLeading()
: null,
titleSpacing: 0,
title: Row(
children: [
if (ResponsiveBreakpoints.of(context).largerThan(MOBILE))
const Gap(8),
IconButton(
icon: const Icon(Symbols.shuffle),
onPressed: () {

View File

@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 2.4.2+78
version: 2.4.2+79
environment:
sdk: ^3.5.4