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) {
if (config.displayEventTypes != it) {
config.displayEventTypes = it
}
refreshViewPager()
setupQuickFilter()
updateWidgets()
refreshViewPager()
setupQuickFilter()
updateWidgets()
}
}
}

View file

@ -339,9 +339,7 @@ class SettingsActivity : SimpleActivity() {
private fun showQuickFilterPicker() {
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 {
"${activity.getString(R.string.events)}_%Y%M%D_%h%m%s"
}
backup_events_filename.setText(filename)
backup_events_filename_hint.setEndIconOnClickListener {
DateTimePatternInfoDialog(activity)