hive切换hive_ce

This commit is contained in:
rang 2025-12-22 15:04:04 +08:00
parent 3362a254ff
commit 6efa41e035
30 changed files with 1403 additions and 2566 deletions

View file

@ -30,12 +30,12 @@ class ApiSettings extends _$ApiSettings {
var foundSettings = _box.getAt(0);
// foundSettings.activeServer ??= foundSettings.activeUser?.server;
// foundSettings =foundSettings.copyWith(activeServer: foundSettings.activeUser?.server);
if (foundSettings.activeServer == null) {
foundSettings = foundSettings.copyWith(
if (foundSettings?.activeServer == null) {
foundSettings = foundSettings!.copyWith(
activeServer: foundSettings.activeUser?.server,
);
}
_logger.fine('found api settings in box: ${foundSettings.obfuscate()}');
_logger.fine('found api settings in box: ${foundSettings!.obfuscate()}');
return foundSettings;
} else {
// create a new settings object

View file

@ -6,7 +6,7 @@ part of 'api_settings_provider.dart';
// RiverpodGenerator
// **************************************************************************
String _$apiSettingsHash() => r'5bc1e16e9d72b77fb10637aabadf08e8947da580';
String _$apiSettingsHash() => r'd7aff154cb65b0396df3ccfe25c59dedb56226fa';
/// See also [ApiSettings].
@ProviderFor(ApiSettings)

View file

@ -34,7 +34,7 @@ class AppSettings extends _$AppSettings {
@override
model.AppSettings build() {
state = loadOrCreateAppSettings();
ref.listenSelf((_, __) {
listenSelf((_, __) {
writeToBox();
});
return state;

View file

@ -6,7 +6,7 @@ part of 'app_settings_provider.dart';
// RiverpodGenerator
// **************************************************************************
String _$appSettingsHash() => r'314d7936f54550f57d308056a99230402342a6d0';
String _$appSettingsHash() => r'744d7e0157eb3b089c4187b35b845fc78547a44e';
/// See also [AppSettings].
@ProviderFor(AppSettings)