Skip to content

Commit ab4ea7e

Browse files
fix ToggleGroupByDateUnitAction
1 parent 6944c82 commit ab4ea7e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Files.App/Actions/Display/GroupAction.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,12 @@ public ToggleGroupByDateUnitAction()
615615

616616
public Task ExecuteAsync()
617617
{
618-
context.GroupByDateUnit = context.GroupByDateUnit is GroupByDateUnit.Month ? GroupByDateUnit.Year : GroupByDateUnit.Month;
618+
context.GroupByDateUnit = context.GroupByDateUnit switch
619+
{
620+
GroupByDateUnit.Year => GroupByDateUnit.Month,
621+
GroupByDateUnit.Month => GroupByDateUnit.Day,
622+
_ => GroupByDateUnit.Year
623+
};
619624

620625
return Task.CompletedTask;
621626
}

0 commit comments

Comments
 (0)