Skip to content

Commit

Permalink
Merge branch 'beta'
Browse files Browse the repository at this point in the history
  • Loading branch information
gentee committed Nov 15, 2021
2 parents 0a2d22e + 7c92336 commit 16fc5fd
Show file tree
Hide file tree
Showing 28 changed files with 801 additions and 14,375 deletions.
9 changes: 9 additions & 0 deletions api.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ func tasksHandle(c echo.Context) error {
taskFlag = role.Tasks
}
}
dup := make(map[string]bool)
for _, item := range list {
var finish string
if item.FinishTime > 0 {
Expand All @@ -209,6 +210,14 @@ func tasksHandle(c echo.Context) error {
(taskFlag&0x200 == 0x200 && user.RoleID == item.RoleID)
var userName, roleName string
userName, roleName = GetUserRole(item.UserID, item.RoleID)
if storage.Settings.HideDupTasks && item.Status >= TaskFinished && !item.Locked {
key := fmt.Sprintf(`%d%s%s`, item.Status, item.Name, userName)
if dup[key] {
continue
} else {
dup[key] = true
}
}
listInfo = append(listInfo, TaskInfo{
ID: item.ID,
Status: item.Status,
Expand Down
Loading

0 comments on commit 16fc5fd

Please sign in to comment.