Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyrat committed Feb 21, 2024
1 parent 7d90e9b commit 23cdacf
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
1 change: 1 addition & 0 deletions devtools_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extensions:
18 changes: 10 additions & 8 deletions lib/widgets/entry_integration_settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ class _IntegrationSettingsWidgetState extends State<IntegrationSettingsWidget> {
onChanged: (bool? show) {
if (show != null) {
final cubit = BlocProvider.of<EntryCubit>(context);
final newSettings = entry.browserSettings.copyWith();
newSettings.matcherConfigs
.removeWhere((element) => element.matcherType == EntryMatcherType.Hide);
final newList = entry.browserSettings.matcherConfigs
.where((mc) => mc.matcherType != EntryMatcherType.Hide)
.toList();
if (!show) {
newSettings.matcherConfigs
.add(EntryMatcherConfig(matcherType: EntryMatcherType.Hide));
newList.add(EntryMatcherConfig(matcherType: EntryMatcherType.Hide));
}
final newSettings = entry.browserSettings.copyWith(matcherConfigs: newList);
cubit.update(browserSettings: newSettings);
}
},
Expand Down Expand Up @@ -173,9 +173,11 @@ class _MatchAccuracyRadioWidgetState extends State<MatchAccuracyRadioWidget> wit
void onChanged(MatchAccuracy? value) {
if (value != null) {
final cubit = BlocProvider.of<EntryCubit>(context);
final newSettings = (cubit.state as EntryLoaded).entry.browserSettings.copyWith();
newSettings.matcherConfigs.removeWhere((element) => element.matcherType == EntryMatcherType.Url);
newSettings.matcherConfigs.add(EntryMatcherConfig.forDefaultUrlMatchBehaviour(value));
final entry = (cubit.state as EntryLoaded).entry;
final newList =
entry.browserSettings.matcherConfigs.where((mc) => mc.matcherType != EntryMatcherType.Url).toList();
newList.add(EntryMatcherConfig.forDefaultUrlMatchBehaviour(value));
final newSettings = entry.browserSettings.copyWith(matcherConfigs: newList);
cubit.update(browserSettings: newSettings);
}
}
Expand Down
4 changes: 2 additions & 2 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -530,10 +530,10 @@ packages:
description:
path: "."
ref: configv2
resolved-ref: b24b601a9a47005690c145511acde1e771fef7b9
resolved-ref: a28d62a423cc70a05f8325147b2ea102ffad29a4
url: "https://github.com/kee-org/kdbx.dart.git"
source: git
version: "0.6.0+2"
version: "0.6.0+3"
lints:
dependency: transitive
description:
Expand Down

0 comments on commit 23cdacf

Please sign in to comment.