MeshLogRetention

Decodes MeshLogPrefs.retentionDays, which overloads two sentinels onto the day count: KEEP_FOREVER never prunes and ONE_HOUR keeps only the last hour.

Both sentinels are real user selections rather than "unset", so pruning callers must resolve the window here instead of treating the setting as a plain day count.

Properties

Link copied to clipboard
const val KEEP_FOREVER: Int = 0

Retention setting for "never delete".

Link copied to clipboard
const val ONE_HOUR: Int

Retention setting for "keep the last hour", which cannot be expressed as a whole number of days.

Functions

Link copied to clipboard
fun windowOrNull(retentionDays: Int): Duration?

The retention window for retentionDays, or null when logs are never pruned.