Skip to content

Commit 49742db

Browse files
committed
improve quitter text
1 parent 2eaeb9a commit 49742db

3 files changed

Lines changed: 13 additions & 6 deletions

File tree

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
package neth.iecal.trease
22

33
object Constants {
4-
val cdn = "https://trease-focus.github.io/cache-trees-cdn"
4+
val isDebugBuild:Boolean = false
5+
val cdn = "https://trease-focus.github.io/cache-trees-cdn"
56
val preOwnedTrees = listOf("tree")
7+
8+
var default_quitter_text =
9+
"I am walking away from my promises. I admit my comfort is worth more than my future. I choose to be mediocre."
10+
init {
11+
if (isDebugBuild) {
12+
default_quitter_text = ""
13+
}
14+
}
615
}

composeApp/src/commonMain/kotlin/neth/iecal/trease/ui/dialogs/AppInfoDialog.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ fun AppInfoDialog(onDismiss: () -> Unit) {
6666
Spacer(Modifier.size(8.dp))
6767

6868

69-
7069
Text("I’m Nethical, the 17-year-old developer behind Digipaws, Questphone, and Trease.\n" +
7170
"\n" +
7271
"I was tired of seeing essential tools locked behind greedy paywalls, so I built these free, open-source alternatives to empower masses.\n" +

composeApp/src/commonMain/kotlin/neth/iecal/trease/ui/dialogs/WarningBeforeQuit.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import androidx.compose.ui.text.style.TextAlign
3636
import androidx.compose.ui.text.withStyle
3737
import androidx.compose.ui.unit.dp
3838
import androidx.compose.ui.window.Dialog
39+
import neth.iecal.trease.Constants
3940
import neth.iecal.trease.viewmodels.HomeScreenViewModel
4041
import org.jetbrains.compose.resources.painterResource
4142
import trease.composeapp.generated.resources.Res
@@ -51,14 +52,12 @@ fun WarningBeforeQuit(
5152
val timeRemaining by viewModel.remainingSeconds.collectAsState()
5253
val goalFocus by viewModel.selectedMinutes.collectAsState()
5354

54-
// Logic to calculate elapsed time
5555
val elapsedSeconds = (goalFocus * 60L) - timeRemaining
5656
val elapsedFormatted = viewModel.formatTime(elapsedSeconds)
5757

58-
// Validation State
5958
var typeText by remember { mutableStateOf("") }
60-
val quitterText by remember { mutableStateOf("I am nub") }
61-
val isMatch = typeText == quitterText
59+
val quitterText by remember { mutableStateOf(Constants.default_quitter_text) }
60+
val isMatch = typeText.equals(quitterText, ignoreCase = true)
6261

6362
Dialog(onDismissRequest = { onDismissed() }) {
6463
Card(

0 commit comments

Comments
 (0)