remove dead code

This commit is contained in:
Henry Hiles 2025-11-11 21:22:29 -05:00
commit 105aed226d
No known key found for this signature in database
5 changed files with 37 additions and 84 deletions

View file

@ -1,33 +0,0 @@
import "dart:io";
import "package:matrix/matrix.dart";
import "package:nexusbot/controllers/settings_controller.dart";
import "package:riverpod/riverpod.dart";
import "package:sqflite_common_ffi/sqflite_ffi.dart";
class ClientController extends AsyncNotifier<Client> {
@override
Future<Client> build() async {
final settings = ref.watch(SettingsController.provider)!;
final client = Client(
"nexusbot",
database: await MatrixSdkDatabase.init(
"NexusBot",
database: await databaseFactoryFfi.openDatabase(inMemoryDatabasePath),
),
);
await client.checkHomeserver(settings.homeserver);
await client.login(
LoginType.mLoginPassword,
identifier: AuthenticationUserIdentifier(user: settings.name),
password: (await File(settings.botPasswordFile).readAsString()).trim(),
);
return client;
}
static final provider = AsyncNotifierProvider<ClientController, Client>(
ClientController.new,
);
}

View file

@ -1,12 +0,0 @@
import "package:riverpod/riverpod.dart";
class LastSyncedController extends Notifier<String?> {
@override
String? build() => null;
void set(String value) => state = value;
static final provider = NotifierProvider<LastSyncedController, String?>(
LastSyncedController.new,
);
}