Daniel 2025-08-22 19:10:34 +08:00
parent 8a6922b56f
commit b14f057a76
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 35 additions and 14 deletions

View file

@ -16,7 +16,7 @@ var (
attributeViewRelationsLock = sync.Mutex{}
)
func GetSrcAvIDs(destAvID string) []string {
func GetSrcAvIDs(destAvID string, excludeSelfAv bool) []string {
attributeViewRelationsLock.Lock()
defer attributeViewRelationsLock.Unlock()
@ -42,8 +42,9 @@ func GetSrcAvIDs(destAvID string) []string {
return nil
}
// 排除自己
srcAvIDs = gulu.Str.RemoveElem(srcAvIDs, destAvID)
if excludeSelfAv {
srcAvIDs = gulu.Str.RemoveElem(srcAvIDs, destAvID)
}
return srcAvIDs
}