Shorten long inline comments
This commit is contained in:
1 parent
1a83dedff9
commit
22b95298e2
4 files changed
+6
-16
No files matched your search
@@ -164,9 +164,7 @@ object VTodoMapper {
|
||||
// date/date-time pair into two DATEs and destroys the time half.
|
||||
val allDay = if (due.present) due.isDate else dtstart.isDate
|
||||
val timezone = dtstart.tzid ?: due.tzid
|
||||
// One end without a time beside a timed one (#101), marked on the
|
||||
// date-time that stands in for its date, in the zone the task is read in.
|
||||
// A lone marked end has no timed one beside it: not ours to read, it stays as it arrived.
|
||||
// An end without a time beside a timed one (#101); a lone marked end stays as it arrived.
|
||||
val untimed = when {
|
||||
allDay || dtstart.noTime == due.noTime -> null
|
||||
!dtstart.present || !due.present -> null
|
||||
@@ -582,8 +580,7 @@ object VTodoMapper {
|
||||
if (wall != null) {
|
||||
TimeRead(property, untimedInstantOf(end!!, wall.toLocalDate(), zoneOr(zoneHint)), zoneHint, false, true, noTime = true)
|
||||
} else {
|
||||
// Readable but not reproducible: the column gets the best-effort
|
||||
// instant, the property round-trips from the residue verbatim.
|
||||
// Readable but not reproducible: best-effort column, verbatim residue.
|
||||
TimeRead(property, value.instant, null, false, false)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-2
@@ -157,8 +157,7 @@ object ProviderTaskWriter {
|
||||
due = due,
|
||||
duration = duration,
|
||||
isAllDay = allDay,
|
||||
// A client sees and writes this end as a time; one it moves, a new
|
||||
// zone, or a switch to all-day, is its own value from then on.
|
||||
// Moved, re-zoned or made all-day by a client, the end has a time from then on.
|
||||
untimed = current.untimed?.takeUnless { end ->
|
||||
allDay || timezone != current.timezone || when (end) {
|
||||
TaskEnd.START -> dtstart != current.dtstart
|
||||
|
||||
@@ -314,9 +314,7 @@ private fun EditContent(
|
||||
|
||||
Spacer(Modifier.height(20.dp))
|
||||
|
||||
// "When" card: the icon centres on the start row (header); the due row
|
||||
// continues below in the same text column. Each end has its own "No
|
||||
// time", so there is no all-day switch (#101).
|
||||
// "When" card: each end has its own "No time", so no all-day switch (#101).
|
||||
EditCard(
|
||||
icon = Icons.Rounded.Schedule,
|
||||
iconContentDescription = stringResource(R.string.edit_when),
|
||||
|
||||
@@ -352,10 +352,7 @@ fun TaskListScreen(
|
||||
.height(SnackChipHeight),
|
||||
contentAlignment = Alignment.CenterStart,
|
||||
) {
|
||||
// One chip, one anchor, in priority order: the undo receipt first,
|
||||
// then a refused list write once the undo window is clear, then the
|
||||
// outcome of an add or reopen from search, then the read-only edit
|
||||
// hint — the quietest, so it never outranks what the others report.
|
||||
// One chip, in priority order: undo, a refused list write, a search outcome, the read-only hint.
|
||||
val failure = listWriteFailure
|
||||
when {
|
||||
undo != null -> SnackChip(
|
||||
@@ -473,8 +470,7 @@ private fun TaskListBody(
|
||||
listOrder = state.listOrder,
|
||||
)
|
||||
}
|
||||
// A grouping the user picked keeps its header even when everything lands in
|
||||
// one group — unless that group is Done, which starts folded.
|
||||
// A picked grouping keeps its header for a single group, unless that is Done.
|
||||
val showHeaders = groups.size > 1 ||
|
||||
(state.grouping != TaskGrouping.DUE && groups.singleOrNull()?.key.let { it != null && it != TaskGroupKey.COMPLETED })
|
||||
// Lists sharing a name (one per account) are told apart by their account.
|
||||
|
||||
Reference in new issue
Block a user