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,11 +529,11 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
SelectEventTypesDialog(this, config.displayEventTypes) { SelectEventTypesDialog(this, config.displayEventTypes) {
if (config.displayEventTypes != it) { if (config.displayEventTypes != it) {
config.displayEventTypes = it config.displayEventTypes = it
}
refreshViewPager() refreshViewPager()
setupQuickFilter() setupQuickFilter()
updateWidgets() updateWidgets()
}
} }
} }

View File

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

View File

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