remove dead code
This commit is contained in:
parent
d2b531f953
commit
105aed226d
5 changed files with 37 additions and 84 deletions
|
|
@ -1,3 +0,0 @@
|
||||||
## 1.0.0
|
|
||||||
|
|
||||||
- Initial version.
|
|
||||||
8
JUSTFILE
8
JUSTFILE
|
|
@ -1,8 +0,0 @@
|
||||||
test:
|
|
||||||
curl --unix-socket ./socket http:/./ -X POST -d '{"email": "foo@henryhiles.com", "username": "name"}'
|
|
||||||
|
|
||||||
watch:
|
|
||||||
dart run build_runner watch
|
|
||||||
|
|
||||||
build:
|
|
||||||
dart run build_runner build
|
|
||||||
19
flake.nix
19
flake.nix
|
|
@ -4,19 +4,28 @@
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs:
|
outputs =
|
||||||
|
inputs:
|
||||||
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
||||||
systems = ["x86_64-linux" "aarch64-linux"];
|
systems = [
|
||||||
perSystem = {
|
"x86_64-linux"
|
||||||
|
"aarch64-linux"
|
||||||
|
];
|
||||||
|
perSystem =
|
||||||
|
{
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
system,
|
system,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
_module.args.pkgs = import inputs.nixpkgs { inherit system; };
|
_module.args.pkgs = import inputs.nixpkgs { inherit system; };
|
||||||
|
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
packages = with pkgs; [just dart watchexec];
|
packages = with pkgs; [
|
||||||
|
just
|
||||||
|
dart
|
||||||
|
];
|
||||||
LD_LIBRARY_PATH = "${pkgs.lib.makeLibraryPath (with pkgs; [ sqlite ])}:$LD_LIBRARY_PATH";
|
LD_LIBRARY_PATH = "${pkgs.lib.makeLibraryPath (with pkgs; [ sqlite ])}:$LD_LIBRARY_PATH";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
@ -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,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue