Merge pull request #180 from losiu97/fix/add-match-none

BUGFIX add MATCH_NONE to tag matching options
This commit is contained in:
Anton Stubenbord
2023-06-02 15:04:12 +02:00
committed by GitHub
7 changed files with 58 additions and 65 deletions

View File

@@ -104,7 +104,7 @@ class LocalMockApiServer {
"name": body?['name'],
"color": body?['color'],
"text_color": "#000000",
"match": "",
"match": body?['match'],
"matching_algorithm": body?['matching_algorithm'],
"is_insensitive": body?['is_insensitive'],
"is_inbox_tag": false,
@@ -129,7 +129,7 @@ class LocalMockApiServer {
"name": body?['name'],
"color": body?['color'],
"text_color": "#000000",
"match": "",
"match": body?['match'],
"matching_algorithm": body?['matching_algorithm'],
"is_insensitive": body?['is_insensitive'],
"is_inbox_tag": false,

View File

@@ -13,7 +13,7 @@ dependencies:
logging: ^1.1.1
flutter:
sdk: flutter
http: ^1.0.0
http: ^0.13.4
dev_dependencies:
flutter_test:

View File

@@ -15,7 +15,7 @@ abstract class Label extends Equatable implements Comparable {
final int? id;
final String name;
final String? slug;
final String? match;
final String match;
final MatchingAlgorithm matchingAlgorithm;
final bool? isInsensitive;
final int? documentCount;
@@ -26,7 +26,7 @@ abstract class Label extends Equatable implements Comparable {
this.id,
required this.name,
this.matchingAlgorithm = MatchingAlgorithm.defaultValue,
this.match,
this.match = "",
this.isInsensitive = true,
this.documentCount,
this.slug,

View File

@@ -2,6 +2,7 @@ import 'package:json_annotation/json_annotation.dart';
@JsonEnum(valueField: 'value')
enum MatchingAlgorithm {
none(0, "None: Disable matching"),
anyWord(1, "Any: Match one of the following words"),
allWords(2, "All: Match all of the following words"),
exactMatch(3, "Exact: Match the following string"),