Skip to content

Commit

Permalink
Improve goal priority picker (#115)
Browse files Browse the repository at this point in the history
Signed-off-by: starry-shivam <[email protected]>
  • Loading branch information
starry-shivam authored May 3, 2024
1 parent fa819c9 commit 22cb99d
Show file tree
Hide file tree
Showing 6 changed files with 265 additions and 327 deletions.
10 changes: 10 additions & 0 deletions .idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,36 @@ class InputViewModel @Inject constructor(
}
}

// State update functions ==============

fun updatePriority(priority: String) {
state = state.copy(priority = priority)
}

fun updateReminder(reminder: Boolean) {
state = state.copy(reminder = reminder)
}

fun updateTitle(title: String) {
state = state.copy(goalTitleText = title)
}

fun updateTargetAmount(amount: String) {
state = state.copy(targetAmount = amount)
}

fun updateDeadline(deadline: String) {
state = state.copy(deadline = deadline)
}

fun removeDeadLine() {
state = state.copy(deadline = "")
}

fun updateAdditionalNotes(notes: String) {
state = state.copy(additionalNotes = notes)
}

fun getDateStyleValue() = preferenceUtil.getString(
PreferenceUtil.DATE_FORMAT_STR, DateStyle.DateMonthYear.pattern
)
Expand Down
Loading

0 comments on commit 22cb99d

Please sign in to comment.