Minor code improvement

This commit is contained in:
Naveen
2023-03-25 13:00:46 +05:30
parent c8bba75c92
commit a29eab5c18
3 changed files with 6 additions and 7 deletions

View File

@@ -529,13 +529,13 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
SelectEventTypesDialog(this, config.displayEventTypes) {
if (config.displayEventTypes != it) {
config.displayEventTypes = it
}
refreshViewPager()
setupQuickFilter()
updateWidgets()
}
}
}
fun toggleGoToTodayVisibility(beVisible: Boolean) {
shouldGoToTodayBeVisible = beVisible

View File

@@ -339,11 +339,9 @@ class SettingsActivity : SimpleActivity() {
private fun showQuickFilterPicker() {
SelectEventTypesDialog(this, config.quickFilterEventTypes) {
if (config.quickFilterEventTypes != it) {
config.quickFilterEventTypes = it
}
}
}
private fun setupSundayFirst() {
settings_sunday_first.isChecked = config.isSundayFirst

View File

@@ -29,6 +29,7 @@ class ManageAutomaticBackupsDialog(private val activity: SimpleActivity, onSucce
val filename = config.autoBackupFilename.ifEmpty {
"${activity.getString(R.string.events)}_%Y%M%D_%h%m%s"
}
backup_events_filename.setText(filename)
backup_events_filename_hint.setEndIconOnClickListener {
DateTimePatternInfoDialog(activity)