♻️ Replace storage token engine to prevent some platform specific issue

This commit is contained in:
2024-11-23 19:54:38 +08:00
parent dfd80021b9
commit 3cd08da3b6
11 changed files with 53 additions and 83 deletions

View File

@ -151,7 +151,7 @@ class _LoginCheckScreenState extends State<_LoginCheckScreen> {
});
final atk = tokenResp.data['access_token'];
final rtk = tokenResp.data['refresh_token'];
await sn.setTokenPair(atk, rtk);
sn.setTokenPair(atk, rtk);
if (!mounted) return;
final user = context.read<UserProvider>();
final userinfo = await user.refreshUser();

View File

@ -74,6 +74,15 @@ class _PostSearchScreenState extends State<PostSearchScreen> {
if (mounted) setState(() => _isBusy = false);
}
void _showAdvancedSearchTune() {
showModalBottomSheet(
context: context,
builder: (context) => Column(
children: [],
),
);
}
@override
Widget build(BuildContext context) {
const labelShadows = <Shadow>[
@ -87,11 +96,17 @@ class _PostSearchScreenState extends State<PostSearchScreen> {
return Scaffold(
appBar: AppBar(
title: Text('screenPostSearch').tr(),
actions: [
IconButton(
icon: const Icon(Symbols.tune),
onPressed: _showAdvancedSearchTune,
),
],
),
body: Stack(
children: [
InfiniteList(
padding: const EdgeInsets.only(top: 96),
padding: const EdgeInsets.only(top: 100),
itemCount: _posts.length,
isLoading: _isBusy,
hasReachedMax: _postCount != null && _posts.length >= _postCount!,