-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPomodoroMode.kt
More file actions
48 lines (44 loc) · 1.13 KB
/
PomodoroMode.kt
File metadata and controls
48 lines (44 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package com.github.akshayashokcode.devfocus.model
enum class PomodoroMode(
val displayName: String,
val emoji: String,
val sessionMinutes: Int,
val breakMinutes: Int,
val sessionsPerRound: Int
) {
CLASSIC(
displayName = "Classic Pomodoro",
emoji = "🍅",
sessionMinutes = 25,
breakMinutes = 5,
sessionsPerRound = 4
),
DEEP_WORK(
displayName = "Deep Work",
emoji = "⚡",
sessionMinutes = 52,
breakMinutes = 17,
sessionsPerRound = 3
),
CUSTOM(
displayName = "Custom",
emoji = "⚙️",
sessionMinutes = 25,
breakMinutes = 5,
sessionsPerRound = 4
);
fun toSettings(): PomodoroSettings {
return PomodoroSettings(
mode = this,
sessionMinutes = sessionMinutes,
breakMinutes = breakMinutes,
sessionsPerRound = sessionsPerRound
)
}
fun getDescription(): String {
return "$sessionMinutes min work • $breakMinutes min break"
}
override fun toString(): String {
return "$emoji $displayName"
}
}