mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-18 07:44:26 +01:00
migrate: riverpod 3
This commit is contained in:
@@ -45,7 +45,7 @@ abstract class ServerState with _$ServerState {
|
||||
class ServerNotifier extends _$ServerNotifier {
|
||||
@override
|
||||
ServerState build(String serverId) {
|
||||
final serverNotifier = ref.read(serversNotifierProvider);
|
||||
final serverNotifier = ref.read(serversProvider);
|
||||
final spi = serverNotifier.servers[serverId];
|
||||
if (spi == null) {
|
||||
throw StateError('Server $serverId not found');
|
||||
@@ -160,7 +160,7 @@ class ServerNotifier extends _$ServerNotifier {
|
||||
id: sessionId,
|
||||
spi: spi,
|
||||
startTimeMs: time1.millisecondsSinceEpoch,
|
||||
disconnect: () => ref.read(serversNotifierProvider.notifier).closeOneServer(spi.id),
|
||||
disconnect: () => ref.read(serversProvider.notifier).closeOneServer(spi.id),
|
||||
status: TermSessionStatus.connecting,
|
||||
);
|
||||
TermSessionManager.setActive(sessionId, hasTerminal: false);
|
||||
|
||||
Reference in New Issue
Block a user