add "Untagged" to filter addressbook peers without tags (#10063)

Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
21pages
2024-11-26 20:35:17 +08:00
committed by GitHub
parent 84dab0e96f
commit b99c540210
46 changed files with 85 additions and 18 deletions

View File

@@ -33,6 +33,8 @@ bool filterAbTagByIntersection() {
const _personalAddressBookName = "My address book";
const _legacyAddressBookName = "Legacy address book";
const kUntagged = "Untagged";
enum ForcePullAb {
listAndCurrent,
current,
@@ -424,6 +426,7 @@ class AbModel {
// #region tags
Future<bool> addTags(List<String> tagList) async {
tagList.removeWhere((e) => e == kUntagged);
final ret = await current.addTags(tagList, {});
await pullNonLegacyAfterChange();
_saveCache();