Commit 5c76d47
refactor: extract FormatAge into ModelFormatting, removing duplicate logic (#154)
GatewayNodeInfo and SessionInfo both implemented identical age-formatting
logic (just now / Xm ago / Xh ago / Xd ago). Consolidate into a single
ModelFormatting.FormatAge(DateTime) helper.
- Add ModelFormatting.FormatAge(DateTime timestampUtc)
- SessionInfo.AgeText now delegates to ModelFormatting.FormatAge
- GatewayNodeInfo.FormatAge now delegates to ModelFormatting.FormatAge
- No behaviour change; all existing tests pass (525 Shared, 99 Tray)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <[email protected]>1 parent 2be59b9 commit 5c76d47
File tree
1 file changed
+11
-17
lines changed1 file changed
+11
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
| 233 | + | |
245 | 234 | | |
246 | 235 | | |
247 | 236 | | |
| |||
439 | 428 | | |
440 | 429 | | |
441 | 430 | | |
442 | | - | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
443 | 441 | | |
444 | 442 | | |
445 | 443 | | |
446 | 444 | | |
447 | 445 | | |
448 | 446 | | |
449 | 447 | | |
450 | | - | |
451 | 448 | | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | 449 | | |
456 | 450 | | |
457 | 451 | | |
| |||
0 commit comments