mirror of
https://github.com/urosran/cally.git
synced 2025-11-26 08:24:55 +00:00
Reimplementation of the todo take turns feature to fix issues with only one assignee showing
This commit is contained in:
@ -174,7 +174,8 @@ const AddChoreDialog = (addChoreDialogProps: IAddChoreDialog) => {
|
||||
updateToDo({
|
||||
...todo,
|
||||
points: points,
|
||||
assignees: selectedAssignees
|
||||
assignees: selectedAssignees,
|
||||
currentAssignee: selectedAssignees[0],
|
||||
});
|
||||
} else {
|
||||
return;
|
||||
@ -186,6 +187,7 @@ const AddChoreDialog = (addChoreDialogProps: IAddChoreDialog) => {
|
||||
done: false,
|
||||
points: points,
|
||||
assignees: selectedAssignees,
|
||||
currentAssignee: selectedAssignees[0],
|
||||
repeatDays: todo.repeatDays ?? []
|
||||
});
|
||||
} else {
|
||||
|
||||
@ -231,6 +231,13 @@ const ToDoItem = (props: {
|
||||
</View>
|
||||
<View row style={{ gap: 3 }}>
|
||||
{selectedMembers?.map((member) => {
|
||||
|
||||
let currentAssignee = props?.item?.currentAssignee;
|
||||
let opacity = 1;
|
||||
if (selectedMembers?.length > 1 && currentAssignee !== member?.uid) {
|
||||
opacity = 0.4;
|
||||
}
|
||||
|
||||
return member?.pfp ? (
|
||||
<ImageBackground
|
||||
key={member?.uid}
|
||||
@ -242,6 +249,7 @@ const ToDoItem = (props: {
|
||||
overflow: "hidden",
|
||||
borderWidth: 2,
|
||||
borderColor: member.eventColor || "transparent",
|
||||
opacity: opacity
|
||||
}}
|
||||
/>
|
||||
) : (
|
||||
@ -254,6 +262,7 @@ const ToDoItem = (props: {
|
||||
borderWidth: 2,
|
||||
borderRadius: 100,
|
||||
borderColor: member.eventColor || "#ccc",
|
||||
opacity: opacity
|
||||
}}
|
||||
>
|
||||
<View
|
||||
|
||||
Reference in New Issue
Block a user