use cached provider in splash screen

This commit is contained in:
shenlong-tanwen 2026-01-07 08:06:12 +05:30
parent d025966a2b
commit 7e57359d07
2 changed files with 3 additions and 3 deletions

View File

@ -61,8 +61,7 @@ class SplashScreenPageState extends ConsumerState<SplashScreenPage> {
(_) async {
try {
wsProvider.connect();
await infoProvider.getServerInfo();
final serverInfo = ref.read(serverInfoProvider);
final serverInfo = await infoProvider.getServerInfo();
if (Store.isBetaTimelineEnabled) {
bool syncSuccess = false;

View File

@ -32,10 +32,11 @@ class ServerInfoNotifier extends StateNotifier<ServerInfo> {
final ServerInfoService _serverInfoService;
final _log = Logger("ServerInfoNotifier");
Future<void> getServerInfo() async {
Future<ServerInfo> getServerInfo() async {
await getServerVersion();
await getServerFeatures();
await getServerConfig();
return state;
}
Future<void> getServerVersion() async {