Skip to content

Commit 1fc3867

Browse files
committed
Code comment cleanup + README and screenshots
1 parent 1285ebd commit 1fc3867

File tree

10 files changed

+15
-16
lines changed

10 files changed

+15
-16
lines changed

README.md

+15-10
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,28 @@
44

55
## :scroll: Description
66

7-
TODO
7+
This app lists timers to launch at will for different needs.
8+
Each unit has its own indicator (for hours, minutes and seconds).
89

910
## :bulb: Motivation and Context
1011

11-
TODO
12+
The main idea was to bring a really visual way to represent time, using distinct progress for each units with its own nested color circles.
13+
It was tough to deal with time arithmetic and smooth animation each seconds.
14+
15+
I'm kind of satisfied by final visual even if not perfect.
16+
I learn a lot with this challenge #2 (Animation, backdrop (incl. conceal/reveal using `rememberCoroutineScope`), time arithmetic, canvas composable, custom font, `LazyColumn.stickyHeader`).
1217

1318
## :camera_flash: Screenshots
1419

15-
## 🌞 Light Mode
16-
List | Details | Tablet
17-
--- | --- | --- |
18-
<img src="/results/screenshot_1.png" width="260"> | <img src="/results/screenshot_2.png" width="260"> | <img src="/results/screenshot_3.png" width="520">
20+
### 🌞 Light Mode
21+
Active timer | Timers
22+
--- | --- |
23+
<img src="results/screenshot_1.png" width="260"> | <img src="results/screenshot_2.png" width="260">
1924

20-
## 🌚 Dark Mode
21-
List | Details | Tablet
22-
--- | --- | --- |
23-
<img src="/results/screenshot_1_dark.png" width="260"> | <img src="/results/screenshot_2_dark.png" width="260"> | <img src="/results/screenshot_3_dark.png" width="520">
25+
### 🌚 Dark Mode
26+
Active timer | Timers
27+
--- | --- |
28+
<img src="results/screenshot_1_dark.png" width="260"> | <img src="results/screenshot_2_dark.png" width="260">
2429

2530
## License
2631
```

app/src/main/java/net/opatry/countdowntimer/CounterViewModel.kt

-2
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ class CounterViewModel(private val mainDispatcher: CoroutineDispatcher = Dispatc
8585

8686
fun start(timer: Timer) {
8787
viewModelScope.launch(mainDispatcher) {
88-
// TODO review poor state & timers modeling
89-
// keep list of timers up to date keeping last used first
9088
_timers.value = buildList {
9189
add(timer)
9290
val timers = _timers.value?.filterNot { it == timer }

app/src/main/java/net/opatry/countdowntimer/ui/component/TimerCircle.kt

-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ fun TimerCircle(
6565
tickInterval: Duration,
6666
onFABClicked: () -> Unit
6767
) {
68-
// TODO animate card size when reaching 0 to make it wrapping the FAB
6968
Card(
7069
Modifier
7170
.padding(16.dp)

app/src/main/java/net/opatry/countdowntimer/ui/component/TimerLabel.kt

-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ fun TimerLabel(hours: Int, minutes: Int, seconds: Int) {
4444
Text(
4545
// FIXME text "moves" because it's not a monospaced font, how could we make each "bucket" of 2-digits stable in size?
4646
buildAnnotatedString {
47-
// TODO padded string 2 digits, pad number with alpha
48-
// TODO transition anim alpha of pad number when changing from 0 to N or N to 0
4947
withStyle(style = SpanStyle(color = DurationUnit.HOURS.color)) {
5048
append(hours.pad0())
5149
}

app/src/main/java/net/opatry/countdowntimer/ui/component/TimerList.kt

-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ fun TimerListItem(timer: Timer, onTimerClicked: (Timer) -> Unit) {
110110

111111
Text(
112112
buildAnnotatedString {
113-
// FIXME shouldn't come from string resource for proper localization?
114113
if (timer.name != null) {
115114
append(timer.name)
116115
} else {

results/screenshot_1.png

121 KB
Loading

results/screenshot_1_dark.png

115 KB
Loading

results/screenshot_2.png

140 KB
Loading

results/screenshot_2_dark.png

147 KB
Loading

results/video.mp4

6.76 MB
Binary file not shown.

0 commit comments

Comments
 (0)