minor code style updating + import formatting
This commit is contained in:
parent
7767fdaf62
commit
1b7cd2fc3c
1 changed files with 9 additions and 6 deletions
|
@ -13,15 +13,20 @@ import com.simplemobiletools.calendar.pro.dialogs.CustomPeriodPickerDialog
|
||||||
import com.simplemobiletools.calendar.pro.extensions.config
|
import com.simplemobiletools.calendar.pro.extensions.config
|
||||||
import com.simplemobiletools.calendar.pro.extensions.seconds
|
import com.simplemobiletools.calendar.pro.extensions.seconds
|
||||||
import com.simplemobiletools.calendar.pro.extensions.widgetsDB
|
import com.simplemobiletools.calendar.pro.extensions.widgetsDB
|
||||||
import com.simplemobiletools.calendar.pro.helpers.*
|
import com.simplemobiletools.calendar.pro.helpers.EVENT_PERIOD_CUSTOM
|
||||||
|
import com.simplemobiletools.calendar.pro.helpers.EVENT_PERIOD_TODAY
|
||||||
import com.simplemobiletools.calendar.pro.helpers.Formatter
|
import com.simplemobiletools.calendar.pro.helpers.Formatter
|
||||||
|
import com.simplemobiletools.calendar.pro.helpers.MyWidgetListProvider
|
||||||
import com.simplemobiletools.calendar.pro.models.ListEvent
|
import com.simplemobiletools.calendar.pro.models.ListEvent
|
||||||
import com.simplemobiletools.calendar.pro.models.ListItem
|
import com.simplemobiletools.calendar.pro.models.ListItem
|
||||||
import com.simplemobiletools.calendar.pro.models.ListSectionDay
|
import com.simplemobiletools.calendar.pro.models.ListSectionDay
|
||||||
import com.simplemobiletools.calendar.pro.models.Widget
|
import com.simplemobiletools.calendar.pro.models.Widget
|
||||||
import com.simplemobiletools.commons.dialogs.ColorPickerDialog
|
import com.simplemobiletools.commons.dialogs.ColorPickerDialog
|
||||||
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
|
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
|
||||||
import com.simplemobiletools.commons.extensions.*
|
import com.simplemobiletools.commons.extensions.adjustAlpha
|
||||||
|
import com.simplemobiletools.commons.extensions.applyColorFilter
|
||||||
|
import com.simplemobiletools.commons.extensions.hideKeyboard
|
||||||
|
import com.simplemobiletools.commons.extensions.setFillWithStroke
|
||||||
import com.simplemobiletools.commons.helpers.*
|
import com.simplemobiletools.commons.helpers.*
|
||||||
import com.simplemobiletools.commons.models.RadioItem
|
import com.simplemobiletools.commons.models.RadioItem
|
||||||
import kotlinx.android.synthetic.main.widget_config_list.*
|
import kotlinx.android.synthetic.main.widget_config_list.*
|
||||||
|
@ -146,13 +151,11 @@ class WidgetListConfigureActivity : SimpleActivity() {
|
||||||
period_picker_value.setText(R.string.within_the_next_one_year)
|
period_picker_value.setText(R.string.within_the_next_one_year)
|
||||||
}
|
}
|
||||||
EVENT_PERIOD_TODAY -> period_picker_value.setText(R.string.today_only)
|
EVENT_PERIOD_TODAY -> period_picker_value.setText(R.string.today_only)
|
||||||
else -> {
|
else -> period_picker_value.text = getFormattedSeconds(selectedPeriodOption)
|
||||||
period_picker_value.setText(getFormattedSeconds(selectedPeriodOption))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getFormattedSeconds(seconds: Int): String = if (seconds === EVENT_PERIOD_TODAY) {
|
private fun getFormattedSeconds(seconds: Int): String = if (seconds == EVENT_PERIOD_TODAY) {
|
||||||
getString(R.string.today_only)
|
getString(R.string.today_only)
|
||||||
} else {
|
} else {
|
||||||
when {
|
when {
|
||||||
|
|
Loading…
Reference in a new issue